[Maxima] How to deal with r^(bfloat(2/3))/r^(2.0/3)
fateman at cs.berkeley.edu
Wed Dec 12 10:49:13 CST 2007
2.0 is exact, because it is exactly representable.
1/3, if converted to a nearby (binary) float, is not equal to 1/3.
It is not an error for bfloat(x) - x to be different from zero.
> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Stavros Macrakis
> Sent: Wednesday, December 12, 2007 8:43 AM
> To: zycentre
> Cc: maxima at math.utexas.edu
> Subject: Re: [Maxima] How to deal with r^(bfloat(2/3))/r^(2.0/3)
> On Dec 12, 2007 11:27 AM, zycentre <zycentre-sub at yahoo.com.cn> wrote:
> > (%i6) (bfloat(2/3))-(2.0/3);
> > (%o6) -.19073b-6
> In Maxima, "2.0" is a machine floating-point number, so the result in
> this case may not be exact. You might want to try
> However, with default settings, the error should be < 1.0e-16, and I
> cannot reproduce your result with any settings. In fact, on my system
> (Maxima 5.13.0 on GCL 2.6.8), this returns 0.0b0.
> Could you please tell us the version of Maxima you are using? Does
> this happen in a fresh Maxima? If not, what special settings are you
> Maxima mailing list
> Maxima at math.utexas.edu
More information about the Maxima