gmp_libmpq_cmp_z Method |
Namespace: Math.Gmp.Native
public static int mpq_cmp_z( mpq_t op1, mpz_t op2 )
Public Shared Function mpq_cmp_z ( op1 As mpq_t, op2 As mpz_t ) As Integer
public: static int mpq_cmp_z( mpq_t^ op1, mpz_t^ op2 )
static member mpq_cmp_z : op1 : mpq_t * op2 : mpz_t -> int
// Create, initialize, and set the value of op1 to 1 / 2. mpq_t op1 = new mpq_t(); gmp_lib.mpq_init(op1); gmp_lib.mpq_set_si(op1, 1, 2U); // Create, initialize, and set the value of op2 to 3. mpz_t op2 = new mpz_t(); gmp_lib.mpz_init(op2); gmp_lib.mpz_set_si(op2, 3); // Assert that op1 < op2. Assert.IsTrue(gmp_lib.mpq_cmp_z(op1, op2) < 0); // Release unmanaged memory allocated for op1 and op2. gmp_lib.mpq_clear(op1); gmp_lib.mpz_clear(op2);
' Create, initialize, and set the value of op1 to 1 / 2. Dim op1 As New mpq_t() gmp_lib.mpq_init(op1) gmp_lib.mpq_set_si(op1, 1, 2UI) ' Create, initialize, and set the value of op2 to 3. Dim op2 As New mpz_t() gmp_lib.mpz_init(op2) gmp_lib.mpz_set_si(op2, 3) ' Assert that op1 < op2. Assert.IsTrue(gmp_lib.mpq_cmp_z(op1, op2) < 0) ' Release unmanaged memory allocated for op1 and op2. gmp_lib.mpq_clear(op1) gmp_lib.mpz_clear(op2)
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.