projects
/
libm
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
b58527c8db02ce54c8a4002b4ad40a4b0dbfc9e8
[libm]
/
src
/
math
/
nearbyintl.c
1
#include "libm.h"
2
#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
3
long double nearbyintl(long double x)
4
{
5
return nearbyint(x);
6
}
7
#else
8
#include <fenv.h>
9
long double nearbyintl(long double x)
10
{
11
fenv_t e;
12
13
fegetenv(&e);
14
x = rintl(x);
15
fesetenv(&e);
16
return x;
17
}
18
#endif