Apache OpenOffice (AOO) Bugzilla – Issue 83027
bad numerics platform
Last modified: 2007-10-29 12:21:35 UTC
- first of all, I'd like to point out that the categories you require bug reporters to put their bug reports in don't make any sense. How do I know what the priority should be? Frankly, given the horrible numerics Java provides, I think this should be one of the highest priorities ever! - second, it's entirely possible that the bug reporter doens't know if it only affects a particular platform or all, and which subcomponent it is. I had to choose "code", but someone less familiar with the details may choose "formatting", because it actually shows as a formatting bug) - third, it's really not cool that I cannot submit an attachment with this. I could make my issue much clearer if I could attach a spreadsheet, I cannot believe you want people to submit bugs for Calc but don't allow them to attach Calc spreadsheets. Here is the actual bug report. Forgive me for being very verbal, but your system is too bad to allow me to attach a ss. Take an empty sheet, put the number 0.7 in a cell in the top row. In the cell below type =a1*11-7. You should get 0.7 again. Then copy this cell and paste it down some 25 cells. Although 11 x - 7 is what mathematicians call a "fixed point mapping" for the number 0.7, the number 0.7 is no longer 0.7 very quickly. Increase the number of decimals to something like 15 or 20, and you see the unfolding disaster. In plain Java this matches Excel more or less identically: (differences are only in the very last nonzero decimal:) public class pst { public static void main(String[] args) { double var=0.7; for (int j = 1; j < 25; j++) { System.out.println(j+" "+var); var=var*11-7; } ;} } I should note that this is in the Java 6 Update 3 SDK, b05, and I am running this on a 64 bit AMD Turion 64, that is the only SDK you have for 64 bit Windows computer on your SDK download page. So even with 64 bit you get these horrible numeric results. Excel is already bad, but I didn't think that OOo would be worse than Excel.I had expected OOo to be better or the same, but not worse. We all know where the error comes from, but how come OOo is worse than Java or Excel? In closing, I'd like to point out that if Sun keeps defending the JVM rather than improving it, then Java will continue to be a horrible numerics platform that will be inferior to .Net and C++ and others for ever. I really understand numerics, and Sun should fess up and improve, instead of "defend" (because you don't really defend by trying to "fight through" something that you know you will lose). Thanks, Andreas
double to Issue 69749. BTW This is not Java and therefore comments about Java are just useless in this bugtracking system. Frank *** This issue has been marked as a duplicate of 69749 ***
closed double