Next: Interval Conversion Functions, Previous: Initialisation Functions, Up: Rational Interval Functions [Index]
These functions and macros assign new values to already initialised rational intervals.
Assign rop from op.
Set the value of op to the singleton intervals [0/1,0/1] (zero) and [0/0,0/0] (NaN), respectively.
Set the value of rop to the singleton interval [op,op].
Set the value of rop to the best rational interval approximation
of the quadratic irrational number (op1+sqrt(op2))/op3
with a guaranteed precision of at least prec bits
and with respect to the surrounding srnd.
The result remains undefined
if the radicand op2 is negative
or if the divisor op3 is zero.
While the macro mpri_set_qi_z
is its natural high-level wrapper,
the inline function mpri_set_qi_q
belongs to one of the efficient wrappers
implemented around the low-level function mpri_set_qi_z_ASGMT
.
Set the value of rop to the best rational interval approximation
of the number op
(respectively, a rational number and a double
)
with a guaranteed precision of at least prec bits
and with respect to the surrounding srnd.
Both are inline wrappers efficiently built
around the low-level function mpri_set_qi_z_ASGMT
;
a rational being a degenerate quadratic irrational,
a double
an approximative rational representation of a real number.
Set the value of rop to the best rational interval approximation
of the square root of op,
sqrt(op),
with a guaranteed precision of at least prec bits
and with respect to the surrounding srnd.
The result is undefined if the radicand op is negative.
It is an inline function that efficiently wraps
around the low-level function mpri_set_qi_z_ASGMT
.
Set the value of rop to the best rational interval approximation
of the reciprocal square root of op,
literally sqrt(op)/op,
with a guaranteed precision of at least prec bits
and with respect to the surrounding srnd.
The result stays undefined if the operand op is either negative or zero.
This inline function is an efficient wrapper built
around the low-level function mpri_set_qi_z_ASGMT
.
Swap the values rop1 and rop2 efficiently.
Next: Interval Conversion Functions, Previous: Initialisation Functions, Up: Rational Interval Functions [Index]