We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef07da5 commit a307667Copy full SHA for a307667
tommath.h
@@ -93,6 +93,11 @@ typedef uint64_t mp_word;
93
# endif
94
#endif
95
96
+/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */
97
+#ifndef DIGIT_BIT
98
+# define DIGIT_BIT (((CHAR_BIT * MP_SIZEOF_MP_DIGIT) - 1)) /* bits per digit */
99
+#endif
100
+
101
#define MP_DIGIT_BIT DIGIT_BIT
102
#define MP_MASK ((((mp_digit)1)<<((mp_digit)DIGIT_BIT))-((mp_digit)1))
103
#define MP_DIGIT_MAX MP_MASK
0 commit comments