This is the mail archive of the libstdc++@sourceware.cygnus.com 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]

Patch for typos in bits/std_cmath.h


This patch fixes several typos in bits/std_cmath.h.
The MODF stuff breaks the build on hppa1.1-hp-hpux10.20.

2000-06-13  Branko Cibej  <branko.cibej@hermes.si>

	* bits/std_cmath.h:  Fix typos in tests (*_FMODFF -> *_FMODF).
	Test  *_MODFF not *_MODF for modf(float, float*).
	(modf(float, float*)): Remove reference to _C_legacy.


-- 
Branko Čibej                 <branko.cibej@hermes.si>
HERMES SoftLab, Litijska 51, 1000 Ljubljana, Slovenia
voice: (+386 1) 586 53 49     fax: (+386 1) 586 52 70
Index: bits/std_cmath.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/std_cmath.h,v
retrieving revision 1.4
diff -c -p -r1.4 std_cmath.h
*** std_cmath.h	2000/06/06 20:26:13	1.4
--- std_cmath.h	2000/06/13 12:45:51
*************** namespace std {
*** 168,177 ****
        { return ::floor(static_cast<double>(__x)); }
  #endif
  
! #if _GLIBCPP_HAVE_BUILTIN_FMODFF
      inline float fmod(float __x, float __y)
        { return __builtin_fmodf(__x, __y); }
! #elif _GLIBCPP_HAVE_FMODFF
      inline float fmod(float __x, float __y)
        { return ::fmodf(__x, __y); }
  #else
--- 168,177 ----
        { return ::floor(static_cast<double>(__x)); }
  #endif
  
! #if _GLIBCPP_HAVE_BUILTIN_FMODF
      inline float fmod(float __x, float __y)
        { return __builtin_fmodf(__x, __y); }
! #elif _GLIBCPP_HAVE_FMODF
      inline float fmod(float __x, float __y)
        { return ::fmodf(__x, __y); }
  #else
*************** namespace std {
*** 223,239 ****
        { return ::log10(static_cast<double>(__x)); }
  #endif
  
! #if _GLIBCPP_HAVE_BUILTIN_MODF
      inline float modf(float __x, float* __iptr)
        { return __builtin_modff(__x, __iptr); }
! #elif _GLIBCPP_HAVE_MODF
      inline float modf(float __x, float* __iptr)
        { return ::modff(__x, __iptr); }
  #else
      inline float modf(float __x, float* __iptr)
      {
         double __tmp;
!        double __res = _C_legacy::modf(static_cast<double>(__x), &__tmp);
         *__iptr = static_cast<float> (__tmp);
         return __res;
      }
--- 223,239 ----
        { return ::log10(static_cast<double>(__x)); }
  #endif
  
! #if _GLIBCPP_HAVE_BUILTIN_MODFF
      inline float modf(float __x, float* __iptr)
        { return __builtin_modff(__x, __iptr); }
! #elif _GLIBCPP_HAVE_MODFF
      inline float modf(float __x, float* __iptr)
        { return ::modff(__x, __iptr); }
  #else
      inline float modf(float __x, float* __iptr)
      {
         double __tmp;
!        double __res = ::modf(static_cast<double>(__x), &__tmp);
         *__iptr = static_cast<float> (__tmp);
         return __res;
      }


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