xte::big_int<T>::root()

Defined in header <xte/math/big_int.hpp>


Definition

[[nodiscard]] constexpr xte::big_int<T> root(const xte::big_int<T>& degree) const noexcept(false);
Computes the root of a big-integer to a given degree. May throw if allocation fails, the radicand is negative, or the degree is zero.



Example

static_assert(xte::big_int(125).root(3) == 5);
[View in Compiler Explorer]