[PATCH 2/3] libm: Remove __ieee754_gamma_r variants

Fabian Schriever fabian.schriever@gtd-gmbh.de
Tue Sep 1 16:33:30 GMT 2020


Hi Keith,

We welcome your efforts to clean up - and correct the error return 
values of - the gamma/lgamma/tgamma families.

Regarding Corinna's concern with lgamma_r/gamma_r being BSD-functions:

> You can't do  that.  gamma_r/gammaf_r/lgamma_r/lgammaf_r are BSD
> functions. They have been exported by Cygwin since 2001.  The entry
> points need  to be kept available with unchanged semantics.

We would favor the removal of all non C/POSIX(+XSI)-standard functions 
from the interface.
The reason to regard lgamma_r and gamma_r as "BSD-functions" comes from 
the fact that BSD (same as newlib) took fdlibm as the base for its libm 
back in the early 90s when some non-standard functions were part of that 
library.
We would encourage the use of only the C/POSIX(+XSI)-standard functions 
as the only way to get rid of the confusing semantics of the historical 
function interfaces otherwise the problem will only perpetuate into the 
future.

If something was changed in 2002, that is working incorrectly and no one 
found out until now, that is also not part of any standard, it suggests 
that no one is actually using it and should be able to be safely 
removed. Does Newlib have a policy to remove elements?

An interesting discussion about the standard lgamma/tgamma functions 
would be to discuss accuracy improvements in line with the glibc 
improvements from Joseph Myers (see 
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=050f29c18873ec05ba04a4034bed8cb3f6ae4463).

Best regards,
Fabian


More information about the Newlib mailing list