mpfr
binary operators with a natural operandFunctions with these names take an argument of the form
(
x,
n)
, where x is an mpfr
number
and n is a natural number.
root
pow_ui
mul_2ui
div_2ui
grow
shrink
The last two are specific to the virtual code interface, having no
counterpart in the native API of the mpfr
library. The
grow
function returns a copy of x with its precision
increased by n bits, and the shrink
function returns a
copy of x with its precision reduced by n bits.
grow
function does not directly
cause a more accurate result to be computed, but only pads an existing
number with zeros.
shrink
function does not prevent
valid bits from being discarded.
The appropriate way to use grow
is to grow the precision of an
operand before applying an operator to it, which will cause the result
to be computed to the full precision. This capability is suitable for
algorithms that iterate over increasing precisions until a stopping
criterion is met.