So, let's take another example. ln(1)
It's simply not possible to store all numbers correctly unless you do not do any of the actual calculations, instead storing the formulas all the time.
That might be exactly what you want, but it's not what you fwant when you write games or video-players, just to take two totally arbitrary examples.
Say that you have a scrolltext that should move according to sin(xpos) + cos(frame/10) or something, you would get a very slow scrolltext if you try to calculate it exactly.
/ Per Hedbor ()
Previous text:
2003-02-25 13:34: Subject: Re: Do we have a floatingpoint bug?
you just need an efficient means to store the fact that the result is periodical ( Gmp.mpq(1,3) might do the trick)
greetings, martin.
/ Brevbäraren