| mpfr_libmpfr_cmpabs Method  | 
 
            Compare |op1| and |op2|.
            
 
    Namespace: 
   Math.Mpfr.Native
    Assembly:
   Math.Mpfr.Native (in Math.Mpfr.Native.dll) Version: 1.0.0.0 (1.0.0.0)
Syntaxpublic static int mpfr_cmpabs(
	mpfr_t op1,
	mpfr_t op2
)
Public Shared Function mpfr_cmpabs ( 
	op1 As mpfr_t,
	op2 As mpfr_t
) As Integer
public:
static int mpfr_cmpabs(
	mpfr_t^ op1, 
	mpfr_t^ op2
)
static member mpfr_cmpabs : 
        op1 : mpfr_t * 
        op2 : mpfr_t -> int 
Parameters
- op1
 - Type: Math.Mpfr.Nativempfr_t
The first operand floating-point number. - op2
 - Type: Math.Mpfr.Nativempfr_t
The second operand floating-point number. 
Return Value
Type: 
Int32Return a positive value if |
op1| > |
op2|, zero if |
op1| = |
op2|, and a negative value if |
op1| < |
op2|.
Remarks
            If one of the operands is NaN, set the erange flag and return zero.
            
Examples
mpfr_t op1 = new mpfr_t();
mpfr_lib.mpfr_init2(op1, 64U);
Assert.IsTrue(mpfr_lib.mpfr_set_si(op1, 512, mpfr_rnd_t.MPFR_RNDN) == 0);
mpfr_t op2 = new mpfr_t();
mpfr_lib.mpfr_init2(op2, 64U);
Assert.IsTrue(mpfr_lib.mpfr_set_si(op2, 128, mpfr_rnd_t.MPFR_RNDN) == 0);
Assert.IsTrue(mpfr_lib.mpfr_cmpabs(op1, op2) > 0);
mpfr_lib.mpfr_clears(op1, op2, null);
Dim op1 As mpfr_t = New mpfr_t()
mpfr_lib.mpfr_init2(op1, 64U)
Assert.IsTrue(mpfr_lib.mpfr_set_si(op1, 512, mpfr_rnd_t.MPFR_RNDN) = 0)
Dim op2 As mpfr_t = New mpfr_t()
mpfr_lib.mpfr_init2(op2, 64U)
Assert.IsTrue(mpfr_lib.mpfr_set_si(op2, 128, mpfr_rnd_t.MPFR_RNDN) = 0)
Assert.IsTrue(mpfr_lib.mpfr_cmpabs(op1, op2) > 0)
mpfr_lib.mpfr_clears(op1, op2, Nothing)
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