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