How many decimal-digits?
Our friend Geomol has been testing the 64bit decimal capabilities of R3.
Specifically, he is looking at the decimal-digits default, which is set to 15 digits (because that's what clib specifies).
He uses this test:
>> d: 3 loop 16 [print 1.9 * d d: d * 10 + 3]
5.7
62.7
632.7
6332.7
63332.7
633332.7
6333332.7
63333332.7
633333332.7
6333333332.7
63333333332.7
633333333332.7
6333333333332.7
63333333333332.7
633333333333333.0
6.33333333333333E+15
== 33333333333333333
And he asks:
Is 15 digits always ok? Can anyone come up with a test, which shows, that 15 digits give bad results for some calculation?
So, there's a question for you. Know the answer?
1 Comments
|