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: [email protected]
          Reporter: [email protected]

> 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.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to