Bug 84435 - Mod operator does not deal with decimals as described in help
Summary: Mod operator does not deal with decimals as described in help
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version: Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-28 21:30 UTC by Stanislav Horacek
Modified: 2014-10-18 12:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.