[GHC] #5683: bug in signum function
GHC
ghc-devs at haskell.org
Wed May 18 11:57:19 UTC 2016
#5683: bug in signum function
-------------------------------------+-------------------------------------
Reporter: tristes_tigres | Owner:
Type: bug | Status: closed
Priority: normal | Milestone: 7.6.1
Component: Prelude | Version: 7.0.3
Resolution: fixed | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by thomie):
This was fixed in commit d9a20573f473cc7389004470999b8a318aa6b3f2:
{{{
Author: Alexander Berntsen <alexander at plaimi.net>
Date: Mon Aug 18 21:43:33 2014 -0500
Make Prelude.signum handle -0.0 correctly (#7858)
Summary:
Make the `Float` and `Double` implementations of `signum` handle -0.0
correctly per IEEE-754.
This, together with "Make Prelude.abs handle -0.0 correctly (#7858)",
fixes Trac #7858.
Depends on D145
Signed-off-by: Alexander Berntsen <alexander at plaimi.net>
Test Plan:
signum of (-0.0) should be (-0.0) not 0.0.
Test program:
main =
putStrLn $ p ++ " " ++ n
where
f = show . signum
p = f (-0.0 :: Double)
n = f (0.0 :: Double)
Reviewers: ekmett, hvr, rwbarton, austin
Reviewed By: austin
Subscribers: phaskell, simonmar, relrod, ezyang, carter
Differential Revision: https://phabricator.haskell.org/D148
GHC Trac Issues: #7858
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/5683#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list