Re: Tough problem...



Hi!

We see that the difference is caused by intermediate rounding to five
decimal digits. This is unavoidable, since the FPU cannot do arithmetic
with larger numbers. For example, it doesn't know a more accurate
version of pi, which it would need to reach the same accuracy for both.

Yes. But the "i" counter is known, so yesterday I came to think
of something like this:

a := x;
for j := 1 to i do
begin
a := a + x;
a := Frac(a);
end;
result := a;

That should compute Frac(i*x) to full accuracy.

Or in case of 2*Pi, the final result would have
to be scaled by 2*Pi; and the initial x would have
to be normalized with 2*Pi.

Thanks!
Atmapuri




.