This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: problem with std::numeric_limits<float>::epsilon() in gcc 3.0.1
- To: "Kevin Ediger" <kediger at licor dot com>
- Subject: Re: problem with std::numeric_limits<float>::epsilon() in gcc 3.0.1
- From: Gabriel Dos Reis <gdr at codesourcery dot com>
- Date: 12 Sep 2001 09:49:54 +0200
- Cc: libstdc++ at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <86256AC4.0078E10C.00@hooper2.licor.com>
"Kevin Ediger" <kediger@licor.com> writes:
| It looks like epsilon() incorrectly returns __glibcpp_float_radix instead of
| __glibcpp_float_epsilon. Is this a known problem?
No, it isn't. Thanks.
Fixed with the below. On branch and mainline.
-- Gaby
Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/ChangeLog,v
retrieving revision 1.779
diff -p -r1.779 ChangeLog
*** ChangeLog 2001/09/11 00:12:55 1.779
--- ChangeLog 2001/09/12 07:38:11
***************
*** 1,3 ****
--- 1,8 ----
+ 2001-09-12 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
+
+ * include/bits/std_limits.h (numeric_limits<float>::radix,
+ numeric_limits<float>::epsilon: Fix thinko.
+
2001-09-10 Benjamin Kosnik <bkoz@redhat.com>
* configure.in: Fix cross compiling math routines. Correct
Index: include/bits/std_limits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/include/bits/std_limits.h,v
retrieving revision 1.5
diff -p -r1.5 std_limits.h
*** std_limits.h 2001/08/15 15:57:40 1.5
--- std_limits.h 2001/09/12 07:38:11
*************** namespace std
*** 1770,1778 ****
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
! static const int radix = 2;
static float epsilon() throw()
! { return __glibcpp_float_radix; }
static float round_error() throw()
{ return __glibcpp_float_round_error; }
--- 1770,1778 ----
static const bool is_signed = true;
static const bool is_integer = false;
static const bool is_exact = false;
! static const int radix = __glibcpp_float_radix;
static float epsilon() throw()
! { return __glibcpp_float_epsilon; }
static float round_error() throw()
{ return __glibcpp_float_round_error; }