mailing list of musl libc
 help / color / mirror / code / Atom feed
From: enh <enh@google.com>
To: musl@lists.openwall.com
Cc: Rich Felker <dalias@libc.org>
Subject: Re: [musl] Re: integration of CORE-MATH routines into Musl?
Date: Tue, 6 Sep 2022 16:40:39 -0700	[thread overview]
Message-ID: <CAJgzZorHAt=FgHxhOoYG2T3egtLizZrozbGTzPu3kOUqro=MiA@mail.gmail.com> (raw)
In-Reply-To: <mw5yi2chn3.fsf@tomate.loria.fr>

[-- Attachment #1: Type: text/plain, Size: 1805 bytes --]

On Mon, Sep 5, 2022 at 2:09 AM Paul Zimmermann <Paul.Zimmermann@inria.fr>
wrote:

>        Dear Rich,
>
> > Could you summaraize briefly what you have in mind, and what tradeoffs
> > might be? Are these intended to be drop-in replacements for the
> > existing standard functions, or implementations for the "cr" versions
> > thereof? I have not followed closely the "mandatory requirement of
> > correct rounding for mathematical functions in the next revision of
> > the IEEE-754 standard" topic and how it relates to the future of C,
> > but my vague recollection was that the direction folks were leaning
> > was towards a separate set of cr*() functions or something.
>
> the current situation is:
>
> - IEEE 754 does not require correct rounding for mathematical functions
>
> - indeed, the C2X standard will reserve cr_xxx names for correctly rounded
>   functions
>
> - thus mathematical libraries will have essentially 3 choices:
>
> 0) either provide incorrectly rounded functions as (say) exp.
>    This is the current situation.
>
> 1) provide incorrectly rounded functions as exp, and correctly rounded
>    functions as cr_exp.
>
> 2) or provide only exp, with correct rounding (then cr_exp could be an
> alias
>    for exp)
>
> It seems that LLVM-libc will go for 2), I have no news from other
> libraries.
>

(fwiw, #2 is almost certainly what we'll do with bionic too.)


> > But if
> > it's possible to do correct rounding in a way that's all-wins
> > (performance, size, quality of results) or nearly all wins (maybe
> > slightly larger?), at least for select functions, that seems very
> > interesting.
>
> If you look at Table II from https://hal.inria.fr/hal-03721525, you see
> that
> for *single* precision functions (binary32), indeed that's all-wins.
>
> Best regards,
> Paul
>
>

[-- Attachment #2: Type: text/html, Size: 2580 bytes --]

      parent reply	other threads:[~2022-09-06 23:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mwv8q6ccj9.fsf@tomate.loria.fr>
2022-09-02 12:17 ` Rich Felker
2022-09-02 19:28   ` enh
2022-09-02 20:40     ` enh
2022-09-05  9:09   ` Paul Zimmermann
2022-09-05 13:08     ` Szabolcs Nagy
2022-09-05 14:39       ` Paul Zimmermann
2022-09-05 16:38         ` Szabolcs Nagy
2022-09-06 23:40     ` enh [this message]

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='CAJgzZorHAt=FgHxhOoYG2T3egtLizZrozbGTzPu3kOUqro=MiA@mail.gmail.com' \
    --to=enh@google.com \
    --cc=dalias@libc.org \
    --cc=musl@lists.openwall.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.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).