> -----Original Message-----
> From: maxima-bounces at math.utexas.edu
> [mailto:maxima-bounces at math.utexas.edu] On Behalf Of Andrey G. Grozin
> Sent: Wednesday, April 11, 2007 8:45 AM
> To: Jay Belanger
> Cc: maxima at math.utexas.edu
> Subject: Re: [Maxima] strange behaviour with simple decimals
>
> On Wed, 11 Apr 2007, Jay Belanger wrote:
> > Since it is Maxima giving the result, I'd say it has
> everything to do
> > with Maxima. Here, it has to do with the way that Maxima handles
> > floats.
> > It may be worth noting that both Axiom and my pocket calculator give
> > the correct answer to 3*1.4^2.
> I don't understand your statement: why do you think that the
> result given
> by your calculator is "correct", and the one given by maxima is
> "incorrect"? Any floating-point result is supposed to be
> inexact,
I also doubt that Axiom gets the right answer, if it is using machine floats
.. Maybe it is just rounding the answer for a shorter display. This would
require some testing, and the machine on which I have Axiom is elsewhere..
But your statement that floating-point results are supposed to be inexact is
a common misunderstanding.
The result are exact, they are just quantized -- only certain rational
numbers are representable, as you say below. Thinking that floats are some
kind of fuzz-ball generally leads to a mind-set that suggests everything you
compute with floats is somehow unclean. This is false: with care one can do
many computations in floats and get answers which are predictably close to
the perfect mathematical answer.
As an example, one can exactly multiply polynomials with integer
coefficients using floating-point FFTs, because the errors in such
computations can be rigorously bounded...
> because
> of rounding errors (except floating-point numbers with
> denominators of the
> form 2^n, for small n). Therefore, two results which differ
> by a quantity
> of order of rounding errors are equally correct.
>
> Andrey
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>