#5524: Unnecessary overflow in encodeFloat
----------------------------------+-----------------------------------------
Reporter: daniel.is.fischer | Owner: daniel.is.fischer
Type: bug | Status: new
Priority: normal | Component: libraries/base
Version: 7.2.1 | Keywords: overflow, encodeFloat
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
----------------------------------+-----------------------------------------
{{{
Prelude> encodeFloat (2^1024) (-1024)
Infinity
}}}
The real result is `1.0` of course.
The docs for `encodeFloat` now say that the result is infinite if overflow
occurs, so technically we're within the spec, but I think in this case it
shouldn't overflow.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5524>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs