Skip to main content

Module root

Module root 

Source
Expand description

root_u_prec_round and related functions, for computing roots of Floats.

Functions§

primitive_float_root_s
Takes the $k$th root of a primitive float, where $k$ may be negative. The result is correctly rounded.
primitive_float_root_s_rational
Takes the $k$th root of a Rational, where $k$ may be negative, returning the result as a primitive float. The result is correctly rounded.
primitive_float_root_u
Takes the $k$th root of a primitive float. The result is correctly rounded. In particular, primitive_float_root_u(x, 3) is a correctly-rounded cube root, unlike the standard library’s cbrt.
primitive_float_root_u_rational
Takes the $k$th root of a Rational, returning the result as a primitive float. The result is correctly rounded.