public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Some more fdim* fixes
@ 2004-09-27 23:28 Jakub Jelinek
  0 siblings, 0 replies; only message in thread
From: Jakub Jelinek @ 2004-09-27 23:28 UTC (permalink / raw)
  To: Ulrich Drepper; +Cc: Glibc hackers

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-09-27 23:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 23:28 [PATCH] Some more fdim* fixes Jakub Jelinek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).