https://bz.apache.org/bugzilla/show_bug.cgi?id=66189

            Bug ID: 66189
           Summary: Decimal discrepancy in simple  arithmetic operation
           Product: POI
           Version: 5.2.2-FINAL
          Hardware: PC
                OS: Mac OS X 10.1
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSSF
          Assignee: dev@poi.apache.org
          Reporter: mauricio.pa...@rgare.com
  Target Milestone: ---

Created attachment 38355
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=38355&action=edit
Example

I'am doing  an simple arithmetic operation in cell , POI(Ver5.2.0) and Micro
Excel calculatng results and the results are fine.
The problem occurs when I update  apache poi to version 5.2.2, the results
don't match.
e.g.

Formula: C1=(A2+(B2-A2)*A1/10)-1

Where:

A1=5
A2=(A3-1)*0.63+1
A3=1.35
B2=(B3-1)*0.5+1
B3=1.35

POI v5.2.0 results: C1=0.1977500000000001  -> Java logic ->
Round(C1*100,2)=19.78
POI v5.2.2 results: C1=0.19774999999999987 -> Java logic ->
Round(C1*100,2)=19.77
Micro Excel Calculation results: C1=0.19775 -> Excel Round ->
D1=ROUND(C1*100,2)=19.78

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to