Commit 98e309be authored by Simo Sorce's avatar Simo Sorce Committed by Niels Möller
Browse files

Add convenience macro for size calculation

Returns number of limbs needed to contain N bytes long number.
Signed-off-by: default avatarSimo Sorce <>
parent 51b64bb8
......@@ -81,6 +81,9 @@
# define cnd_sub_n(cnd, rp, ap, n) mpn_submul_1 ((rp), (ap), (n), (cnd) != 0)
(((n) * 8 + GMP_NUMB_BITS - 1) / GMP_NUMB_BITS)
/* Some functions for interfacing between mpz and mpn code. Signs of
the mpz numbers are generally ignored. */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment