[cfp-interest 3998] Re: signgam

Jerome Coonen jcoonen at gmail.com
Fri Aug 28 09:44:29 PDT 2026


Hi, Paul, thanks for your question about the signgam variable associated
with the lgamma family of functions in some systems. In our 26 August
meeting, we determined that this is not a 754 issue, putting it outside the
scope of CFP. We will take no action here.

Thanks again.

-Jerome Coonen


On Mon, Aug 17, 2026 at 4:03 AM Paul Zimmermann <Paul.Zimmermann at inria.fr>
wrote:

>        Hi,
>
> the C standard says nothing about the "signgam" variable that concrete
> implementations of lgamma use, for example with the GNU libc:
>
>      extern int signgam;
>
>      signgam:
>          _XOPEN_SOURCE
>              || /* Since glibc 2.19: */ _DEFAULT_SOURCE
>              || /* glibc <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE
>
>      The lgamma(), lgammaf(), and lgammal() functions return the natural
> loga‐
>      rithm  of the absolute value of the Gamma function.  The sign of the
> Gamma
>      function is returned in the external integer signgam declared in
> <math.h>.
>      It is 1 when the Gamma function is positive or zero, -1 when it  is
> nega‐
>      tive.
>
> Should the CFP deal about signgam? Or ignore it?
>
> Paul
>
> PS: I know there is also lgamma_r which returns signgam in the pointer from
> its 2nd argument.
>
> _______________________________________________
> cfp-interest mailing list
> cfp-interest at oakapple.net
> http://mailman.oakapple.net/mailman/listinfo/cfp-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.oakapple.net/pipermail/cfp-interest/attachments/20260828/2a135cbc/attachment.htm>


More information about the cfp-interest mailing list