bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

vasnprintf: fix comments


From: Bruno Haible
Subject: vasnprintf: fix comments
Date: Sat, 15 Oct 2011 12:13:57 +0200
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

A comment was wrong.


2011-10-15  Bruno Haible  <address@hidden>

        vasnprintf: Fix comments.
        * lib/vasnprintf.c (decode_long_double, decode_double): Fix comments.

--- lib/vasnprintf.c.orig       Sat Oct 15 12:12:49 2011
+++ lib/vasnprintf.c    Sat Oct 15 12:12:46 2011
@@ -885,9 +885,9 @@
   y = frexpl (x, &exp);
   if (!(y >= 0.0L && y < 1.0L))
     abort ();
-  /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
+  /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the
      latter is an integer.  */
-  /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
+  /* Convert the mantissa (y * 2^LDBL_MANT_BIT) to a sequence of limbs.
      I'm not sure whether it's safe to cast a 'long double' value between
      2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
      'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
@@ -973,9 +973,9 @@
   y = frexp (x, &exp);
   if (!(y >= 0.0 && y < 1.0))
     abort ();
-  /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the
+  /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * 2^DBL_MANT_BIT), and the
      latter is an integer.  */
-  /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs.
+  /* Convert the mantissa (y * 2^DBL_MANT_BIT) to a sequence of limbs.
      I'm not sure whether it's safe to cast a 'double' value between
      2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
      'double' values between 0 and 2^16 (to 'unsigned int' or 'int',

-- 
In memoriam Thomas Sankara <http://en.wikipedia.org/wiki/Thomas_Sankara>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]