Set rop to the positive difference of op1 and op2, i.e., op1 - op2 rounded in the direction rnd if op1 > op2, +0 if op1 ≤ op2, and NaN if op1 or op2 is NaN. 
            
 
    Namespace: 
   Math.Mpfr.Native
    Assembly:
   Math.Mpfr.Native (in Math.Mpfr.Native.dll) Version: 1.0.0.0 (1.0.0.0)
 Syntax
Syntaxpublic static int mpfr_dim(
	mpfr_t rop,
	mpfr_t op1,
	mpfr_t op2,
	mpfr_rnd_t rnd
)
Public Shared Function mpfr_dim ( 
	rop As mpfr_t,
	op1 As mpfr_t,
	op2 As mpfr_t,
	rnd As mpfr_rnd_t
) As Integer
public:
static int mpfr_dim(
	mpfr_t^ rop, 
	mpfr_t^ op1, 
	mpfr_t^ op2, 
	mpfr_rnd_t rnd
)
static member mpfr_dim : 
        rop : mpfr_t * 
        op1 : mpfr_t * 
        op2 : mpfr_t * 
        rnd : mpfr_rnd_t -> int 
Parameters
- rop
- Type: Math.Mpfr.Nativempfr_t
 The result floating-point number.
- op1
- Type: Math.Mpfr.Nativempfr_t
 The first operand floating-point number.
- op2
- Type: Math.Mpfr.Nativempfr_t
 The second operand floating-point number.
- rnd
- Type: Math.Mpfr.Nativempfr_rnd_t
 The rounding direction.
Return Value
Type: 
Int32Return zero, a positive, or a negative value if 
rop is respectively equal to, greater than, or lower than the exact result. See 
GNU MPFR - Rounding Modes for details.
 Examples
Examples
mpfr_t op1 = new mpfr_t();
mpfr_lib.mpfr_init2(op1, 64U);
Assert.IsTrue(mpfr_lib.mpfr_set_si(op1, -210, 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, 10, mpfr_rnd_t.MPFR_RNDN) == 0);
mpfr_t rop = new mpfr_t();
mpfr_lib.mpfr_init2(rop, 64U);
Assert.IsTrue(mpfr_lib.mpfr_dim(rop, op1, op2, mpfr_rnd_t.MPFR_RNDN) == 0);
Assert.IsTrue(mpfr_lib.mpfr_get_d(rop, mpfr_rnd_t.MPFR_RNDN) == 0);
mpfr_lib.mpfr_clears(rop, 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, -210, 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, 10, mpfr_rnd_t.MPFR_RNDN) = 0)
Dim rop As mpfr_t = New mpfr_t()
mpfr_lib.mpfr_init2(rop, 64U)
Assert.IsTrue(mpfr_lib.mpfr_dim(rop, op1, op2, mpfr_rnd_t.MPFR_RNDN) = 0)
Assert.IsTrue(mpfr_lib.mpfr_get_d(rop, mpfr_rnd_t.MPFR_RNDN) = 0)
mpfr_lib.mpfr_clears(rop, 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
See Also