Charles wrote:
Hello,
I am exploring fibonacci numbers, and figured a spreadsheet would be the
quickest way to generate them. I created a spreadsheet in OOo, and was
looking through the results when I noticed some of the numbers don't add up
correctly, admittedly they are quite large numbers, but still ...
example follows (and I attached the ods file as well)
just using the very first row, cell A1 has a 1 as does cell B1 cell C1 has
the expression =a1+b1 I then copied and pasted C1 to the range of D1 to
FT1, relying on OOo to change the references in the usual way.
I changed the formatting to show full numbers instead of notation, and was
widening the cells to be able to read the larger numbers instead of ### .
Then I noticed that some of the numbers have a lot of trailing zeros, this
just shouldn't be, so I went back to the begining of this discrepancy. And
at cells BX1 to BZ1 I found the begining of this problem. If you add the
numbers at BX1+BY1 with a calc.exe you will find that the answer in BZ1 is
incorrect.
3,416,454,622,906,710 added to 5,527,939,700,884,760 is
8,944,394,323,791,470 and NOT 8,944,394,323,791,460.
I promise I'm not using a Pentium with the fdiv bug :) .. actually using
an Athlon64 3800+
OpenOffice.org, like 99% of software, uses the standard built-in
arithmetic facilities of your computer hardware, which break down at
about 15 decimal digits of precision. Such methods are good enough for
science and engineering, because things aren't measured that precisely
to begin with, and they are usually good enough for money, too.
They are /not/ adequate for this kind of number-theory work.
This is not a bug. Carrying out results to an indefinite number of
digits requires using a whole program just to add two numbers, instead
of doing it with a single instruction. If you need it, there are ways to
do it, but the computer is slowed down by a factor of 10 or 100 or 1000
to one.
Several programming languages will do what you want automatically,
including Common LISP and Ruby. Others can be forced to do it, such as
Perl and Java. OpenOffice.org cannot, and I don't know offhand of any
other spreadsheet that can.
--
John W. Kennedy
Read the remains of Shakespeare's lost play, now annotated!
http://pws.prserv.net/jwkennedy/Double%20Falshood/index.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]