[Libreoffice-bugs] [Bug 121105] the current() function is confused if used inside or()
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Nov 2 11:44:25 UTC 2018
https://bugs.documentfoundation.org/show_bug.cgi?id=121105
Jiří Boháč <jiri at boha.cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|NOTABUG |---
Status|RESOLVED |REOPENED
--- Comment #9 from Jiří Boháč <jiri at boha.cz> ---
(In reply to m.a.riosv from comment #8)
> =5+OR(3;CURRENT())=6
> =5+OR(1;1)=5+1=6
this is correct
> =5+OR(0;CURRENT())=5
> =5+OR(0;0)=5+0=5
yes, this is the bug. There cannot be any sane explanation for this:
=5+OR(0;CURRENT()) = 5
=5+OR(CURRENT(),0) = 6
> CURRENT() takes the value inside the function, what looks fine at that step,
> until the calculation of the function is finished.
Seem CURRENT() in fact returns the value of the first function argument:
=5+POWER(3,CURRENT()) = 5+3^3 = 5+27 = 32
=5+POWER(CURRENT(), 3) = 5 + 5^3 = 130
Parentheses also totally screw it up:
=5+POWER((CURRENT()+1), 3) = 5+(5+1)^3 = 221 (correct)
=5+POWER((1+CURRENT()), 3) = 5+(1+1)^3 = 13 (WTF!)
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181102/1a598545/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list