Bug 18248 - missing underflow for subnormal inputs in sin/sinh/tan/tanh/atanh/expm1/log1p/exp2
Summary: missing underflow for subnormal inputs in sin/sinh/tan/tanh/atanh/expm1/log1...
Status: RESOLVED DUPLICATE of bug 16339
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-04-10 13:11 UTC by Szabolcs Nagy
Modified: 2015-04-20 07:39 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
underflow tests (383 bytes, text/x-csrc)
2015-04-10 13:11 UTC, Szabolcs Nagy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Szabolcs Nagy 2015-04-10 13:11:18 UTC
Created attachment 8238 [details]
underflow tests

some functions don't raise the underflow flag for subnormal inputs (even though the result is inexact subnormal)

attach code on x86_64 gives:

sin(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
sin(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
sinl(0x1p-16400L) = 0x0.0002p-16385 = 1.28254e-4937 did not underflow
sinl(-0x1p-16400L) = -0x0.0002p-16385 = -1.28254e-4937 did not underflow
sinh(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
sinh(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
sinhf(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
sinhf(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
sinhl(0x1p-16400L) = 0x0.0002p-16385 = 1.28254e-4937 did not underflow
sinhl(-0x1p-16400L) = -0x0.0002p-16385 = -1.28254e-4937 did not underflow
tan(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
tan(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
tanf(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
tanf(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
tanl(0x1p-16400L) = 0x0.0002p-16385 = 1.28254e-4937 did not underflow
tanl(-0x1p-16400L) = -0x0.0002p-16385 = -1.28254e-4937 did not underflow
tanh(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
tanh(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
tanhf(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
tanhf(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
tanhl(0x1p-16400L) = 0x0.0002p-16385 = 1.28254e-4937 did not underflow
tanhl(-0x1p-16400L) = -0x0.0002p-16385 = -1.28254e-4937 did not underflow
atanh(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
atanh(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
atanhf(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
atanhf(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
atanhl(0x1p-16400L) = 0x0.0002p-16385 = 1.28254e-4937 did not underflow
atanhl(-0x1p-16400L) = -0x0.0002p-16385 = -1.28254e-4937 did not underflow
expm1(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
expm1(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
expm1f(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
expm1f(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
log1p(0x1p-1030) = 0x8p-1033 = 8.69169e-311 did not underflow
log1p(-0x1p-1030) = -0x8p-1033 = -8.69169e-311 did not underflow
log1pf(0x1p-130f) = 0x8p-133 = 7.34684e-40 did not underflow
log1pf(-0x1p-130f) = -0x8p-133 = -7.34684e-40 did not underflow
exp2l(-16382.5) = 0x5.a827999fcef3242p-16385 = 2.37737e-4932 did not underflow


on aarch64 it gives:

sin(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
sin(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
sinf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
sinf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
sinl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
sinl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
sinh(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
sinh(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
sinhf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
sinhf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
sinhl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
sinhl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
tan(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
tan(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
tanf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
tanf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
tanl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
tanl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
tanh(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
tanh(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
tanhf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
tanhf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
tanhl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
tanhl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
atanh(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
atanh(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
atanhf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
atanhf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
atanhl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
atanhl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
expm1(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
expm1(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
expm1f(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
expm1f(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
log1p(0x1p-1030) = 0x1p-1030 = 8.69169e-311 did not underflow
log1p(-0x1p-1030) = -0x1p-1030 = -8.69169e-311 did not underflow
log1pf(0x1p-130f) = 0x1p-130 = 7.34684e-40 did not underflow
log1pf(-0x1p-130f) = -0x1p-130 = -7.34684e-40 did not underflow
log1pl(0x1p-16400L) = 0x0.00004p-16382 = 1.28254e-4937 did not underflow
log1pl(-0x1p-16400L) = -0x0.00004p-16382 = -1.28254e-4937 did not underflow
Comment 1 Joseph Myers 2015-04-10 16:43:48 UTC
Omnibus reports for lots of unrelated functions are unhelpful.  This is a duplicate of 16538 (sin), 16519 (sinh), 16517 (tan), 16520 (tanh), 16352 (atanh), 16353 (expm1), 16339 (log1p), 16521 (exp2).

*** This bug has been marked as a duplicate of bug 16339 ***