GMP Native Interface for .NET
gmp_libmpz_cmp_ui Method |
Compare op1 and op2.
Namespace: Math.Gmp.Native
Assembly: Math.Gmp.Native (in Math.Gmp.Native.dll) Version: 1.0.0.0 (1.0.0.0)

public static int mpz_cmp_ui( mpz_t op1, uint op2 )
Public Shared Function mpz_cmp_ui ( op1 As mpz_t, op2 As UInteger ) As Integer
public: static int mpz_cmp_ui( mpz_t^ op1, unsigned int op2 )
static member mpz_cmp_ui : op1 : mpz_t * op2 : uint32 -> int
Parameters
- op1
- Type: Math.Gmp.Nativempz_t
The first operand integer. - op2
- Type: SystemUInt32
The second operand integer.
Return Value
Type: Int32Return a positive value if op1 > op2, zero if op1 = op2, or a negative value if op1 < op2.

// Create, initialize, and set the value of op1 to 63. mpz_t op1 = new mpz_t(); gmp_lib.mpz_init_set_ui(op1, 63U); // Assert that op1 < 70. Assert.IsTrue(gmp_lib.mpz_cmp_ui(op1, 70U) < 0); // Release unmanaged memory allocated for op1. gmp_lib.mpz_clear(op1);
' Create, initialize, and set the value of op1 to 63. Dim op1 As New mpz_t() gmp_lib.mpz_init_set_ui(op1, 63UI) ' Assert that op1 < 70. Assert.IsTrue(gmp_lib.mpz_cmp_ui(op1, 70UI) < 0) ' Release unmanaged memory allocated for op1. gmp_lib.mpz_clear(op1)
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.
