10#ifndef CDT_PLUSPLUS_MPFR_VALUE_HPP
11#define CDT_PLUSPLUS_MPFR_VALUE_HPP
13#include <CGAL/Gmpfr.h>
20namespace cdt::mpfr_values
32 static_assert(std::is_nothrow_destructible_v<Value>,
33 "MPFR values must release their resources without throwing.");
37 static_cast<Value::Precision_type
>(
PRECISION);
68 throw std::invalid_argument(
"MPFR decimal value must not be null.");
73 throw std::invalid_argument(
"Invalid decimal MPFR value.");
102 auto result =
zero();
113 auto result =
zero();
124 auto result =
zero();
125 mpfr_div(result.fr(), numerator.fr(), denominator.fr(),
rounding_mode);
133 auto result =
zero();
142 auto result =
zero();
151 auto result =
zero();
160 auto result =
zero();
169 auto result =
zero();
auto multiply(Value const &left, Value const &right) -> Value
auto square_root(Value const &value) -> Value
auto negate(Value const &value) -> Value
constexpr auto rounding_mode
auto from_integer(long const value) -> Value
auto from_long_double(long double const value) -> Value
auto inverse_hyperbolic_sine(Value const &value) -> Value
auto subtract(Value const &left, Value const &right) -> Value
auto add(Value const &left, Value const &right) -> Value
auto from_decimal(char const *value) -> Value
auto to_double(Value const &value) -> double
auto arc_cosine(Value const &value) -> Value
auto exponential(Value const &value) -> Value
auto divide(Value const &numerator, Value const &denominator) -> Value
auto to_long_double(Value const &value) -> long double
constexpr auto precision
Precision in bits assigned to values created by this namespace.
CGAL::Gmpfr Value
Owning arbitrary-precision floating-point value used by CDT++.
Global integer and precision settings.
constexpr Int_precision PRECISION
Sets the precision for MPFR.