mp_float_t

enum mpfr::precision_t

The count of bits that make up the number’s mantissa.

This must be a strictly positive value.

Values:

struct mpfr::digits2

Number of digits in base 2.

Public Functions

constexpr digits2(std::uint64_t value) noexcept

Constructs with the given number of digits.

constexpr digits2(precision_t prec) noexcept

Converts from precision enum.

constexpr operator precision_t() const noexcept

Converts to precision enum.

struct mpfr::digits10

Number of digits in base 10.

The actual precision may be slightly larger since the conversion between base 2 and base 10 is inexact.

Public Functions

constexpr digits10(std::uint64_t value) noexcept

Constructs with the given number of digits.

constexpr digits10(precision_t prec) noexcept

Converts from precision enum.

constexpr operator precision_t() const noexcept

Converts to precision enum.

template<precision_t Precision>
struct mpfr::mp_float_t

Stack allocated fixed precision floating point.

Arithmetic and comparison operators follow IEEE 754 rules.

Arithmetic operators

auto operator+() const noexcept -> mp_float_t

auto operator-() const noexcept -> mp_float_t

Assignment arithmetic operators

auto operator-=(mp_float_t const &b) noexcept -> mp_float_t&

auto operator*=(mp_float_t const &b) noexcept -> mp_float_t&

auto operator/=(mp_float_t const &b) noexcept -> mp_float_t&

Public Functions

mp_float_t() noexcept

Default/Zero initialization sets the number to positive zero.

mp_float_t<_> a;

mp_float_t<_> a{};

template<typename T, typename = _::enable_if_t<_::is_arithmetic<T>::value>>
mp_float_t(T const &a) noexcept

template<typename T, typename = _::enable_if_t<_::is_arithmetic<T>::value>>
auto operator=(T const &a) noexcept -> mp_float_t&

operator long double() const noexcept

Friends

template<typename CharT, typename Traits>
friend auto operator<<(std::basic_ostream<CharT, Traits> &out, mp_float_t const &a) -> std::basic_ostream<CharT, Traits>&

Write the number to an output stream.

template<typename U, typename V>
sfinae_common_return_type mpfr::operator+(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_common_return_type mpfr::operator-(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_common_return_type mpfr::operator*(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_common_return_type mpfr::operator/(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator==(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator!=(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator<(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator<=(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator>(U const &a, V const &b) noexcept

template<typename U, typename V>
sfinae_bool mpfr::operator>=(U const &a, V const &b) noexcept

template<mpfr::precision_t Precision>
struct std::numeric_limits<mpfr::mp_float_t<Precision>>

Specialization of the standard library numeric limits.

Public Static Functions

auto max() noexcept -> T

Largest finite number.

auto min() noexcept -> T

Smallest strictly positive number.

auto lowest() noexcept -> T

Smallest finite number.

auto epsilon() noexcept -> T

Distance between 1 and the smallest number larger than 1.

constexpr auto round_error() noexcept -> T

Largest possible error in ULP.

auto infinity() noexcept -> T

Positive infinity.

auto quiet_NaN() noexcept -> T

Not a number.

constexpr auto signaling_NaN() noexcept -> T

Not a number.