public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
From: John Scott <jscott@posteo.net>
To: libc-help@sourceware.org
Subject: Crazy idea: provide special functions support as wrappers around the C++ ones
Date: Sat, 04 Feb 2023 20:45:26 +0000	[thread overview]
Message-ID: <4901cbae875708fd168881a14f5cb6309ea73692.camel@posteo.net> (raw)

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

Hi,

ISO/IEC 24747:2009 specifies an interface for accessing special
functions from C, although I don't know offhand of any implementation of
it. C++17 includes most (all?) of these functions as a mandatory part of
the standard. Wouldn't it be neat if glibc would wrap these C++
functions when available to provide the functions from the
aforementioned standard?

Libraries such as MPFR, Arb, and GSL allow obtaining the values of
special functions for ordinary float, double, and long double types, but
they don't obey the usual C semantics of setting error indicators
according to math_errhandling and honoring the standard floating point
rounding direction, which makes them clunky and inconvenient to use in
combination with elementary functions.

Just thought I'd throw this idea out there.

Sincerely,
John

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 252 bytes --]

                 reply	other threads:[~2023-02-04 20:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4901cbae875708fd168881a14f5cb6309ea73692.camel@posteo.net \
    --to=jscott@posteo.net \
    --cc=libc-help@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).