Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F161383826
D28786.id84255.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D28786.id84255.diff
View Options
Index: lib/msun/ld80/s_logl.c
===================================================================
--- lib/msun/ld80/s_logl.c
+++ lib/msun/ld80/s_logl.c
@@ -694,6 +694,16 @@
_2sumF(r.hi, r.lo);
hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
+ if (lo == 0.0) {
+ /*
+ * Avoid FE_INEXACT for log10l(1.0) caused by
+ * (invln10_lo + invln10_10i) if lo is zero.
+ * Note: For log10l(1.0) hi is also 0 so we could probably
+ * special case 1.0, but we might as well avoid this multiply
+ * for other cases too.
+ */
+ RETURN2PI(invln10_hi * hi, invln10_lo * hi);
+ }
RETURN2PI(invln10_hi * hi,
(invln10_lo + invln10_hi) * lo + invln10_lo * hi);
}
@@ -712,6 +722,16 @@
_2sumF(r.hi, r.lo);
hi = (float)r.hi;
lo = r.lo + (r.hi - hi);
+ if (lo == 0.0) {
+ /*
+ * Avoid FE_INEXACT for log2l(1.0) caused by
+ * (invln2_lo + invln2_hi) if lo is zero.
+ * Note: For log2l(1.0) hi is also 0 so we could probably
+ * special case 1.0, but we might as well avoid this multiply
+ * for other cases too.
+ */
+ RETURN2PI(invln2_hi * hi, invln2_lo * hi);
+ }
RETURN2PI(invln2_hi * hi,
(invln2_lo + invln2_hi) * lo + invln2_lo * hi);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jul 4, 7:35 AM (8 h, 19 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34635387
Default Alt Text
D28786.id84255.diff (1 KB)
Attached To
Mode
D28786: lib/msun: Avoid FE_INEXACT for x86 log2l/log10l
Attached
Detach File
Event Timeline
Log In to Comment