public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* In libm, sin(qNaN) doesn't expect FE_INVALID ?
@ 2020-09-03 12:34 Ruinland ChuanTzu Tsai
  2020-09-03 13:19 ` Adhemerval Zanella
  2020-09-03 17:03 ` Joseph Myers
  0 siblings, 2 replies; 7+ messages in thread
From: Ruinland ChuanTzu Tsai @ 2020-09-03 12:34 UTC (permalink / raw)
  To: libc-alpha; +Cc: tesheng

Hi all,
sorry for the bothering.

Recently, as I'm testing some modification on libm, I happen to realize
the fact that glibc's testsutie doesn't expect sin(+-qNaN) to trigger
FE_INVALID, which is designed in `math/libm-test-sin.inc` :

TEST_f_f (sin, qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED)
TEST_f_f (sin, -qnan_value, qnan_value, NO_INEXACT_EXCEPTION|ERRNO_UNCHANGED)

Yet I think that if the program issued sin(qNaN), it should be okay to
be given an invalid operation excpetion. 

If that's the case, then appending `INVALID_EXCEPTION_OK` to the
expected exception list of sin(qNaN) and sin(-qNaN) should be benign.

Though I'm neither an expert on libm nor IEEE standards, I'm wondering
will there be any concern of such behavior ( raising FE_INVALID on
sin(+-qNaN) ) ?

Sincerely,
Ruinland

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-09-10 15:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 12:34 In libm, sin(qNaN) doesn't expect FE_INVALID ? Ruinland ChuanTzu Tsai
2020-09-03 13:19 ` Adhemerval Zanella
2020-09-03 17:03 ` Joseph Myers
2020-09-08 11:02   ` Ruinland ChuanTzu Tsai
2020-09-08 15:06     ` Joseph Myers
2020-09-10 13:49       ` Ruinland ChuanTzu Tsai
2020-09-10 15:26         ` Joseph Myers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).