This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Some more fdim* fixes


Hi!

In addition to this sysdeps/i386/fpu/s_fdim*.S will need changing, but
I'm too tired now.

2004-09-28  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/alpha/fpu/bits/mathinline.h (__fdimf, __fdim, fdimf, fdim):
	Handle +inf/+inf.
	* sysdeps/powerpc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.
	* sysdeps/sparc/fpu/bits/mathinline.h (fdim, fdimf): Likewise.

--- libc/sysdeps/alpha/fpu/bits/mathinline.h.jj	2004-09-14 00:32:56.000000000 +0200
+++ libc/sysdeps/alpha/fpu/bits/mathinline.h	2004-09-28 01:13:07.758804136 +0200
@@ -149,25 +149,25 @@ __MATH_INLINE double __NTH (floor (doubl
 __MATH_INLINE float
 __NTH (__fdimf (float __x, float __y))
 {
-  return __x < __y ? 0.0f : __x - __y;
+  return __x <= __y ? 0.0f : __x - __y;
 }
 
 __MATH_INLINE float
 __NTH (fdimf (float __x, float __y))
 {
-  return __x < __y ? 0.0f : __x - __y;
+  return __x <= __y ? 0.0f : __x - __y;
 }
 
 __MATH_INLINE double
 __NTH (__fdim (double __x, double __y))
 {
-  return __x < __y ? 0.0 : __x - __y;
+  return __x <= __y ? 0.0 : __x - __y;
 }
 
 __MATH_INLINE double
 __NTH (fdim (double __x, double __y))
 {
-  return __x < __y ? 0.0 : __x - __y;
+  return __x <= __y ? 0.0 : __x - __y;
 }
 
 /* Test for negative number.  Used in the signbit() macro.  */
--- libc/sysdeps/powerpc/fpu/bits/mathinline.h.jj	2004-09-14 00:33:00.000000000 +0200
+++ libc/sysdeps/powerpc/fpu/bits/mathinline.h	2004-09-28 01:13:45.405114561 +0200
@@ -109,14 +109,14 @@ __MATH_INLINE double fdim (double __x, d
 __MATH_INLINE double
 __NTH (fdim (double __x, double __y))
 {
-  return __x < __y ? 0 : __x - __y;
+  return __x <= __y ? 0 : __x - __y;
 }
 
 __MATH_INLINE float fdimf (float __x, float __y) __THROW;
 __MATH_INLINE float
 __NTH (fdimf (float __x, float __y))
 {
-  return __x < __y ? 0 : __x - __y;
+  return __x <= __y ? 0 : __x - __y;
 }
 
 #endif /* __USE_ISOC99 */
--- libc/sysdeps/sparc/fpu/bits/mathinline.h.jj	2004-08-04 14:42:26.000000000 +0200
+++ libc/sysdeps/sparc/fpu/bits/mathinline.h	2004-09-28 01:14:31.346950890 +0200
@@ -223,14 +223,14 @@ __MATH_INLINE double fdim (double __x, d
 __MATH_INLINE double
 fdim (double __x, double __y) __THROW
 {
-  return __x < __y ? 0 : __x - __y;
+  return __x <= __y ? 0 : __x - __y;
 }
 
 __MATH_INLINE float fdimf (float __x, float __y) __THROW;
 __MATH_INLINE float
 fdimf (float __x, float __y) __THROW
 {
-  return __x < __y ? 0 : __x - __y;
+  return __x <= __y ? 0 : __x - __y;
 }
 
 #  endif /* !__NO_MATH_INLINES */

	Jakub


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