在非常简单的 Excel Lambda() 函数上获得不正确的结果

发布于 2025-01-10 01:55:28 字数 634 浏览 1 评论 0原文

也许我遗漏了一些东西,但我在一个简单的测试中在两个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文