16df80762be2473486f8cc1ed0d0de6e33527610
[musl] / src / math / tgammaf.c
1 #include <math.h>
2
3 // FIXME: use lanczos approximation
4
5 float __lgammaf_r(float, int *);
6
7 float tgammaf(float x)
8 {
9         int sign;
10         float y;
11
12         y = exp(__lgammaf_r(x, &sign));
13         if (sign < 0)
14                 y = -y;
15         return y;
16 }