In article <5jfbf5-14d.ln1@[EMAIL PROTECTED]
>,
Bernd Paysan <bernd.paysan@[EMAIL PROTECTED]
> wrote:
<SNIP>
>
>I've tried something else: Using fractional numbers, i.e. scaling by
1e-10
>and having the decimal point on bit 64. The problem is the same: If you
use
>just a 64 bit inverse of 1e10, you don't have much accuracy left. Using
128
>bits requires too many multiplications, and I still didn't get it
accurate
>enough.
This too must work:
If we are prepared to do N^2 operations instead of N log N, for an
exponentiation, we can calculate 877^877 without needing more
precision than double on a 32 bit Forth.
Repeatedly multiply with 877. This remains under 1000*10^10.
Then calculate the last 10 digits by first calculating the
last 5, then the last 5 of the remainder. (Using FM/MOD)
Combine, rinse, repeat.
(OK this is a very limited form of multiple precision.)
(Oeps, we are now into 1000^3 operations. This may become
an overnighty.)
Some of the problems give me the idea I'm cheating when using
a 64 bit Forth, in the sense that you don't need to address the
real challenge.
>
>--
>Bernd Paysan
>"If you want it done right, you have to do it yourself"
>http://www.jwdt.com/~paysan/
--
--
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- like all pyramid schemes -- ultimately falters.
albert@[EMAIL PROTECTED]
&=n http://home.hccnet.nl/a.w.m.van.der.horst


|