poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50033] New: 'mod(13,12)' method in MathX should produce '1'
Date Thu, 30 Sep 2010 18:03:59 GMT

           Summary: 'mod(13,12)' method in MathX should produce '1'
           Product: POI
           Version: 3.7-dev
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: major
          Priority: P2
         Component: XSSF
        AssignedTo: dev@poi.apache.org
        ReportedBy: java@skow.org

Created an attachment (id=26106)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26106)
Patched MathX based on version 776505 (3.7b3)

The formula 'mod(13,12)' entered into Excel produces the answer of '1'.  POI is
evaluating 'mod(13,12)' to '0.9999999999999991'.

I have attached a patched version of MathX based on version 776505 which fixes
the problem.  Also attached is an updated TestMathX with the previously empty
'testMod' method filled in.  It still has some oddities when one or the other
values are negative (returning '0.6000000000000001' vs '0.6' for
'mod(-3.4,2.0)' for instance), but that was a pre-existing condition prior to
my change.

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

View raw message