projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix loads of missing const in new libm, and some global vars (?!) in powl
[oweals/musl.git]
/
src
/
math
/
logbl.c
1
#include <limits.h>
2
#include "libm.h"
3
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
4
long double logbl(long double x)
5
{
6
return logb(x);
7
}
8
#else
9
long double logbl(long double x)
10
{
11
int i = ilogbl(x);
12
13
if (i == FP_ILOGB0)
14
return -1.0/fabsl(x);
15
if (i == FP_ILOGBNAN || i == INT_MAX)
16
return x * x;
17
return i;
18
}
19
#endif