blob: 6398bbcdbd17984d5f7a72ff10946906cf59d350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#if 0
# define TGSOURCE "lrint.c"
#include "_tgmath.h"
#include <math.h>
#include <limits.h>
#include <fenv.h>
long int TGFN(lrint)(TYPE x)
{
SIGNAL_SAFE(0);
switch (fpclassify(x)) {
case FP_ZERO:
return 0;
case FP_INFINITE:
feraiseexcept(FE_INVALID);
return signbit(x) ? LONG_MIN : LONG_MAX;
default:
break;
}
return x;
}
/*
STDC(199901)
LINK(m)
*/
#endif
|