xieite::big_int<T>::log()

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

Estimates the logarithm of a xieite::big_int<T> {} of a base. Throws std::out_of_range {} if the anti-logarithm is negative, the base is 1, or the base is negative.


Declaration

#0
[[nodiscard]] constexpr xieite::big_int<T> log(const xieite::big_int<T>& base) const;

#1
template<std::integral U>
[[nodiscard]] constexpr xieite::big_int<T> log(U base) const;


Example

int main() {
	xieite::dump(xieite::big_int(1000).log(10).str());
}
Output:
3
[View in Compiler Explorer]