[Libreoffice-bugs] [Bug 141201] New: Basic: MOD result is different for values passed as literals vs. using variables

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Mar 23 14:56:50 UTC 2021


https://bugs.documentfoundation.org/show_bug.cgi?id=141201

            Bug ID: 141201
           Summary: Basic: MOD result is different for values passed as
                    literals vs. using variables
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: BASIC
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: mikekaganski at hotmail.com

> 3 MOD 1.5

=> result is 0

> DIM n
> 3 MOD n

=> result is 1

Obviously in the first case, the literal '1.5' was truncated to 1, while in the
second case, it was rounded to 2.

See also tdf#141200, where MOD documentation is discussed.

Ref:
https://ask.libreoffice.org/en/question/300133/macro-using-mod-and-variables-produces-wrong-answer/

-- 
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/20210323/f50ee084/attachment.htm>


More information about the Libreoffice-bugs mailing list