在非常简单的 Excel Lambda() 函数上获得不正确的结果
也许我遗漏了一些东西,但我在一个简单的测试中在两个 excel Lambda 函数上得到了错误的结果。
一个名为xytest():
=LAMBDA(x,y,
IF(x > y,
addy(x,y),
"x=" & x & " < y=" & y)
)
另一个是addy():
=LAMBDA(x,y,
xytest(x,(y+1))
)
它应该是递归的,直到y大于x< /强>。但是当我输入 =xytest(8,4)
时,我得到以下结果:
x=8 < y=8
我不知道这是如何发生的,因为没有增量测试,但我想知道 IF 是否(x > y)
实际上是在执行x大于或等于吗?显然它应该迭代直到y=9。我要么对 Lambda() 的工作原理感到非常困惑,要么我的公式中有错误。不幸的是,我找不到太多关于 Lambda() 的技术文档来尝试弄清楚发生了什么。
Maybe I am missing something but I am getting an incorrect result on two excel Lambda functions in a simple test.
One is named xytest():
=LAMBDA(x,y,
IF(x > y,
addy(x,y),
"x=" & x & " < y=" & y)
)
the other is addy():
=LAMBDA(x,y,
xytest(x,(y+1))
)
It should just be recursive until y is greater than x. But when I put in =xytest(8,4)
I get the following result:
x=8 < y=8
I don't know how this is happening because there is no incremental testing, but I wonder if the IF(x > y)
is actually preforming x is greater than or equal to? It should obviously iterate until y=9. I am either seriously confused about how Lambda() works or there is an error in my formulas. Unfortunately, I can't find much technical documentation on Lambda() to try and sort out what's going on.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论