Click or drag to resize
gmp_libmpn_zero_p Method
Test {sp, n} and return 1 if the operand is zero, 0 otherwise.

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 mpn_zero_p(
	mp_ptr sp,
	mp_size_t n
)

Parameters

sp
Type: Math.Gmp.Nativemp_ptr
The operand integer.
n
Type: Math.Gmp.Nativemp_size_t
The number of limbs in sp.

Return Value

Type: Int32
Return 1 if the operand is zero, 0 otherwise.
Examples
// Create multi-precision operand.
mp_ptr sp = new mp_ptr(new uint[] { 0x00000000, 0x00000000 });

// Assert sp == 0.
Assert.IsTrue(gmp_lib.mpn_zero_p(sp, sp.Size) == 1);

// Release unmanaged memory.
gmp_lib.free(sp);
See Also