help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maxima-discuss] a fun demo for variable precision arithmetic


From: Barton Willis
Subject: Re: [Maxima-discuss] a fun demo for variable precision arithmetic
Date: Fri, 4 Dec 2015 19:24:07 +0000

Incidentally: For bounding floating point round off error, the running error is an old-fashioned alternative to interval arithmetic.

This method is described in  Higham, Nicholas J. (2002), Accuracy and stability of numerical algorithms.  SIAM.


The maxima function nfloat implements the running error method. When the error is too large, nfloat automatically increases

the value of fpprec.  Of course if the input data differs from its true value, there isn't any magic that can fix that.


(%i19) baz(xx,yy,dig) := nfloat(1335/4*y^6+x^2*(11*x^2*y^2-y^6+(-121)*y^4-2)+11/2*y^8+x/(2*y),[x=xx,y=yy],dig)$


(%i20) load(hypergeometric)$


(%i19) for fpprec:10 step 5 thru 50 do print (baz(77617, 33096, fpprec));
-8.2739606b-1
-8.27396059946821b-1
-8.2739605994682136814b-1
-8.273960599468213681411651b-1
-8.2739605994682136814116509548b-1
-8.2739605994682136814116509547981629b-1
-8.27396059946821368141165095479816291999b-1
-8.27396059946821368141165095479816291999033116b-1
-8.2739605994682136814116509547981629199903311578439b-1
(%o19) done





 


--Barton
     



reply via email to

[Prev in Thread] Current Thread [Next in Thread]