projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix breakage due to initializing thread pointer when loading libs
[musl]
/
src
/
math
/
tgamma.c
1
#include <math.h>
2
3
// FIXME: use lanczos approximation
4
5
double __lgamma_r(double, int *);
6
7
double tgamma(double x)
8
{
9
int sign;
10
double y;
11
12
y = exp(__lgamma_r(x, &sign));
13
if (sign < 0)
14
y = -y;
15
return y;
16
}