https://bz.apache.org/bugzilla/show_bug.cgi?id=61573
Bug ID: 61573
Summary: when I read the result of ROUND formula by APACHE_POI,
it returns unexpected value.
Product: POI
Version: 3.14-FINAL
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: SS Common
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
Hi,
would someone tell me the reason of following issue?
Cell"CC24" contains the following formula;
=ROUND((I24*Q24*U24*Y24*AC24*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))*BU24/BY24
, -1 )
and the result is;
before ROUND : 1514.6689635
after ROUND Excel result :1510
after ROUND POI result :1520
I expected that APACHE_POI returns "1510" as Excel, but the result is "1520".
Additionaly, I know the following points;
1.APACHE_POI returns "1510" when I put additional parenthesis in formula.
ex: put parenthesis around "I24*Q24*U24*Y24*AC24" and "BU24/BY24"
=ROUND(( ( I24*Q24*U24*Y24*AC24 )
*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))* ( BU24/BY24 ) ,-1)
and the result is;
before ROUND : 1514.6689635
after ROUND Excel result :1510
after ROUND POI result :1510
2.APACHE_POI returns "1510" when I substitute real numbers for functions.
ex1. I24*Q24=100 ⇒ substitute "100" for I24*Q24
(100*U24*Y24*AC24*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))*BU24/BY24
ex2. Q24*U24=0.21 ⇒ substitute "0.21" for Q24*U24
(I24*0.21*Y24*AC24*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))*BU24/BY24
ex3. U24*Y24=0.03746862⇒ substitute "0.03746862" for U24*Y24
(I24*Q24*0.03746862*AC24*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))*BU24/BY24
ex4. Y24*AC24=1784.22⇒ substitute "1784.22" for Y24*AC24
(I24*Q24*U24*1784.22*(AG24+AK24*AO24/AS24)*(AW24-BA24)*(BE24-BI24)*(BM24+BQ24))*BU24/BY24
and the results are;
before ROUND : 1514.6689635
after ROUND Excel result :1510
after ROUND POI result :1510
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]