Problem description: Entering decimal values into GCD_ADD returns a wrong result when a value greater than 10 is entered. Steps to reproduce: 1. In a default installation of LibreOffice, open an instance of Calc. 2. Open the Function Wizard 3. Double-click the GCD_ADD function to select it. 4. Enter values such as 2.1, 4.2, 6.4 and 10.5 into the Numbers list. Current behavior: The result returned is wrong. Remove the 10.5 value and the result is correctly given as 2.1. Expected behavior: The result of 2.1 should be returned for all the example values. The input parameters are stated to be Numbers, not Integers. Operating System: Windows XP Version: 4.1.1.2 release
GCD function works only for integers, as it is described in the ODF standard: http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1018532_715980110 or in Excel help: http://office.microsoft.com/en-us/excel-help/gcd-HP005209104.aspx GCD rounds input numbers down to integer and returns integers, but GCD_ADD apparently returns decimal values - maybe this is a bug.
Yes. No problem with GCD, only with GCD_ADD.
OK, I confirm this as a bug: GCD_ADD function does not convert input values to integers and returns rationals. E.g.: GCD_ADD(2.1;4.2) returns 2.1, should return 2 GCD(2.1;4.2) returns 2 correctly This is probably inherited from OO - see also https://issues.apache.org/ooo/show_bug.cgi?id=71158 where the same behaviour (returning rationals) was corrected for GCD function.
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.