]>
Commit | Line | Data |
---|---|---|
f7eac6eb | 1 | /* w_lgammaf_r.c -- float version of w_lgamma_r.c. |
f7eac6eb RM |
2 | */ |
3 | ||
4 | /* | |
5 | * ==================================================== | |
6 | * Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved. | |
7 | * | |
8 | * Developed at SunPro, a Sun Microsystems, Inc. business. | |
9 | * Permission to use, copy, modify, and distribute this | |
0ac5ae23 | 10 | * software is freely granted, provided that this notice |
f7eac6eb RM |
11 | * is preserved. |
12 | * ==================================================== | |
13 | */ | |
14 | ||
0ac5ae23 | 15 | /* |
f7eac6eb RM |
16 | * wrapper float lgammaf_r(float x, int *signgamp) |
17 | */ | |
18 | ||
9d13fb24 | 19 | #include <math.h> |
9277c064 | 20 | #include <math_private.h> |
813378e9 | 21 | #include <math-svid-compat.h> |
a8dce619 | 22 | #include <libm-alias-float.h> |
f7eac6eb RM |
23 | |
24 | ||
4f3647e4 | 25 | #if LIBM_SVID_COMPAT |
0ac5ae23 UD |
26 | float |
27 | __lgammaf_r(float x, int *signgamp) | |
f7eac6eb | 28 | { |
0ac5ae23 | 29 | float y = __ieee754_lgammaf_r(x,signgamp); |
d81f90cc WD |
30 | if(__builtin_expect(!isfinite(y), 0) |
31 | && isfinite(x) && _LIB_VERSION != _IEEE_) | |
0ac5ae23 | 32 | return __kernel_standard_f(x, x, |
e44acb20 | 33 | floorf(x)==x&&x<=0.0f |
0ac5ae23 UD |
34 | ? 115 /* lgamma pole */ |
35 | : 114); /* lgamma overflow */ | |
36 | ||
37 | return y; | |
38 | } | |
a8dce619 | 39 | libm_alias_float_r (__lgamma, lgamma, _r) |
4f3647e4 | 40 | #endif |