On Jul 31, 2012, at 7:42 AM, Niels Möller wrote:
> We currently have modular exponentation, powlo and "regular" powering
> with no reduction of any kind. I'm suggesting a pow_modbnm1. For
> euclidean square root, and for mpfr, it might also be useful with a
> pow_high, keeping only the n most sig
ni...@lysator.liu.se (Niels Möller) writes:
> Correction: Each iteration gets from \ell to 2 \ell-2, and it needs 2
> \ell-1 bits of precision for intermediate values.
Yet another correction, after more work on the implementation.
For numbers x = 1 (mod 8), there are four square roots mod 2^k. I
When including gmp-impl.h and compiling with gcc -Wall -DWANT_ASSERT, I get
the warnings:
/home/nisse/hack/gmp/gmp-impl.h:1885: warning: `_mpz_newalloc' defined but not
used
/home/nisse/hack/gmp/gmp-impl.h:1946: warning: `log_n_max' defined but not used
Are these functions intended to be inline?
Torbjorn Granlund writes:
> We could perhaps add a parallel set of functions (_ul, or _ull) allowing
> long long. We should then follow the principle of "one GMP release, one
> GMP API" and reject compilers and ABIs without long long support.
I don't see much harm in making those long long feat
On Mon, 30 Jul 2012, Torbjorn Granlund wrote:
I suspect few people would get any joy if we extended the range from 32
bits to 64 bits under Windoze. I think I never passed a constant
argument >100 to any _ui functions.
I wasn't particularly thinking of constants. Some people use long long as
On 2012-07-30 12:24:36 +0200, Torbjorn Granlund wrote:
> I suspect few people would get any joy if we extended the range from 32
> bits to 64 bits under Windoze. I think I never passed a constant
> argument >100 to any _ui functions.
I don't think Marc mentioned constants. While I don't see a rea
I suspect few people would get any joy if we extended the range from 32
bits to 64 bits under Windoze. I think I never passed a constant
argument >100 to any _ui functions.
Code relying on _ui constants >= 2^32 is not portable between 32-bit
systems and 64-bit systems, btw.
Using mp_limb_t for u