public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <josmyers@redhat.com>
To: Vincent Lefevre <vincent@vinc17.net>
Cc: libc-alpha@sourceware.org
Subject: Re: document the fact that "Known Maximum Errors" might not be maximal
Date: Fri, 16 Feb 2024 17:32:00 +0000 (UTC)	[thread overview]
Message-ID: <f4fb75e-b9c1-f9ec-7343-a2918b1d81f0@redhat.com> (raw)
In-Reply-To: <20240216123950.GC3653@qaa.vinc17.org>

On Fri, 16 Feb 2024, Vincent Lefevre wrote:

> If I understand correctly, the *intent* is to give an error bounded
> by 3 ulp, i.e. an error up to 3 ulp is not something that the user
> should expect to be "fixed".

The intent is that the functions should be both "accurate" (where more 
details of the precise goals are given in the manual - see the first 
several paragraphs of the "Errors in Math Functions" section) and "fast".

3 ulp isn't a specific intent.  The testsuite always treats any error 
above 9 ulp (16 ulp for IBM long double) as a bug.  In practice I think 
it's likely that most or all of the functions with errors above 1 ulp for 
round-to-nearest could be improved (other than for IBM long double) to 
have errors of at most 1 ulp without making them any slower, using better 
implementations.  (The definition of ulp used by the testsuite and the 
table in the manual compares to the correctly rounded result, *not* to the 
mathematically precise result.  So fractional ulp values are not possible, 
except for the special case where the result returned by the function has 
a lower exponent than the correctly rounded result.)

(The main cases that would be genuinely hard to get down to low errors for 
all arguments are the cpow, jn and yn functions.)

-- 
Joseph S. Myers
josmyers@redhat.com


  reply	other threads:[~2024-02-16 17:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16  8:48 Paul Zimmermann
2024-02-16  9:43 ` Vincent Lefevre
2024-02-16 10:02   ` Paul Zimmermann
2024-02-16 10:22     ` Vincent Lefevre
2024-02-16 10:54       ` Paul Zimmermann
2024-02-16 12:39         ` Vincent Lefevre
2024-02-16 17:32           ` Joseph Myers [this message]
2024-02-16 17:22   ` 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=f4fb75e-b9c1-f9ec-7343-a2918b1d81f0@redhat.com \
    --to=josmyers@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=vincent@vinc17.net \
    /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).