From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8893 invoked by alias); 27 Sep 2004 23:28:45 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 8877 invoked from network); 27 Sep 2004 23:28:45 -0000 Received: from unknown (HELO sunsite.ms.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 27 Sep 2004 23:28:45 -0000 Received: from sunsite.ms.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8) with ESMTP id i8RNSD3j020127; Tue, 28 Sep 2004 01:28:13 +0200 Received: (from jakub@localhost) by sunsite.ms.mff.cuni.cz (8.12.8/8.12.8/Submit) id i8RNSDGD020125; Tue, 28 Sep 2004 01:28:13 +0200 Date: Mon, 27 Sep 2004 23:28:00 -0000 From: Jakub Jelinek To: Ulrich Drepper Cc: Glibc hackers Subject: [PATCH] Some more fdim* fixes Message-ID: <20040927232813.GS30497@sunsite.ms.mff.cuni.cz> Reply-To: Jakub Jelinek Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.1i X-SW-Source: 2004-09/txt/msg00108.txt.bz2 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 * 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