#3898: Many floating point documentation/behaviour mismatches.
---------------------------------+------------------------------------------
Reporter: draconx | Owner: igloo
Type: bug | Status: new
Priority: high | Milestone: 6.14.1
Component: libraries/base | Version: 6.12.1
Keywords: | Testcase:
Blockedby: | Difficulty:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: None/Unknown
---------------------------------+------------------------------------------
Comment(by draconx):
The first is an implementation issue, I think. To avoid surprises,
scaleFloat
_should_ correspond to the scaleB operation defined in the IEEE standard.
Specifically: "scaleB(x, N) is x * b^N^ for integral values N [b is the
floating point radix]. The result is computed as if the exact product
were
formed and then rounded to the destination format, subject to the
applicable
rounding-direction attribute."
In particular:
{{{
scaleFloat 0 x = x
scaleFloat n ±0 = ±0
scaleFloat n ±∞ = ±∞
}}}
(none of these identities are satisfied by the current implementation of
scaleFloat).
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/3898#comment:3>
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