This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[Patch] std::numeric_limits<float>::epsilon() incorrectly defined


There is a typo in the definition of
std::numeric_limits<float>::epsilon().  A patch is attached.

Best regards,

--
Zane Dodson
zdodson@zdodson.com
Index: libstdc++-v3/include/bits/std_limits.h
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/include/bits/std_limits.h,v
retrieving revision 1.2.2.4
diff -u -p -r1.2.2.4 std_limits.h
--- std_limits.h	2001/08/15 15:48:36	1.2.2.4
+++ std_limits.h	2001/09/13 16:04:46
@@ -1770,9 +1770,9 @@ namespace std
       static const bool is_signed = true;
       static const bool is_integer = false;
       static const bool is_exact = false;
-      static const int radix = 2;
+      static const int radix = __glibcpp_float_radix;
       static float epsilon() throw()
-      { return __glibcpp_float_radix; }
+      { return __glibcpp_float_epsilon; }
       static float round_error() throw()
       { return __glibcpp_float_round_error; }
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]