Divide {s1p, s1n} by s2limb, and return the remainder.
Namespace:
Math.Gmp.Native
Assembly:
Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax public static mp_limb_t mpn_mod_1(
mp_ptr s1p,
mp_size_t s1n,
mp_limb_t s2limb
)
Public Shared Function mpn_mod_1 (
s1p As mp_ptr,
s1n As mp_size_t,
s2limb As mp_limb_t
) As mp_limb_t
public:
static mp_limb_t mpn_mod_1(
mp_ptr^ s1p,
mp_size_t s1n,
mp_limb_t s2limb
)
static member mpn_mod_1 :
s1p : mp_ptr *
s1n : mp_size_t *
s2limb : mp_limb_t -> mp_limb_t
Parameters
- s1p
- Type: Math.Gmp.Nativemp_ptr
The first operand integer. - s1n
- Type: Math.Gmp.Nativemp_size_t
The number of limbs of s1p. - s2limb
- Type: Math.Gmp.Nativemp_limb_t
The second operand integer.
Return Value
Type:
mp_limb_tThe remainder.
Remarks Examples
mp_ptr s1p = new mp_ptr(new uint[] { 0xfffffffe, 0x0000ffff });
Assert.IsTrue(gmp_lib.mpn_mod_1(s1p, s1p.Size, 3) == 2);
gmp_lib.free(s1p);
Dim s1p As New mp_ptr(New UInteger() { &HfffffffeUI, &Hffff})
Assert.IsTrue(gmp_lib.mpn_mod_1(s1p, s1p.Size, 3) = 2)
gmp_lib.free(s1p)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
See Also