repo.or.cz
/
musl.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
math: optimize lrint on 32bit targets
[musl.git]
/
src
/
math
/
logbl.c
blob
962973a7b99bfffdcb2c1677a3c0b2ba5f87d357
1
#include <math.h>
2
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
3
long double
logbl
(
long double
x
)
4
{
5
return
logb
(
x
);
6
}
7
#else
8
long double
logbl
(
long double
x
)
9
{
10
if
(!
isfinite
(
x
))
11
return
x
*
x
;
12
if
(
x
==
0
)
13
return
-
1
/(
x
*
x
);
14
return
ilogbl
(
x
);
15
}
16
#endif