• Herbert Valerio Riedel's avatar
    Restore exact old semantics of `decodeFloat` · e2af452c
    Herbert Valerio Riedel authored
    `integer-gmp2` uses the new 64bit-based IEEE deconstructing primop
    introduced in b62bd5ec.
    
    However, the returned values differ for exceptional IEEE values:
    
    Previous (expected) semantics:
    
      > decodeFloat (-1/0)
      (-4503599627370496,972)
    
      > decodeFloat (1/0)
      (4503599627370496,972)
    
      > decodeFloat (0/0)
      (-6755399441055744,972)
    
    Currently (broken) semantics:
    
      > decodeFloat (-1/0 :: Double)
      (-9223372036854775808,-53)
    
      > decodeFloat (1/0 :: Double)
      (-9223372036854775808,-53)
    
      > decodeFloat (0/0 :: Double)
      (-9223372036854775808,-53)
    
    This patch reverts to the old expected semantics.
    
    I plan to revisit the implementation during GHC 7.11 development.
    
    This should address #9810
    
    Reviewed By: austin, ekmett, luite
    
    Differential Revision: https://phabricator.haskell.org/D486
    e2af452c
.gitignore 47.9 KB