lib/libm/wf_tgamma: Fix tgammaf handling of -inf, should return nan.
This commit is contained in:
parent
afc7ddca31
commit
b9a133e5ad
@ -35,6 +35,10 @@
|
|||||||
{
|
{
|
||||||
float y;
|
float y;
|
||||||
int local_signgam;
|
int local_signgam;
|
||||||
|
if (!isfinite(x)) {
|
||||||
|
/* special cases: tgammaf(nan)=nan, tgammaf(inf)=inf, tgammaf(-inf)=nan */
|
||||||
|
return x + INFINITY;
|
||||||
|
}
|
||||||
y = expf(__ieee754_lgammaf_r(x,&local_signgam));
|
y = expf(__ieee754_lgammaf_r(x,&local_signgam));
|
||||||
if (local_signgam < 0) y = -y;
|
if (local_signgam < 0) y = -y;
|
||||||
#ifdef _IEEE_LIBM
|
#ifdef _IEEE_LIBM
|
||||||
|
Loading…
Reference in New Issue
Block a user