summaryrefslogtreecommitdiff
path: root/rts/gmp/mpz/README
diff options
context:
space:
mode:
Diffstat (limited to 'rts/gmp/mpz/README')
-rw-r--r--rts/gmp/mpz/README23
1 files changed, 23 insertions, 0 deletions
diff --git a/rts/gmp/mpz/README b/rts/gmp/mpz/README
new file mode 100644
index 0000000000..06b481d770
--- /dev/null
+++ b/rts/gmp/mpz/README
@@ -0,0 +1,23 @@
+This directory contains functions for GMP's integer function layer.
+
+In this version of GMP, integers are represented like in the figure below.
+(Please note that the format might change between every version, and that
+depending on the internal format in any way is a bad idea.)
+
+ most least
+significant significant
+ limb limb
+
+ _mp_d
+ /
+ /
+ \/
+ ____ ____ ____ ____ ____
+ |____|____|____|____|____|
+
+ <------- _mp_size ------->
+
+
+The most significant limb will be non-zero. The _mp_size field's sign
+reflects the sign of the number. Its absolute value is the count of limbs
+in the number.