Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/lib/libm/src Pull up following revision(s) (requested by ...
details: https://anonhg.NetBSD.org/src/rev/ed70671e6d53
branches: netbsd-7
changeset: 799834:ed70671e6d53
user: martin <martin%NetBSD.org@localhost>
date: Sun Mar 06 18:00:07 2016 +0000
description:
Pull up following revision(s) (requested by gson in ticket #1120):
lib/libm/src/e_hypotf.c: revision 1.10
Fix incorrect magic numbers in scaling. From FreeBSD commit 23397, by
way of Rin Okuyama. Fixes PR lib/50698.
diffstat:
lib/libm/src/e_hypotf.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r bb24a82df175 -r ed70671e6d53 lib/libm/src/e_hypotf.c
--- a/lib/libm/src/e_hypotf.c Sun Mar 06 17:58:22 2016 +0000
+++ b/lib/libm/src/e_hypotf.c Sun Mar 06 18:00:07 2016 +0000
@@ -15,7 +15,7 @@
#include <sys/cdefs.h>
#if defined(LIBM_SCCS) && !defined(lint)
-__RCSID("$NetBSD: e_hypotf.c,v 1.9 2008/04/25 22:21:53 christos Exp $");
+__RCSID("$NetBSD: e_hypotf.c,v 1.9.40.1 2016/03/06 18:00:07 martin Exp $");
#endif
#include "math.h"
@@ -43,22 +43,22 @@
if(hb == 0x7f800000) w = b;
return w;
}
- /* scale a and b by 2**-60 */
- ha -= 0x5d800000; hb -= 0x5d800000; k += 60;
+ /* scale a and b by 2**-68 */
+ ha -= 0x22000000; hb -= 0x22000000; k += 68;
SET_FLOAT_WORD(a,ha);
SET_FLOAT_WORD(b,hb);
}
if(hb < 0x26800000) { /* b < 2**-50 */
if(hb <= 0x007fffff) { /* subnormal b or 0 */
if(hb==0) return a;
- SET_FLOAT_WORD(t1,0x3f000000); /* t1=2^126 */
+ SET_FLOAT_WORD(t1,0x7e800000); /* t1=2^126 */
b *= t1;
a *= t1;
k -= 126;
- } else { /* scale a and b by 2^60 */
- ha += 0x5d800000; /* a *= 2^60 */
- hb += 0x5d800000; /* b *= 2^60 */
- k -= 60;
+ } else { /* scale a and b by 2^68 */
+ ha += 0x22000000; /* a *= 2^68 */
+ hb += 0x22000000; /* b *= 2^68 */
+ k -= 68;
SET_FLOAT_WORD(a,ha);
SET_FLOAT_WORD(b,hb);
}
Home |
Main Index |
Thread Index |
Old Index