gmp_libmpz_cdiv_ui Method |
Return the remainder |r| where r = n - q * d, and where q = ceiling(n / d).
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 ulong mpz_cdiv_ui(
mpz_t n,
uint d
)
Public Shared Function mpz_cdiv_ui (
n As mpz_t,
d As UInteger
) As ULong
public:
static unsigned long long mpz_cdiv_ui(
mpz_t^ n,
unsigned int d
)
static member mpz_cdiv_ui :
n : mpz_t *
d : uint32 -> uint64
Parameters
- n
- Type: Math.Gmp.Nativempz_t
The numerator integer. - d
- Type: SystemUInt32
The denominator integer.
Return Value
Type:
UInt64The remainder
|r| where
r = n - q * d, and where
q = ceiling(n / d).
Examples
mpz_t n = new mpz_t();
gmp_lib.mpz_init_set_si(n, 10000);
Assert.IsTrue(gmp_lib.mpz_cdiv_ui(n, 3U) == 2U);
gmp_lib.mpz_clear(n);
Dim n As New mpz_t()
gmp_lib.mpz_init_set_si(n, 10000)
Assert.IsTrue(gmp_lib.mpz_cdiv_ui(n, 3UI) = 2UI)
gmp_lib.mpz_clear(n)
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