[Maxima] Precision of float and bfloat
eric.reyssat at math.unicaen.fr
Thu Oct 15 12:52:16 CDT 2009
I have some questions and remarks about precision of floats and bigfloats.
f(i):=block([u], u:sqrt(10^(2*i)+1)/10^i, print(bfloat(u)),print(float(u)));
**** this is ok, just slightly strange that float gives a better result
than bfloat (the right answer is 1.000049998750062496..., so should be
rounded to ...0062 and not ...0063).
By the way, I cannot find in the documentation (at least in chapter 10,
floating point) the definition and precision of a float.
**** this rounding is ok.
Maxima encountered a Lisp error:
Error in PROGN [or a callee]: Can't print a non-number.
To reenable the Lisp debugger set *debugger-hook* to nil.
**** bfloat is ok. But float cannot calculate this since some
intermediate result is too big (once again, is the limit for the
exponent given in the documentation ?), although the result itself is a
perfectly nice number. Would it be possible to improve the float
algorithm to avoid this problem ?
**** this time, no error message, just a stupid result from float ! is
it a bug, or just a feature ? bfloat is ok.
More information about the Maxima