gmp_libmpn_mod_1 Method |
Namespace: Math.Gmp.Native
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
s1n can be zero.
// Create multi-precision operand. mp_ptr s1p = new mp_ptr(new uint[] { 0xfffffffe, 0x0000ffff }); // Assert s1p mod 3 is 2. Assert.IsTrue(gmp_lib.mpn_mod_1(s1p, s1p.Size, 3) == 2); // Release unmanaged memory. gmp_lib.free(s1p);
' Create multi-precision operand. Dim s1p As New mp_ptr(New UInteger() { &HfffffffeUI, &Hffff}) ' Assert s1p mod 3 is 2. Assert.IsTrue(gmp_lib.mpn_mod_1(s1p, s1p.Size, 3) = 2) ' Release unmanaged memory. 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.