At 08:58 AM 3/30/2001 -0500, Andy Dougherty wrote:
>On Fri, 30 Mar 2001, Bart Lateur wrote:
>
> > On Thu, 29 Mar 2001 19:24:21 +0200 (CEST), Tels wrote:
> >
> > >And then, if we have BigFloat, we need a way to specify rounding and
> > >precision. Otherwise 1/3 eats up all memory or provides limits ;o)
>
> > Er... may I suggest ratio's as a data format? It won't work for sqrt(2)
> > or PI, but it can easily store 1/3 as two (long) integers.
>
>The internal details ought to be invisible.  Anyway, since you still can't
>store any irrationals exactly, you still have the same issues of rounding
>and precision.

The closest thing I can see to a good way around this is to not evaluate 
the variable holding the value until it's actually needed, storing the 
operations done to it and performing some algebraic twiddling on it to 
simplify things and hopefully keep them more accurate. (Though I am *not* 
proposing that for perl 6, as it seems a touch too much even for me... :)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to