Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151769315
D28870.id84476.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1010 B
Referenced Files
None
Subscribers
None
D28870.id84476.diff
View Options
Index: lib/msun/ld128/s_logl.c
===================================================================
--- lib/msun/ld128/s_logl.c
+++ lib/msun/ld128/s_logl.c
@@ -29,6 +29,8 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include <fenv.h>
+
/**
* Implementation of the natural logarithm of x for 128-bit format.
*
@@ -469,9 +471,11 @@
if (hx == 0 || hx >= 0x8000) { /* zero, negative or subnormal? */
if (((hx & 0x7fff) | lx | llx) == 0)
RETURN1(rp, -1 / zero); /* log(+-0) = -Inf */
- if (hx != 0)
+ if (hx != 0) {
+ feraiseexcept(FE_INVALID);
/* log(neg or NaN) = qNaN: */
RETURN1(rp, (x - x) / zero);
+ }
x *= 0x1.0p113; /* subnormal; scale up x */
EXTRACT_LDBL128_WORDS(hx, lx, llx, x);
k = -16383 - 113;
@@ -581,6 +585,7 @@
if (ax == 0x3fff && (lx | llx) == 0)
RETURNP(-1 / zero); /* log1p(-1) = -Inf */
/* log1p(x < 1, or x NaN) = qNaN: */
+ feraiseexcept(FE_INVALID);
RETURNP((x - x) / (x - x));
}
if (ax <= 0x3f8d) { /* |x| < 2**-113 */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 11, 1:20 PM (3 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31250408
Default Alt Text
D28870.id84476.diff (1010 B)
Attached To
Mode
D28870: Raise FE_INVALID for invalid log() calls on ld128 platforms
Attached
Detach File
Event Timeline
Log In to Comment