aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/x86_64
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/x86_64')
-rw-r--r--sysdeps/x86_64/fpu/e_log10l.S8
-rw-r--r--sysdeps/x86_64/fpu/libm-test-ulps24
2 files changed, 31 insertions, 1 deletions
diff --git a/sysdeps/x86_64/fpu/e_log10l.S b/sysdeps/x86_64/fpu/e_log10l.S
index 6c07024..2607ad1 100644
--- a/sysdeps/x86_64/fpu/e_log10l.S
+++ b/sysdeps/x86_64/fpu/e_log10l.S
@@ -46,7 +46,13 @@ ENTRY(__ieee754_log10l)
fnstsw // x-1 : x : log10(2)
andb $0x45, %ah
jz 2f
- fstp %st(1) // x-1 : log10(2)
+ fxam
+ fnstsw
+ andb $0x45, %ah
+ cmpb $0x40, %ah
+ jne 5f
+ fabs // log10(1) is +0 in all rounding modes.
+5: fstp %st(1) // x-1 : log10(2)
fyl2xp1 // log10(x)
ret
diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps
index d472876..bb549d2 100644
--- a/sysdeps/x86_64/fpu/libm-test-ulps
+++ b/sysdeps/x86_64/fpu/libm-test-ulps
@@ -1611,6 +1611,30 @@ ifloat: 2
ildouble: 1
ldouble: 1
+Function: "log10_downward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log10_towardzero":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
+Function: "log10_upward":
+double: 1
+float: 1
+idouble: 1
+ifloat: 1
+ildouble: 1
+ldouble: 1
+
Function: "log1p":
float: 1
ifloat: 1