Aliquot Sequence Research  2.0
Compute properties of the sum-of-proper-divisors function.
All Data Structures Files Functions Variables Enumerations Macros Pages
math_macros.h
Go to the documentation of this file.
1 
10 #ifndef POMYANG_KPARENT_INC_MATH_MACROS_H_
11 #define POMYANG_KPARENT_INC_MATH_MACROS_H_
12 
14 #define BYTES_TO_GB 0.000000001
15 
17 #define TWO_THIRDS .6666666666666666666666
18 
20 #define EVEN(x) (0 == (x) % 2)
21 
23 #define SQUARE(x) ((x) * (x))
24 
26 #define MIN(x, y) (((x) < (y)) ? (x) : (y))
27 
29 #define DIVIDES(x, y) (0 == y % x)
30 
32 #define F_OFFSET(x) ((x / 2) - 1)
33 
35 #define F_DE_OFFSET(x) ((x + 1) * 2)
36 
38 #define LOG(shush, fmt, ...) \
39  do { \
40  if (!shush) { \
41  fprintf(stderr, "[%s:%d] " fmt, __FILE__, \
42  __LINE__, __VA_ARGS__); \
43  } \
44  } while (0)
45 
46 
47 #ifdef DEBUG_ASSERT_ON
48 
49 #define DEBUG_ASSERT(x) x
50 #else
51 
52 #define DEBUG_ASSERT(x)
53 #endif
54 
55 #pragma GCC diagnostic push
56 #pragma GCC diagnostic ignored "-Wpedantic" // uint64_t used in enum
57 
62 typedef enum {
63  _10_TO_THE_4 = 1212,
64  _10_TO_THE_5 = 13863,
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
75 
76 #endif // POMYANG_KPARENT_INC_MATH_MACROS_H_
nonaliquot_counts_t
nonaliquot_counts_t
Counts of nonaliquots typed out from (Chum et al.)
Definition: math_macros.h:62