gmp_lib.mpn_scan0 Method

GMP Native Interface for .NET

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
)
Public Shared Function mpn_scan0 ( 
	s1p As mp_ptr,
	bit As mp_bitcnt_t
) As mp_bitcnt_t
public:
static mp_bitcnt_t mpn_scan0(
	mp_ptr^ s1p, 
	mp_bitcnt_t bit
)
static member mpn_scan0 : 
        s1p : mp_ptr * 
        bit : mp_bitcnt_t -> mp_bitcnt_t 

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);
' Create multi-precision operand.
Dim s1p As New mp_ptr(New UInteger() { &H1, &H1})

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

' Release unmanaged memory.
gmp_lib.free(s1p)

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