[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 0.3*3 == 0.9?
From: |
CdeMills |
Subject: |
Re: 0.3*3 == 0.9? |
Date: |
Thu, 26 Aug 2010 06:20:40 -0700 (PDT) |
Michael Creel wrote:
>
>
>
> octave:1> 0.3*2 == 0.6
> ans = 1
> octave:2> 0.3*3 == 0.9
> ans = 0
> octave:3>
>
>
While reading one of D. Knuth books, I remember he wrote NEVER to use such
constructs for floating-points number, but instead
abs(0.3*3-.9) <= eps
which returns true.
Regards
Pascal
--
View this message in context:
http://octave.1599824.n4.nabble.com/0-3-3-0-9-tp2338306p2339737.html
Sent from the Octave - General mailing list archive at Nabble.com.
- Re: 0.3*3 == 0.9?, (continued)
- Re: 0.3*3 == 0.9?, Jordi Gutiérrez Hermoso, 2010/08/25
- Re: 0.3*3 == 0.9?, Jordi Gutiérrez Hermoso, 2010/08/25
- Re: 0.3*3 == 0.9?, Michael Creel, 2010/08/25
- Re: 0.3*3 == 0.9?, Jordi Gutiérrez Hermoso, 2010/08/25
- Re: 0.3*3 == 0.9?, Jaroslav Hajek, 2010/08/25
- Re: 0.3*3 == 0.9?, Michael Creel, 2010/08/25
- Re: 0.3*3 == 0.9?, José Luis García Pallero, 2010/08/25
- Re: 0.3*3 == 0.9?, Jordi Gutiérrez Hermoso, 2010/08/25
- Re: 0.3*3 == 0.9?, Jaroslav Hajek, 2010/08/26
Re: 0.3*3 == 0.9?, Marc Weber, 2010/08/25
Re: 0.3*3 == 0.9?,
CdeMills <=
Re: 0.3*3 == 0.9?, Sergei Steshenko, 2010/08/25
Re: 0.3*3 == 0.9?, Sergei Steshenko, 2010/08/25