This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: problem with std::numeric_limits<float>::epsilon() in gcc 3.0.1


"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; }
  


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