gmp_libmpz_cmpabs_d Method |
Namespace: Math.Gmp.Native
public static int mpz_cmpabs_d( mpz_t op1, double op2 )
Public Shared Function mpz_cmpabs_d ( op1 As mpz_t, op2 As Double ) As Integer
public: static int mpz_cmpabs_d( mpz_t^ op1, double op2 )
static member mpz_cmpabs_d : op1 : mpz_t * op2 : float -> int
mpz_cmpabs_d can be called with an infinity (see double.PositiveInfinity or double.NegativeInfinity), but results are undefined for a double.NaN.
// Create, initialize, and set the value of op1 to -63. mpz_t op1 = new mpz_t(); gmp_lib.mpz_init_set_si(op1, -63); // Assert that |op1| < |-70.0|. Assert.IsTrue(gmp_lib.mpz_cmpabs_d(op1, -70.0) < 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_si(op1, -63) ' Assert that |op1| < |-70.0|. Assert.IsTrue(gmp_lib.mpz_cmpabs_d(op1, -70.0) < 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.