Click or drag to resize
gmp_libmpz_submul_ui Method
Set rop to rop - op1 * op2.

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 void mpz_submul_ui(
	mpz_t rop,
	mpz_t op1,
	uint op2
)

Parameters

rop
Type: Math.Gmp.Nativempz_t
The result integer.
op1
Type: Math.Gmp.Nativempz_t
The first operand integer.
op2
Type: SystemUInt32
The second operand integer.
Examples
// Create, initialize, and set the value of x to -10000.
mpz_t x = new mpz_t();
gmp_lib.mpz_init_set_si(x, -10000);

// Create, initialize, and set the value of z to 20000.
mpz_t z = new mpz_t();
gmp_lib.mpz_init_set_si(z, 20000);

// Set z -= x * 12222U.
gmp_lib.mpz_submul_ui(z, x, 12222U);

// Assert that z has been decremented by -10000 * 12222.
Assert.IsTrue(gmp_lib.mpz_get_si(z) == 20000 - -10000 * 12222);

// Release unmanaged memory allocated for x and z.
gmp_lib.mpz_clears(x, z, null);
See Also