+2014-03-21 Joseph Myers <joseph@codesourcery.com>
+
+ [BZ #16731]
+ * sysdeps/i386/fpu/e_log.S (__ieee754_log): Take absolute value
+ when x - 1 is zero.
+ * sysdeps/i386/fpu/e_logf.S (__ieee754_logf): Likewise.
+ * sysdeps/i386/fpu/e_logl.S (__ieee754_logl): Likewise.
+ * sysdeps/i386/i686/fpu/e_logl.S (__ieee754_logl): Likewise.
+ * sysdeps/ieee754/dbl-64/e_log.c (__ieee754_log): Return +0 when
+ argument is 1.
+ * sysdeps/ieee754/ldbl-128/e_logl.c (__ieee754_logl): Likewise.
+ * sysdeps/x86_64/fpu/e_logl.S: Take absolute value when x - 1 is
+ zero.
+ * math/libm-test.inc (log_test): Use ALL_RM_TEST.
+ * sysdeps/i386/fpu/libm-test-ulps: Update.
+ * sysdeps/x86_64/fpu/libm-test-ulps: Likewise.
+
2014-03-21 Siddhesh Poyarekar <siddhesh@redhat.com>
* scripts/bench.pl: Remove file.
15347, 15804, 15894, 16447, 16532, 16545, 16574, 16600, 16609, 16610,
16611, 16613, 16623, 16632, 16639, 16642, 16649, 16670, 16674, 16677,
- 16680, 16683, 16689, 16695, 16701, 16706, 16707.
+ 16680, 16683, 16689, 16695, 16701, 16706, 16707, 16731.
* Running the testsuite no longer terminates as soon as a test fails.
Instead, a file tests.sum (xtests.sum from "make xcheck") is generated,
static void
log_test (void)
{
- START (log, 0);
- RUN_TEST_LOOP_f_f (log, log_test_data, );
- END;
+ ALL_RM_TEST (log, 0, log_test_data, RUN_TEST_LOOP_f_f, END);
}
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2f
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 5f
+ fabs // log(1) is +0 in all rounding modes.
+5: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2f
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 5f
+ fabs // log(1) is +0 in all rounding modes.
+5: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2f
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 5f
+ fabs // log(1) is +0 in all rounding modes.
+5: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
ildouble: 1
ldouble: 1
+Function: "log_downward":
+ildouble: 1
+ldouble: 1
+
+Function: "log_towardzero":
+ildouble: 1
+ldouble: 1
+
+Function: "log_upward":
+ildouble: 1
+ldouble: 1
+
Function: "pow":
ildouble: 1
ldouble: 1
fcomip %st(1) // |x-1| : x-1 : x : log(2)
fstp %st(0) // x-1 : x : log(2)
jc 2f
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 4f
+ fabs // log(1) is +0 in all rounding modes.
+4: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
if (__glibc_likely (ABS (w) > U03))
goto case_03;
+ /* log (1) is +0 in all rounding modes. */
+ if (w == 0.0)
+ return 0.0;
+
/*--- Stage I, the case abs(x-1) < 0.03 */
t8 = MHALF * w;
/* On this interval the table is not used due to cancellation error. */
if ((x <= 1.0078125L) && (x >= 0.9921875L))
{
+ if (x == 1.0L)
+ return 0.0L;
z = x - 1.0L;
k = 64;
t.value = 1.0L;
fnstsw // x-1 : x : log(2)
andb $0x45, %ah
jz 2f
- fstp %st(1) // x-1 : log(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 5f
+ fabs // log(1) is +0 in all rounding modes.
+5: fstp %st(1) // x-1 : log(2)
fyl2xp1 // log(x)
ret
ildouble: 1
ldouble: 1
+Function: "log_downward":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log_towardzero":
+ildouble: 1
+ldouble: 1
+
+Function: "log_upward":
+float: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
Function: "pow":
float: 1
ifloat: 1