public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto <adhemerval.zanella@linaro.org>
To: Paul Zimmermann <Paul.Zimmermann@inria.fr>,
	Joseph Myers <josmyers@redhat.com>
Cc: libc-alpha@sourceware.org, vincenzo.innocente@cern.ch,
	riemannic@gmail.com, johnmather@sidefx.com
Subject: Re: Accuracy of Mathematical Functions
Date: Fri, 9 Aug 2024 09:54:37 -0300	[thread overview]
Message-ID: <ebcb5e08-0c56-4952-a107-c8b1872cf621@linaro.org> (raw)
In-Reply-To: <p9u01q2yyuua.fsf@coriandre.loria.fr>



On 09/08/24 05:16, Paul Zimmermann wrote:
>        Dear Joseph,
> 
>> Thanks.  Some further comments on the document (some of which I may have 
>> made before):
>>
>> * The bug referenced as a reason for not testing other rounding modes was 
>> fixed long ago, results in other rounding modes would be interesting as 
>> well (they would of course make the document longer), and worst-case 
>> inputs for other rounding modes would be worth adding to the glibc tests.
> 
> in the next update we'll point out that these disastrous results with
> other rounding modes were in the past. Surely results with other rounding modes
> would be interesting, volunteers to implement that are welcome!
> 
> I did a quick test with exp and GNU libc 2.40:
> 
>     -0x1.49f33ad2c1c58p+9,   /* GNU libc 0.510359 */
>     -0x1.9df9aecc00001p-29,  /* GNU libc RNDZ 1.24399 */
>     0x1.50f5a68c91c18p-1,    /* GNU libc RNDU 1.01597 */
>     -0x1.9df9aecc00001p-29,  /* GNU libc RNDD 1.24399 */
> 
>> * I don't think "dummy implementations" is a useful description for 
>> implementations that do actually implement the function (within a few 
>> ulp).  There are many possible ways to implement a function, including 
>> building on other functions, and those ones are optimized for getting the 
>> APIs into glibc for all supported formats rather than for speed or 
>> accuracy (and replacing by faster, more accurate implementations for 
>> particular formats is welcome).
> 
> agreed, maybe "trivial" would be more accurate. By the way, if one wants
> to replace say exp10m1f by a more accurate version, what are the steps to
> follow?

The exp10m1 should be easier because there is no arch-specific implementation.
I think it would be easier as add a sysdeps/ieee754/flt-32/s_exp10m1.c
one with the same semantics as the template one.  I can help you out if need.

> 
>> * As previously mentioned, I still think it would be of interest to see 
>> such data for complex functions (a function with one complex argument and 
>> a complex result is effectively two bivariate real functions.
> 
> we also got similar feedback for complex functions. Indeed I believe one might
> have surprises, even for basic operations since there is no standard. But
> again, time is limited, and volunteers are welcome! (This might be a different
> document, testing less libraries, and updated less often.)
> 
> Paul

  reply	other threads:[~2024-08-09 12:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-06 12:24 Paul Zimmermann
2024-08-06 15:27 ` Joseph Myers
2024-08-07 10:37   ` Paul Zimmermann
2024-08-08 16:35     ` Joseph Myers
2024-08-09  8:16       ` Paul Zimmermann
2024-08-09 12:54         ` Adhemerval Zanella Netto [this message]
2024-08-09 15:57           ` Joseph Myers
  -- strict thread matches above, loose matches on Subject: below --
2024-02-15 14:47 Paul Zimmermann
2023-09-21  7:11 Paul Zimmermann
2023-02-14  8:05 Paul Zimmermann
2022-08-29 10:41 Paul Zimmermann
2022-02-11  8:22 Paul Zimmermann
2022-02-11 18:23 ` Joseph Myers
2022-02-12  6:39   ` Paul Zimmermann
2022-02-15  1:52     ` Joseph Myers
2021-09-07 14:45 Paul Zimmermann
2021-02-05 10:35 accuracy of mathematical functions 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=ebcb5e08-0c56-4952-a107-c8b1872cf621@linaro.org \
    --to=adhemerval.zanella@linaro.org \
    --cc=Paul.Zimmermann@inria.fr \
    --cc=johnmather@sidefx.com \
    --cc=josmyers@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=riemannic@gmail.com \
    --cc=vincenzo.innocente@cern.ch \
    /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).