public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: Michael Morrell <mmorrell@tachyum.com>
Cc: Paul Zimmermann <Paul.Zimmermann@inria.fr>,
	"libc-alpha@sourceware.org" <libc-alpha@sourceware.org>
Subject: RE: Fix the inaccuracy of j0f/y0f/j1f/y1f
Date: Tue, 23 Feb 2021 19:34:16 +0000	[thread overview]
Message-ID: <alpine.DEB.2.22.394.2102231928350.274617@digraph.polyomino.org.uk> (raw)
In-Reply-To: <2b47fb0947b34fcb9c963cb46b453876@tachyum.com>

On Tue, 23 Feb 2021, Michael Morrell wrote:

> Paul,
> 
> You state that the IEEE 754 standard doesn't require correct rounding, 
> but I don't see where it says that.  I see Section 9.2 ("Additional 
> mathematical operations") and the list in Table 9.1 which seems to 
> include most of the math functions in glibc (I notice that the Bessel 
> functions like y0 aren't included) and these all must be correctly 
> rounded.  I agree that a language may choose not to define all of the 
> operations in 9.1, but that doesn't seem to give it the right to 
> implement the function inaccurately.

If you look at the current C2x draft N2596, 5.2.4.2.2 paragraph 8 says 
that the accuracy of the library functions is implementation-defined.  
Annex F says how C operations relate to operations defined in IEEE 754; 
the table in F.3 paragraph 1 includes an entry for sqrt, for example, so 
that corresponds to the IEEE squareRoot operation, but doesn't include 
most of the math.h functions; paragraph 20 gives the mapping for other 
functions and says that correct rounding is not required.

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2021-02-23 19:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  9:02 Paul Zimmermann
2021-02-19 16:44 ` Michael Morrell
2021-02-19 21:15   ` Joseph Myers
2021-02-21  7:37   ` Paul Zimmermann
2021-02-23 19:07     ` Michael Morrell
2021-02-23 19:34       ` Joseph Myers [this message]
2021-02-24 18:59 ` Adhemerval Zanella
2021-02-25 10:27   ` Paul Zimmermann
2021-02-25 11:24     ` Adhemerval Zanella
2021-02-26  6:40       ` Paul Zimmermann

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=alpine.DEB.2.22.394.2102231928350.274617@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=Paul.Zimmermann@inria.fr \
    --cc=libc-alpha@sourceware.org \
    --cc=mmorrell@tachyum.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).