Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108622230
D28786.id85319.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D28786.id85319.diff
View Options
diff --git a/lib/msun/ld128/s_logl.c b/lib/msun/ld128/s_logl.c
--- a/lib/msun/ld128/s_logl.c
+++ b/lib/msun/ld128/s_logl.c
@@ -697,14 +697,15 @@
invln2_hi = 1.4426950402557850e0; /* 0x17154765000000.0p-52 */
static const long double
invln10_lo = 1.41498268538580090791605082294397000e-10L, /* 0x137287195355baaafad33dc323ee3.0p-145L */
-invln2_lo = 6.33178418956604368501892137426645911e-10L; /* 0x15c17f0bbbe87fed0691d3e88eb57.0p-143L */
+invln2_lo = 6.33178418956604368501892137426645911e-10L, /* 0x15c17f0bbbe87fed0691d3e88eb57.0p-143L */
+invln10_lo_plus_hi = invln10_lo + invln10_hi,
+invln2_lo_plus_hi = invln2_lo + invln2_hi;
long double
log10l(long double x)
{
struct ld r;
- long double lo;
- float hi;
+ long double hi, lo;
ENTERI();
DOPRINT_START(&x);
@@ -712,18 +713,17 @@
if (!r.lo_set)
RETURNPI(r.hi);
_2sumF(r.hi, r.lo);
- hi = r.hi;
+ hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
RETURN2PI(invln10_hi * hi,
- (invln10_lo + invln10_hi) * lo + invln10_lo * hi);
+ invln10_lo_plus_hi * lo + invln10_lo * hi);
}
long double
log2l(long double x)
{
struct ld r;
- long double lo;
- float hi;
+ long double hi, lo;
ENTERI();
DOPRINT_START(&x);
@@ -731,10 +731,10 @@
if (!r.lo_set)
RETURNPI(r.hi);
_2sumF(r.hi, r.lo);
- hi = r.hi;
+ hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
RETURN2PI(invln2_hi * hi,
- (invln2_lo + invln2_hi) * lo + invln2_lo * hi);
+ invln2_lo_plus_hi * lo + invln2_lo * hi);
}
#endif /* STRUCT_RETURN */
diff --git a/lib/msun/ld80/s_logl.c b/lib/msun/ld80/s_logl.c
--- a/lib/msun/ld80/s_logl.c
+++ b/lib/msun/ld80/s_logl.c
@@ -677,8 +677,11 @@
static const double
invln10_hi = 4.3429448190317999e-1, /* 0x1bcb7b1526e000.0p-54 */
invln10_lo = 7.1842412889749798e-14, /* 0x1438ca9aadd558.0p-96 */
+invln10_lo_plus_hi = invln10_lo + invln10_hi,
invln2_hi = 1.4426950408887933e0, /* 0x171547652b8000.0p-52 */
-invln2_lo = 1.7010652264631490e-13; /* 0x17f0bbbe87fed0.0p-95 */
+invln2_lo = 1.7010652264631490e-13, /* 0x17f0bbbe87fed0.0p-95 */
+invln2_lo_plus_hi = invln2_lo + invln2_hi;
+
long double
log10l(long double x)
@@ -695,7 +698,7 @@
hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
RETURN2PI(invln10_hi * hi,
- (invln10_lo + invln10_hi) * lo + invln10_lo * hi);
+ invln10_lo_plus_hi * lo + invln10_lo * hi);
}
long double
@@ -713,7 +716,7 @@
hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
RETURN2PI(invln2_hi * hi,
- (invln2_lo + invln2_hi) * lo + invln2_lo * hi);
+ invln2_lo_plus_hi * lo + invln2_lo * hi);
}
#endif /* STRUCT_RETURN */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 10:59 PM (9 h, 5 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16187840
Default Alt Text
D28786.id85319.diff (2 KB)
Attached To
Mode
D28786: lib/msun: Avoid FE_INEXACT for x86 log2l/log10l
Attached
Detach File
Event Timeline
Log In to Comment