strange behaviour with simple decimals
- Subject: strange behaviour with simple decimals
- From: Bowo Prasetyo
- Date: Wed, 11 Apr 2007 19:22:02 +0900
It has also non-exact results with 1.1^2, 1.3^2, 1.6^2 and 1.7^2..
but has good exact results with 1.2^2, 1.5^2, 1.8^2 and 1.9^2.. as below..
non-exact results..
(%i1) 1.1 ^ 2
(%o1) 1.21
(%i2) 1.21 - %
(%o2) - 2.2204460492503131E-16
(%i1) 1.3 ^ 2
(%o1) 1.69
(%i2) 1.69 - %
(%o2) - 2.2204460492503131E-16
(%i1) 1.6 ^ 2
(%o1) 2.560000000000001
(%i2) 2.56 - %
(%o2) - 4.4408920985006262E-16
(%i1) 1.7 ^ 2
(%o1) 2.89
(%i2) 2.89 - %
(%o2) 4.4408920985006262E-16
exact results..
(%i1) 1.2 ^ 2
(%o1) 1.44
(%i2) 1.44 - %
(%o2) 0.0
(%i1) 1.5 ^ 2
(%o1) 2.25
(%i2) 2.25 - %
(%o2) 0.0
(%i1) 1.8 ^ 2
(%o1) 3.24
(%i2) 3.24 - %
(%o2) 0.0
(%i1) 1.9 ^ 2
(%o1) 3.61
(%i2) 3.61 - %
(%o2) 0.0
Regards,
bowo
On 11/04/07, Bowo Prasetyo <prazjp at gmail.com> wrote:
> Hi,
>
> Actually, 1.4^2 is not exactly 1.96 in Maxima.. for example..
>
> 2
> (%i1) 1.4
> (%o1) 1.96
> (%i2) 1.96 - %
> (%o2) 2.2204460492503131E-16
>
> Regards,
> bowo
>
>
> On 11/04/07, Henning Siebel <henning.siebel at gmx.de> wrote:
> > Hello,
> >
> > can anybody help my with this result:
> >
> > Maxima 5.11.0 http://maxima.sourceforge.net
> > Using Lisp CLISP 2.41 (2006-10-13)
> > Distributed under the GNU Public License. See the file COPYING.
> > Dedicated to the memory of William Schelter.
> > This is a development version of Maxima. The function bug_report()
> > provides bug reporting information.
> > (%i1) 3*1.4^2;
> > (%o1) 5.879999999999999
> >
> >
> > It obviously should be 5.88. Is there a reason, why maxima produces this result,
> > or is this a bug?
> >
> > Regards,
> > Henning
> > _______________________________________________
> > Maxima mailing list
> > Maxima at math.utexas.edu
> > http://www.math.utexas.edu/mailman/listinfo/maxima
> >
>