-// cached_power().\r
-\r
-// General includes.\r
-#include "cl_sysdep.h"\r
-\r
-// Specification.\r
-#include "cl_I.h"\r
-\r
-\r
-// Implementation.\r
-\r
-namespace cln {\r
-\r
-// Table: For each base b (2 <= b <= 36), store k and b^k where k is the largest\r
-// integer such that b^k < 2^intDsize, i.e. k == floor(log(2^intDsize-1,b)).\r
-struct power_table_entry {\r
- uintC k;\r
- uintD b_to_the_k;\r
-};\r
-extern const power_table_entry power_table [36-2+1];\r
-\r
-// Table: contains for each base b (2 <= b <= 36) either NULL or an array of\r
-// lazily computed b^(k*2^i) and maybe 1/b^(k*2^i).\r
-//#define MUL_REPLACES_DIV\r
-struct cached_power_table_entry {\r
- ALLOCATE_ANYWHERE(cached_power_table_entry)\r
- cl_I base_pow; // 0 or b^(k*2^i)\r
-#ifdef MUL_REPLACES_DIV\r
- cl_I inv_base_pow; // if base_pow: floor(2^(2*integer_length(base_pow))/base_pow)\r
-#endif\r
-};\r
-\r
-struct cached_power_table {\r
- cached_power_table_entry element[30];\r
- // Constructor and destructor - nothing special.\r
- cached_power_table () {}\r
- ~cached_power_table () {}\r
- // Allocation and deallocation.\r
- void* operator new (size_t size) { return malloc_hook(size); }\r
- void operator delete (void* ptr) { free_hook(ptr); }\r
-};\r
-\r
-extern cached_power_table* ctable [36-2+1];\r
-\r
-const cached_power_table_entry * cached_power (uintD base, uintL i);\r
-\r
-} // namespace cln\r
+// cached_power().
+
+// General includes.
+#include "base/cl_sysdep.h"
+
+// Specification.
+#include "integer/cl_I.h"
+
+
+// Implementation.
+
+namespace cln {
+
+// Table: For each base b (2 <= b <= 36), store k and b^k where k is the largest
+// integer such that b^k < 2^intDsize, i.e. k == floor(log(2^intDsize-1,b)).
+struct power_table_entry {
+ uintC k;
+ uintD b_to_the_k;
+};
+extern const power_table_entry power_table [36-2+1];
+
+// Table: contains for each base b (2 <= b <= 36) either NULL or an array of
+// lazily computed b^(k*2^i) and maybe 1/b^(k*2^i).
+//#define MUL_REPLACES_DIV
+struct cached_power_table_entry {
+ ALLOCATE_ANYWHERE(cached_power_table_entry)
+ cl_I base_pow; // 0 or b^(k*2^i)
+#ifdef MUL_REPLACES_DIV
+ cl_I inv_base_pow; // if base_pow: floor(2^(2*integer_length(base_pow))/base_pow)
+#endif
+};
+
+struct cached_power_table {
+ cached_power_table_entry element[40];
+ // Constructor and destructor - nothing special.
+ cached_power_table () {}
+ ~cached_power_table () {}
+ // Allocation and deallocation.
+ void* operator new (size_t size) { return malloc_hook(size); }
+ void operator delete (void* ptr) { free_hook(ptr); }
+};
+
+extern cached_power_table* ctable [36-2+1];
+
+const cached_power_table_entry * cached_power (uintD base, uintL i);
+
+} // namespace cln