svn commit: r251328 - head/lib/msun/ld80
Steve Kargl
kargl at FreeBSD.org
Mon Jun 3 18:07:05 UTC 2013
Author: kargl
Date: Mon Jun 3 18:07:04 2013
New Revision: 251328
URL: http://svnweb.freebsd.org/changeset/base/251328
Log:
Add a u suffix to the IEEEl2bits unions o_threshold and u_threshold,
and use macros to access the e component of the unions. This allows
the portions of the code in ld80 to be identical to the ld128 code.
Obtained from: bde
Modified:
head/lib/msun/ld80/s_expl.c
Modified: head/lib/msun/ld80/s_expl.c
==============================================================================
--- head/lib/msun/ld80/s_expl.c Mon Jun 3 17:51:08 2013 (r251327)
+++ head/lib/msun/ld80/s_expl.c Mon Jun 3 18:07:04 2013 (r251328)
@@ -61,9 +61,12 @@ static volatile const long double tiny =
static const union IEEEl2bits
/* log(2**16384 - 0.5) rounded towards zero: */
-o_threshold = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L),
+/* log(2**16384 - 0.5 + 1) rounded towards zero for expm1l() is the same: */
+o_thresholdu = LD80C(0xb17217f7d1cf79ab, 13, 11356.5234062941439488L),
+#define o_threshold (o_thresholdu.e)
/* log(2**(-16381-64-1)) rounded towards zero: */
-u_threshold = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L);
+u_thresholdu = LD80C(0xb21dfe7f09e2baa9, 13, -11399.4985314888605581L);
+#define u_threshold (u_thresholdu.e)
static const double
/*
@@ -246,9 +249,9 @@ expl(long double x)
return (0.0L); /* x is -Inf */
return (x + x); /* x is +Inf, NaN or unsupported */
}
- if (x > o_threshold.e)
+ if (x > o_threshold)
return (huge * huge);
- if (x < u_threshold.e)
+ if (x < u_threshold)
return (tiny * tiny);
} else if (ix < BIAS - 66) { /* |x| < 0x1p-66 */
/* includes pseudo-denormals */
More information about the svn-src-all
mailing list