Next: , Previous: , Up: Rational Interval Functions   [Index]


5.5 Interval Basic Functions

Some MPRIA functions on rational intervals return rational results, such as the diameter or the centre of a rational interval.

Inline Function: void mpri_diam_abs (mpq_t rop, const mpri_t op)

Set the value of rop to the absolute diameter of the rational interval op, that is to say, to the difference between its right endpoint and its left one.

Function: void mpri_diam_rel (mpq_t rop, const mpri_t op)

Set the value of rop to the relative diameter of the rational interval op, in other words, either to the difference between its right endpoint and its left one divided by the absolute value of its centre when it is not symmetric or to NaN ([0/0,0/0]) when it is symmetric.

Inline Function: void mpri_diam (mpq_t rop, const mpri_t op)

Set the value of rop to the relative diameter of the rational interval op if it does not contains zero and to its absolute diameter otherwise.

Inline Function: void mpri_mig (mpq_t rop, const mpri_t op)
Inline Function: void mpri_mag (mpq_t rop, const mpri_t op)

Set the value of rop to the mignitude and magnitude of the rational interval op, respectively, that is to say, to the smallest and largest absolute value of its elements, respectively.

Inline Function: void mpri_mid (mpq_t rop, const mpri_t op)

Set the value of rop to the value of the middle of the rational interval op, namely, to the half sum of its endpoints.

Macro: mpq_t mpri_lepref (const mpri_t op)
Macro: mpq_t mpri_repref (const mpri_t op)

Return a reference to the left and right endpoint of the rational interval op, respectively.

Inline Function: void mpri_get_left (mpq_t rop, const mpri_t op)
Inline Function: void mpri_get_right (mpq_t rop, const mpri_t op)

Set the value of rop to the left and right endpoint of the rational interval op, respectively. These functions are equivalent to calling mpq_set with an appropriate mpri_lepref or mpri_repref. Direct use of mpri_lepref or mpri_repref is recommended instead of these functions.


Next: , Previous: , Up: Rational Interval Functions   [Index]