40 template<
typename type_t>
41 requires xtd::real<type_t>
57 static constexpr type_t
epsilon = std::numeric_limits<type_t>::denorm_min();
60 static constexpr type_t
max_value = std::numeric_limits<type_t>::max();
63 static constexpr type_t
min_value = std::numeric_limits<type_t>::lowest();
66 static constexpr type_t
NaN = std::numeric_limits<type_t>::quiet_NaN();
90 [[nodiscard]]
static auto is_NaN(type_t
value)
noexcept ->
bool {
return std::fpclassify(
value) == FP_NAN;}
100 [[nodiscard]]
static auto is_normal(type_t
value)
noexcept ->
bool {
return std::fpclassify(
value) == FP_NORMAL;}
121 [[nodiscard]]
static auto is_zero(type_t
value)
noexcept ->
bool {
return std::fpclassify(
value) == FP_ZERO;}
Contains xtd::box struct.
Represents a boxed floating point object.
Definition box_floating_point.hpp:42
static constexpr decimal epsilon
Definition box_floating_point.hpp:57
static constexpr decimal min_value
Definition box_floating_point.hpp:63
static constexpr decimal NaN
Definition box_floating_point.hpp:66
static constexpr decimal max_value
Definition box_floating_point.hpp:60
static auto is_finite(type_t value) noexcept -> bool
Determines whether the specified value is finite (zero, subnormal, or normal).
Definition box_floating_point.hpp:81
static auto is_subnormal(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to subnormal.
Definition box_floating_point.hpp:110
static auto is_positive_infinity(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to positive infinity.
Definition box_floating_point.hpp:105
static auto is_zero(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to zero.
Definition box_floating_point.hpp:121
static auto is_normal(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to normal, i.e. not an infinity,...
Definition box_floating_point.hpp:100
static auto is_valid(type_t value) noexcept -> bool
Determines whether the specified value can be safely converted to type_t without overflow.
Definition box_floating_point.hpp:116
static constexpr decimal positive_infinity
Definition box_floating_point.hpp:72
static auto is_infinity(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to negative or positive infinity.
Definition box_floating_point.hpp:85
static auto parse(const xtd::string &value, xtd::number_styles styles) -> type_t
Converts the string to its type_t equivalent.
Definition box_floating_point.hpp:127
static auto is_negative_infinity(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to negative infinity.
Definition box_floating_point.hpp:95
static auto is_NaN(type_t value) noexcept -> bool
Returns a value indicating whether the specified number evaluates to not a number.
Definition box_floating_point.hpp:90
static constexpr decimal negative_infinity
Definition box_floating_point.hpp:69
static auto try_parse(const xtd::string &value, type_t &result, xtd::number_styles styles) noexcept -> bool
Converts the string to its type_t equivalent.
Definition box_floating_point.hpp:133
Contains xtd::decimal type.
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
long double decimal
Represents a decimal-precision floating-point number.
Definition decimal.hpp:23
number_styles
Determines the styles permitted in numeric string arguments that are passed to the xtd::parse and xtd...
Definition number_styles.hpp:16
value_t parse(const std::string &str)
Convert a string into a type.
Definition parse.hpp:34
bool try_parse(const std::basic_string< char > &str, value_t &value) noexcept
Convert a string into a type.
Definition parse.hpp:416
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::real concept.
Represents a boxed object.
Definition box.hpp:56
value_type value
Gets or sets the underlying value.
Definition box.hpp:106