stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject [PATCH] etc/config/src/INFINITY.cpp
Date Thu, 21 Feb 2008 15:49:33 GMT
  I see that the in ldbl_denorm_min() used DBL_MIN constant.
Is this by design, or a bug?

  Below is a patch to make ldbl_denorm_min() consistent with
dbl_denorm_min() and flt_denorm_min().

Index: etc/config/src/INFINITY.cpp
===================================================================
--- etc/config/src/INFINITY.cpp	(revision 629828)
+++ etc/config/src/INFINITY.cpp	(working copy)
@@ -720,8 +720,8 @@
     for (volatile long double tmp = 1.0L; tmp; tmp /= 2.0L)
         val.val = tmp;
 
-    if (DBL_MIN < val.val)
-        val.val = DBL_MIN;
+    if (LDBL_MIN <= val.val)
+        val.val = 0.0L;
 
 #else
 

Farid.

Mime
View raw message