shibatch/sleef

FP64 tan_u10 returns wrong sign for input `-0x1p-1074`

ebavier opened this issue · 0 comments

As a special case of #465, Sleef_tan_u10 returns positive 0.0 for input -0x1p-1074. In addition to this result being greater than 1.0 ulp in error, it also has the wrong sign.

The attached tan-test-2.zip contains a reproducer, whose output is:

tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
tan_10(-0x0.0000000000001p-1022) = 0x0.0000000000000p+0
MPFR faithful results = -0x0.0000000000002p-1022, -0x0.0000000000001p-1022