|
|
|
|
|
by raiph
1807 days ago
|
|
Are you saying that because (typically) arbitrary precision rationals are too slow, and floating point yields errors, or for some other reason? (Raku supports arbitrary precision rationals, and they're normalized to minimize the denominator size, and remain pretty performant until the denominator exceeds 64 bits, so I'm thinking they might do OK for correctly computing transcendentals to maybe 15 decimal digits or so.) |
|
You probably already know this, I'll apologise in advance - My understanding is you can only get accurate values of a value smaller than unity on a float if it is a sum of perfect powers of 1/2 (ie. the denominator is a perfect power of two). Therefore any reciprocal of an odd number will get an error (bar the first term, which is 1) since odd numbers don't fall into the above category (except for 1).
I tried using this series years ago to calculate pi. It was a total disaster, the final value was way off.
Edit: 'sum of'