diff options
author | Niels M?ller <nisse@lysator.liu.se> | 2015-05-28 11:42:33 +0200 |
---|---|---|
committer | Niels M?ller <nisse@lysator.liu.se> | 2015-05-28 11:42:33 +0200 |
commit | a8109aae2ba6e046acdd24dc26ea3407b1e919b3 (patch) | |
tree | 5577b9a8240e907756f4f0467cd5129148147bb4 /doc/gmp.texi | |
parent | 142acfde6447ff88122aba41f8e0539a8196bff2 (diff) | |
download | gmp-a8109aae2ba6e046acdd24dc26ea3407b1e919b3.tar.gz |
Document mpn_divexact_1 and mpn_cnd_swap.
Diffstat (limited to 'doc/gmp.texi')
-rw-r--r-- | doc/gmp.texi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/gmp.texi b/doc/gmp.texi index eff6bc3a1..9a6a4b941 100644 --- a/doc/gmp.texi +++ b/doc/gmp.texi @@ -5370,6 +5370,14 @@ separate, not partially overlapping. performance.] @end deftypefun +@deftypefun void mpn_divexact_1 (mp_limb_t * @var{rp}, const mp_limb_t * @var{sp}, mp_size_t @var{n}, mp_limb_t @var{d}) +Divide @{@var{sp}, @var{n}@} by @var{d}, expecting it to divide exactly, and +writing the result to @{@var{rp}, @var{n}@}. If @var{d} doesn't divide +exactly, the value written to @{@var{rp}, @var{n}@} is undefined. The areas at +@var{rp} and @var{sp} have to be identical or completely separate, not +partially overlapping. +@end deftypefun + @deftypefn Macro mp_limb_t mpn_divexact_by3 (mp_limb_t *@var{rp}, mp_limb_t *@var{sp}, @w{mp_size_t @var{n}}) @deftypefnx Function mp_limb_t mpn_divexact_by3c (mp_limb_t *@var{rp}, mp_limb_t *@var{sp}, @w{mp_size_t @var{n}}, mp_limb_t @var{carry}) Divide @{@var{sp}, @var{n}@} by 3, expecting it to divide exactly, and writing @@ -5704,6 +5712,13 @@ requirements are guaranteed to be at most @var{n} limbs, and increase monotonously in the operand size. @end deftypefun +@deftypefun void mpn_cnd_swap (mp_limb_t @var{cnd}, volatile mp_limb_t *@var{ap}, volatile mp_limb_t *@var{bp}, mp_size_t @var{n}) +If @var{cnd} is non-zero, swaps the contents of the areas @{@var{ap},@var{n}@} +and @{@var{bp},@var{n}@}. Otherwise, the areas are left unmodified. +Implemented using logical operations on the limbs, with the same memory +accesses independent of the value of @var{cnd}. +@end deftypefun + @deftypefun void mpn_sec_mul (mp_limb_t *@var{rp}, const mp_limb_t *@var{ap}, mp_size_t @var{an}, const mp_limb_t *@var{bp}, mp_size_t @var{bn}, mp_limb_t *@var{tp}) @deftypefunx mp_size_t mpn_sec_mul_itch (mp_size_t @var{an}, mp_size_t @var{bn}) Set @var{R} to @math{A @times{} B}, where @var{A} = @{@var{ap},@var{an}@}, |