[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: 0.3*3 == 0.9?
From: |
Jordi Gutiérrez Hermoso |
Subject: |
Re: 0.3*3 == 0.9? |
Date: |
Wed, 25 Aug 2010 09:35:39 -0500 |
2010/8/25 Michael Creel <address@hidden>:
>> Anyways, yes, this is completely normal. 0.3 has an infinite binary
>> expansion because its denominator has factors other than 2, so you'll
>> get a rounding error.
> Right, I'm aware of that. My question is whether or not Octave's comparison
> of floats takes it into account.
I don't see how == by itself could. I was looking for a function like
fcomp(a,b,e) := abs(a-b) < e, but it's pretty trivial to just do the
rhs of that function.
- 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?, 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 <=
- 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, 2010/08/26