From: Ruinland ChuanTzu Tsai <ruinland@andestech.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: In libm, sin(qNaN) doesn't expect FE_INVALID ?
Date: Thu, 10 Sep 2020 21:49:01 +0800 [thread overview]
Message-ID: <20200910134901.GA14099@APC301.andestech.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2009081459380.8874@digraph.polyomino.org.uk>
Hi Dr. Myers,
thanks again for your detailed letter :-)
If you could bear with a little more, I have a final quetsion and would
like to have someone to discuss with - -
I'm a little bit confused by the implementation of ULPDIFF() inside
`math/libm-test-support.c` which is :
```
#define ULPDIFF(given, expected) \ (FUNC(fabs) ((given) - (expected)) / ulp (expected)
```
and it looks _not_ really the same as the formula inside glibc's docu-
mentation [1] :
` |d.d...d - (z / 2^e)| / 2^(p - 1) `
( For a number z with the representation d.d…d·2^e and p is the number
of bits in the mantissa of the floating-point number representation. )
The denominator part of these two seems to have different meaning ?
Besides this issue, I would like to know that is there any written
policy for loosening or tightening the ULPs for mathematic functions ?
For instance, the libm-test-ulps for i386 has varied several times.
Yet I cannot find concrete discussions about making the precission
check either more strict or tolerant.
And if someone is introducing a new platform to glibc, are there any
rules to regulate ? e.g. "ccosh" mustn't have a ulp more than ......
Really appreciate your kindness,
Ruinland ChuanTzu Tsai
[1] https://www.gnu.org/software/libc/manual/html_node/Errors-in-Math-Functions.html
next prev parent reply other threads:[~2020-09-10 13:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-03 12:34 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 [this message]
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=20200910134901.GA14099@APC301.andestech.com \
--to=ruinland@andestech.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
/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).