Apache OpenOffice (AOO) Bugzilla – Issue 9134
Cumulative error in formulas gives incorrect answer - BESSELJ
Last modified: 2013-08-07 15:12:51 UTC
Our research lab has a benchmark spreadsheet (Excel) used to compare speed of the computers we buy. I can import this into OpenOffice just fine, but OpenOffice Calc gives the wrong answers. I believe that I know the correct answer, because I also have Mathematica to compare with. I have cut down the 256 column by 2500 row sheet to a 256 column 3 row sheet which shows the problem. (One could just copy the 3rd row all the way down to recover my original benchmark). A1=1.3 The first row iterates the formula Sqrt((cell to left)^2+1) The first column iterates the formula Sqrt((cell above)^2+1) The other cells have the formula of the form IV1==SQRT(IU1^2+1) [ For the first row ] IV2=Log10(ABS(BESSELJ(IV1;$A3)))+IU2 IV3=Log10(ABS(BESSELJ(IV2;$A3)))+IU3 In general: cell=Log10(ABS(BESSELJ((cell above);(cell in same row, first column))))+(cell to left) OpenOffice eventually give error 502 in most cells. The problem can still be seen with the simpler formula, which I am using for this bug report. Simply drop the call to Log10: IV1=SQRT(IU1^2+1) [ For the first row ] IV2=ABS(BESSELJ(IV1;$A3))+IU2 IV3=ABS(BESSELJ(IV2;$A3))+IU3 In general cell=ABS(BESSELJ((cell above);(cell in same row, first column)))+(cell to left) Where the first row/column are still 1.3 or the sqrt iteration given above Now the IV3 result (256th column, 3rd row) results are Mathematica gives 30.0811386942866761144975205 Excel gives 30.08113874136690000000 OpenOffice gives 516.52017959013400000000 So you can see why I am distressed. OpenOffice ends up wildly off, while Excel is correct to 9 digits. It would seem your BesselJ function is simply not getting enough digits of accuracy compared with Excel.
Created attachment 3547 [details] OpenOffice Calc accumulates too much error compared with Excel
Hi Daniel, could you please check this. I just tried it with OOo1.0.3 and OOo1.1Beta2 (on Linux) and both threw different results that are not even the same as the result that the submitter reported for OOo1.0.1. Peter
started
The result of J1(x) goes completely out of scope for x>30. Therefore the third line in the attached doc becomes completely wrong.
Review done.
fixed in srx645/dr4 (OOo 1.1 RC).
owner->QA
Created attachment 6609 [details] test of all BESSEL functions
reset resolution to fixed
verified in internal build dr4
Fixed and verified in OOo1.1RC