10 #ifndef POMYANG_KPARENT_INC_MATH_MACROS_H_
11 #define POMYANG_KPARENT_INC_MATH_MACROS_H_
14 #define BYTES_TO_GB 0.000000001
17 #define TWO_THIRDS .6666666666666666666666
20 #define EVEN(x) (0 == (x) % 2)
23 #define SQUARE(x) ((x) * (x))
26 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
29 #define DIVIDES(x, y) (0 == y % x)
32 #define F_OFFSET(x) ((x / 2) - 1)
35 #define F_DE_OFFSET(x) ((x + 1) * 2)
38 #define LOG(shush, fmt, ...) \
41 fprintf(stderr, "[%s:%d] " fmt, __FILE__, \
42 __LINE__, __VA_ARGS__); \
47 #ifdef DEBUG_ASSERT_ON
49 #define DEBUG_ASSERT(x) x
52 #define DEBUG_ASSERT(x)
55 #pragma GCC diagnostic push
56 #pragma GCC diagnostic ignored "-Wpedantic" // uint64_t used in enum
65 _10_TO_THE_6 = 150232,
66 _10_TO_THE_7 = 1574973,
67 _10_TO_THE_8 = 16246940,
68 _10_TO_THE_9 = 165826606,
69 _10_TO_THE_10 = 1681871718,
70 _10_TO_THE_11 = 16988116409,
71 _10_TO_THE_12 = 171128671374,
72 _2_TO_THE_40 = 188206399403,
74 #pragma GCC diagnostic pop
76 #endif // POMYANG_KPARENT_INC_MATH_MACROS_H_