Click or drag to resize
gmp_libmpn_scan0 Method
Scan s1p from bit position bit for the next clear bit.

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 mp_bitcnt_t mpn_scan0(
	mp_ptr s1p,
	mp_bitcnt_t bit
)

Parameters

s1p
Type: Math.Gmp.Nativemp_ptr
The operand integer.
bit
Type: Math.Gmp.Nativemp_bitcnt_t
The index of the starting bit.

Return Value

Type: mp_bitcnt_t
The index of the next clear bit.
Remarks

It is required that there be a clear bit within the area at s1p at or beyond bit position bit, so that the function has something to return.

Examples
// Create multi-precision operand.
mp_ptr s1p = new mp_ptr(new uint[] { 0x0000001, 0x00000001 });

// Assert result of operation.
Assert.IsTrue(gmp_lib.mpn_scan0(s1p, 0) == 1);

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