aboutsummaryrefslogtreecommitdiffstats
path: root/src/internals.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2016-03-03 10:33:29 +0100
committerMattias Andrée <maandree@kth.se>2016-03-03 10:35:22 +0100
commitc0bc7b6e2d090554c9d940bc3614e089a688503a (patch)
treea1b85a760ec1e18bdd0ceac15b802bdf6409e625 /src/internals.h
parentznot man page: notes on representation and tendness toward zero (diff)
downloadlibzahl-c0bc7b6e2d090554c9d940bc3614e089a688503a.tar.gz
libzahl-c0bc7b6e2d090554c9d940bc3614e089a688503a.tar.bz2
libzahl-c0bc7b6e2d090554c9d940bc3614e089a688503a.tar.xz
Add zabs, zadd, zdiv, zmod, zmodmul, zmodpow, zneg, zpow, zsub, and the newly introduced zmodsqr
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'src/internals.h')
-rw-r--r--src/internals.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/internals.h b/src/internals.h
index f7f9769..44b6214 100644
--- a/src/internals.h
+++ b/src/internals.h
@@ -3,6 +3,7 @@
#define BITS_PER_CHAR 32
#define LB_BITS_PER_CHAR 5
+#define ZAHL_CHAR_MAX UINT32_MAX
#define FLOOR_BITS_TO_CHARS(bits) ((bits) >> LB_BITS_PER_CHAR)
#define CEILING_BITS_TO_CHARS(bits) (((bits) + (BITS_PER_CHAR - 1)) >> LB_BITS_PER_CHAR)
@@ -15,7 +16,14 @@
X(libzahl_tmp_str_div)\
X(libzahl_tmp_str_rem)\
X(libzahl_tmp_gcd_u)\
- X(libzahl_tmp_gcd_v)
+ X(libzahl_tmp_gcd_v)\
+ X(libzahl_tmp_modmul)\
+ X(libzahl_tmp_div)\
+ X(libzahl_tmp_mod)\
+ X(libzahl_tmp_pow_b)\
+ X(libzahl_tmp_pow_c)\
+ X(libzahl_tmp_pow_d)\
+ X(libzahl_tmp_modsqr)
#define LIST_CONSTS\
X(libzahl_const_1e19, zsetu, 10000000000000000000ULL) /* The largest power of 10 < 2⁶⁴. */\