Crazy idea: provide special functions support as wrappers around the C++ ones

John Scott jscott@posteo.net
Sat Feb 4 20:45:26 GMT 2023


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: This is a digitally signed message part
URL: <https://sourceware.org/pipermail/libc-help/attachments/20230204/ccb45eae/attachment.sig>


More information about the Libc-help mailing list