[GHC] #9534: IEEE Standard 754 for Binary Floating-Point Arithmetic by Prof. W. Kahan, UCB
GHC
ghc-devs at haskell.org
Wed Sep 10 15:33:43 UTC 2014
#9534: IEEE Standard 754 for Binary Floating-Point Arithmetic by Prof. W. Kahan,
UCB
-------------------------------------+-------------------------------------
Reporter: jrp | Owner:
Type: task | Status: new
Priority: normal | Milestone:
Component: Test Suite | Version: 7.8.3
Resolution: | Keywords: IEEE754
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Moderate (less
Type of failure: Incorrect | than a day)
result at runtime | Blocked By:
Test Case: | Related Tickets:
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by carter):
still haven't worked through this fully, BUT min/max for float/double in
ghc haskell are certainly defined differently from the the 2008 IEEE
floating point standard (nb: the definition of min/max in the ieee
standard was only added to the 2008 version and merely codified certain
unusual idioms/patterns from the C language useage of min/max on Nans).
In contrast, GHC Haskell's compare is defined wrt a quiet (not signalling)
comparison on input arguments (which mean that when min max have a nan in
either arg, we just take the second arg currently.). Of course, this is a
bit unsatisfactory if only because it makes min/max not commutative
operations in the presence of NaN. (though in some respects I view the
current IEEE definition that just codifies the C version as more
problematical still!)
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9534#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list