#include <math.h>
#include <limits.h>
Go to the source code of this file.
◆ _USE_MATH_DEFINES
◆ floor()
Definition at line 18 of file floor.c.
19{
20
21 unsigned long long u64 = *(
unsigned long long*)&
x;
22
23
24 if ((
u64 & ~(1ULL << 63)) > 0x7FF0000000000000ull)
25 {
26
27 u64 |= 0x0008000000000000ull;
28 return *(
double*)&
u64;
29 }
30
31
32 if ((
u64 & (1ULL << 63)) == 0)
33 {
34
36 {
37
38
39 return (
double)(
long long)
x;
40 }
41 else
42 {
43
44
46 }
47 }
48 else
49 {
50
52 {
53
55 {
56 return -0.;
57 }
58
59
60
62 return (
x ==
y) ?
y :
y - 1;
63 }
64 else
65 {
66
67
69 }
70 }
71}
GLint GLint GLint GLint GLint x
GLint GLint GLint GLint GLint GLint y
static const char mbstate_t *static wchar_t const char mbstate_t *static const wchar_t int *static double