Click or drag to resize
gmp_libmpz_even_p Method
Determine whether op is even.

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 int mpz_even_p(
	mpz_t op
)

Parameters

op
Type: Math.Gmp.Nativempz_t
The operand integer.

Return Value

Type: Int32
Return non-zero if even, zero if odd.
Examples
// Create, initialize, and set the value of op to 427295.
mpz_t op = new mpz_t();
gmp_lib.mpz_init_set_ui(op, 427295);

// Assert that op is not even but odd.
Assert.IsTrue(gmp_lib.mpz_even_p(op) == 0);
Assert.IsTrue(gmp_lib.mpz_odd_p(op) > 0);

// Release unmanaged memory allocated for op.
gmp_lib.mpz_clear(op);
See Also