rat(x)-x = rat(0) according to the documentation. Does that mean rat(x) (+ - * /) y = rat (x op y)
I just want to know the result of one operation's error, and I understand that big floats are contagious, but what about rat. From the above it looks like rat is preferred/contagious.
I guess I could assume if fpprec = 100 then the error in an addition (1+10^-98) (x + y) which seems safe since I subtracted two to be sure.
If I can know the result of one operations error x + y = z then I can figure out where to stop my power series expansion by adding up all of the errors. That is my goal. if x and y already have errors in previous calculations then
(1+10^-98) (|x_err| + |y_err|) = z_err
I think.
Rich
------------Original Message------------
From: "Richard Fateman" <fateman at cs.berkeley.edu>
To: "'Richard Hennessy'" <rvh2007 at comcast.net>, "'Maxima List'" <maxima at math.utexas.edu>
Date: Tue, May-6-2008 11:27 AM
Subject: RE: [Maxima] Big float Round off errors
Trying to show that u can be computed, I ran into this bug..
Maxima 5.14.0 http://maxima.sourceforge.net
Using Lisp GNU Common Lisp (GCL) GCL 2.6.8 (aka GCL)
..
(%i2) rat(bfloat(0.1));
`pquotient' by zero
-- an error. To debug this try debugmode(true);
(%i3)
.....
Independent of this bug, for other examples, the result is also
unsatisfactory
because the conversion which should be exact (in my opinion) is set up to
round, which sometimes
fool the eye. That is, bfloat(1/10) converted to rational should not be
1/10 because
it is not. Proof:
x:bfloat(1/10);
fpprec:100;
bfloat(x) -->
1.0000000000000000034694469519536141888238489627838134765625b-1
I recall people fussing with conversion and probably making the wrong
choice,
which makes it impossible to trivially compute your "u", though it is
trivially possible in
an unbroken common lisp.
but apparently there is also an outright bug.
Common Lisp itself has two functions, rational and rationalize.
(- 1/3 (rationalize (/ 1.0 3.0)))--> 0 ; this is apparently used by Maxima
now, a mistake, I think.
(- 1/3 (rational (/ 1.0 3.0))) -1/100663296 ; this should be used by
Maxima, just so you can compute u.
This latter computation tells you that this single precision representation
error is about 10^(-8).
note that ratepsilon is probably involved in Maxima's computation.
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Richard Hennessy
> Sent: Tuesday, May 06, 2008 12:40 AM
> To: Maxima List
> Subject: Big float Round off errors
>
> "Floating-point operations are not exact, but they can be modeled as:
> fl( x op y ) = (1+D) (x op y)
> where |D| <= u, u is the unit round off or machine precision"
>
> I found this on the Internet and it is about running error
> analysis for numerical algorithms. I just want to know the
> value of u for big floats as a function of fpprec (as opposed
> to machine precision) since Maxima big floats are running in
> a virtual machine? Does anyone know how round off is handled
> with big floats.
>
> Thanks,
>
> Rich
>
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>