projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
i386 vsyscall support (vdso-provided sysenter/syscall instruction based)
[musl]
/
src
/
math
/
nearbyintl.c
1
#include <math.h>
2
#include <float.h>
3
4
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
5
long double nearbyintl(long double x)
6
{
7
return nearbyint(x);
8
}
9
#else
10
#include <fenv.h>
11
long double nearbyintl(long double x)
12
{
13
#ifdef FE_INEXACT
14
int e;
15
16
e = fetestexcept(FE_INEXACT);
17
#endif
18
x = rintl(x);
19
#ifdef FE_INEXACT
20
if (!e)
21
feclearexcept(FE_INEXACT);
22
#endif
23
return x;
24
}
25
#endif