octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #42589] Inaccurate results with the colon oper


From: Rik
Subject: [Octave-bug-tracker] [bug #42589] Inaccurate results with the colon operator
Date: Sun, 22 Jun 2014 20:42:40 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:30.0) Gecko/20100101 Firefox/30.0

Follow-up Comment #23, bug #42589 (project octave):

@Michael: I think the decision was made to go for consistency versus accuracy.
 Not all platforms will support extra floating point precision in their
hardware-based floating point units.  To have the same results across
different versions of Octave, different hardware, and different compilers
Octave does it's very best best to enforce the IEEE standard (only 64 bits).

For example, configure.ac includes the following about --enable-float-truncate
option which gets used for MinGW and Cygwin platforms.


### When compiling math for x87, problems may arise in some code comparing
### floating-point intermediate results.  The root cause is the extra
precision
### (~80 bits) of x87 co-processor registers versus the IEEE standard 64
bits.
### Generally, storing the result in a local volatile variable forces a
### truncation back to 64 bits, but it also degrades performance.
### Thus, we provide a FLOAT_TRUNCATE macro that may be defined to "volatile"
### when compiling for x87 target, or left empty for modern SSE math, that
### doesn't suffer from this problem at all.




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?42589>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]