Repository : ssh://darcs.haskell.org//srv/darcs/packages/base

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4206afd3dee6d1612f6f1a88dd9ac614418dc859

>---------------------------------------------------------------

commit 4206afd3dee6d1612f6f1a88dd9ac614418dc859
Author: Daniel Fischer <[email protected]>
Date:   Sun Oct 2 16:38:15 2011 +0200

    Change haddock for encodeFloat, fixes #5525

>---------------------------------------------------------------

 GHC/Float.lhs |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/GHC/Float.lhs b/GHC/Float.lhs
index fddc85b..f4a3da3 100644
--- a/GHC/Float.lhs
+++ b/GHC/Float.lhs
@@ -112,8 +112,10 @@ class  (RealFrac a, Floating a) => RealFloat a  where
     -- | 'encodeFloat' performs the inverse of 'decodeFloat' in the
     -- sense that for finite @x@ with the exception of @-0.0@,
     -- @'uncurry' 'encodeFloat' ('decodeFloat' x) = x@.
-    -- @'encodeFloat' m n@ is the closest representable floating-point
-    -- number to @m*b^^n@ (or @&#177;Infinity@ if overflow occurs).
+    -- @'encodeFloat' m n@ is one of the two closest representable
+    -- floating-point numbers to @m*b^^n@ (or @&#177;Infinity@ if overflow
+    -- occurs); usually the closer, but if @m@ contains too many bits,
+    -- the result may be rounded in the wrong direction.
     encodeFloat         :: Integer -> Int -> a
     -- | 'exponent' corresponds to the second component of 'decodeFloat'.
     -- @'exponent' 0 = 0@ and for finite nonzero @x@,



_______________________________________________
Cvs-libraries mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-libraries

Reply via email to