[GHC] #9530: min / max do not always return the other argument when one of the arguments is NaN
GHC
ghc-devs at haskell.org
Tue May 5 01:51:44 UTC 2015
#9530: min / max do not always return the other argument when one of the arguments
is NaN
-------------------------------------+-------------------------------------
Reporter: jrp | Owner:
Type: bug | Status: closed
Priority: normal | Milestone:
Component: Prelude | Version: 7.8.3
Resolution: invalid | Keywords:
Operating System: MacOS X | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: 9276 | Blocking:
Related Tickets: 9276 | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by lerkok):
I hate to beat a dead-horse; but in the light of the similarly filed
ticket: https://ghc.haskell.org/trac/ghc/ticket/10378, I thought I'd put
in my feedback.
While Carter is right that the being compliant to the IEEE-spec might be
useless, it is nonetheless the "spec", and thus we just have to adhere to.
I really do want to see Float/Double to mean IEEE-float/double.
The hardware implementation in x86 is actually IEEE compliant; just not in
the expected way. The newer ticket I linked to has an implementation that
is both IEEE-compliant and follows what x86 hardware is doing. (MINPS,
MAXPS instructions.)
I wholeheartedly agree that we need more discussion on all matters
relating to floats. In particular (though not relevant in this case), the
proper handling of rounding modes, and additional functionality such as
fma.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9530#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list