public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Ruinland ChuanTzu Tsai <ruinland@andestech.com>
To: <libc-alpha@sourceware.org>
Cc: <tesheng@andestech.com>
Subject: In libm, sin(qNaN) doesn't expect FE_INVALID ?
Date: Thu, 3 Sep 2020 20:34:42 +0800	[thread overview]
Message-ID: <20200903123442.GA5266@APC301.andestech.com> (raw)

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

             reply	other threads:[~2020-09-03 12:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-03 12:34 Ruinland ChuanTzu Tsai [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200903123442.GA5266@APC301.andestech.com \
    --to=ruinland@andestech.com \
    --cc=libc-alpha@sourceware.org \
    --cc=tesheng@andestech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).