[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #42589] Inaccurate results with the colon oper
From: |
Jordi Gutiérrez Hermoso |
Subject: |
[Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator |
Date: |
Tue, 24 Jun 2014 02:42:11 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0 Iceweasel/30.0 |
Follow-up Comment #25, bug #42589 (project octave):
> In double precision, 10, 0.1 and 1.0 are represented exactly
This is false, the only values that can be represented exactly in hardware
floats are those where the numerator is a power of 2, which 1/10 is not (it
has a pesky 5 in there, and 1/5 has a repeating binary expansion). That is why
0.3 - 0.2 - 0.1 is not 0 in any language that uses hardware floats.
This is not really a bug, but if it's trivial to perform the computation in a
way that matches Matlab's own error (there *has* to be an error, since there
can't be exact representation), let's pick Matlab's error.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?42589>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, (continued)
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Julien Bect, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Michael Godfrey, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Michael Godfrey, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Julien Bect, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/21
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Julien Bect, 2014/06/22
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Michael Godfrey, 2014/06/22
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/22
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Michael Godfrey, 2014/06/22
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator,
Jordi Gutiérrez Hermoso <=
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Julien Bect, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Julien Bect, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Michael Godfrey, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, John W. Eaton, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, John W. Eaton, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/24
- [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator, Rik, 2014/06/26