Bug 84435

Summary: Mod operator does not deal with decimals as described in help
Product: LibreOffice Reporter: Stanislav Horacek <stanislav.horacek>
Component: BASICAssignee: Not Assigned <libreoffice-bugs>
Status: NEW --- QA Contact:
Severity: normal    
Priority: medium CC: cno
Version: Inherited From OOo   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Stanislav Horacek 2014-09-28 21:30:23 UTC
Modulo operator in Basic cannot deal with decimal numbers. Whereas the help text states:
Print 10 Mod 2.5 ' returns 0

actual result of 10 Mod 2.5 is 1 (2.5 is apparently rounded up to 3).
(Contrary to this, MOD function in Calc returns 0 in this example.)

I'm not sure what behaviour should be considered as reference. In any case, either Mod operator or its description in help should be corrected.

Tested on 4.2.6 and 3.5.4, probably inherited from OOo.
Comment 1 Cor Nouws 2014-10-18 12:03:28 UTC
Indeed present in 3.3.0 already
thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.