|
| template<std::floating_point T> |
| constexpr T | jau::adeg_to_rad (const T arc_degree) noexcept |
| | Converts arc-degree to radians.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::almost_equal (const T &a, const T &b, int ulp=1, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * |a+b| * ulp, where |a+b| scales epsilon to the magnitude of used values.
|
| |
| constexpr uint64_t | jau::bit_value (const double a) noexcept |
| | Returns the unsigned integer representation according to IEEE 754 (IEC 559) double floating-point bit layout.
|
| |
| constexpr uint32_t | jau::bit_value (const float a) noexcept |
| | Returns the unsigned integer representation according to IEEE 754 (IEC 559) single floating-point bit layout.
|
| |
| constexpr uint64_t | jau::bit_value_raw (const double a) noexcept |
| | Returns the unsigned integer representation according to IEEE 754 (IEC 559) double floating-point bit layout.
|
| |
| constexpr uint32_t | jau::bit_value_raw (const float a) noexcept |
| | Returns the unsigned integer representation according to IEEE 754 (IEC 559) single floating-point bit layout.
|
| |
| template<std::floating_point T> |
| jau::uint_bytes_t< sizeof(T)> | jau::bit_value_raw (const T a) noexcept |
| | Returns the unsigned integer representation according to IEEE 754 (IEC 559) floating-point bit layout.
|
| |
| template<std::floating_point T> |
| constexpr int | jau::compare (const T a, const T b) noexcept |
| | Returns -1, 0 or 1 if a is less, equal or greater than b, disregarding epsilon but considering NaN, -Inf and +Inf.
|
| |
| template<std::floating_point T> |
| constexpr int | jau::compare (const T a, const T b, const T epsilon) noexcept |
| | Returns -1, 0 or 1 if a is less, equal or greater than b, considering epsilon and NaN, -Inf and +Inf.
|
| |
| constexpr double | jau::double_value (const uint64_t a) noexcept |
| | Converting IEEE 754 (IEC 559) double floating-point bit layout to double, see bit_value()
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::equals (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if both values are equal, i.e.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::equals (const T &a, const T &b, int ulp, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true, if both floating point values are equal in the sense that their potential difference is less or equal epsilon * ulp.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::equals2 (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if both values are equal, i.e.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::equals_raw (const T &a, const T &b) noexcept |
| | Returns true if both values are equal disregarding epsilon but considering NaN, -Inf and +Inf.
|
| |
| constexpr float | jau::float_value (const uint32_t a) noexcept |
| | Converting IEEE 754 (IEC 559) single floating-point bit layout to float, see bit_value()
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::is_zero (const T &a, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if the given value is less than epsilon, w/ epsilon > 0.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::is_zero2f (const T &a, const T &b, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if all given values a and b are less than epsilon, w/ epsilon > 0.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::is_zero3f (const T &a, const T &b, const T &c, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if all given values a, b and c are less than epsilon, w/ epsilon > 0.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::is_zero4f (const T &a, const T &b, const T &c, const T &d, const T &epsilon=std::numeric_limits< T >::epsilon()) noexcept |
| | Returns true if all given values a, b, c and d are less than epsilon, w/ epsilon > 0.
|
| |
| template<std::floating_point T> |
| constexpr bool | jau::is_zero_raw (const T &a) noexcept |
| | Returns true if the given value is zero, disregarding epsilon but considering NaN, -Inf and +Inf.
|
| |
| template<std::floating_point T> |
| T | jau::machineEpsilon () noexcept |
| | Calculates the smallest floating point value approximation the given type T can represent, the machine epsilon of T.
|
| |
| template<std::floating_point T> |
| std::string & | jau::mat_to_string (std::string &sb, const std::string &rowPrefix, const std::string_view f, const T a[], const jau::nsize_t rows, const jau::nsize_t columns, const bool rowMajorOrder) noexcept |
| | Appends a matrix of floating points to the given string sb
|
| |
| template<std::floating_point T> |
| constexpr T | jau::rad_to_adeg (const T rad) noexcept |
| | Converts radians to arc-degree.
|
| |
| template<std::floating_point T> |
| constexpr jau::sint_bytes_t< sizeof(T)> | jau::round_to_int (const T v) noexcept |
| | Returns the rounded value cast to signed int.
|
| |
| template<std::floating_point T> |
| constexpr jau::uint_bytes_t< sizeof(T)> | jau::round_to_uint (const T v) noexcept |
| | Returns the rounded value cast to unsigned int.
|
| |
| template<std::floating_point T> |
| std::string & | jau::row_to_string (std::string &sb, const std::string_view f, const T a[], const jau::nsize_t rows, const jau::nsize_t columns, const bool rowMajorOrder, const jau::nsize_t row) noexcept |
| | Appends a row of floating points to the given string sb
|
| |
|
| constexpr uint64_t const | jau::double_iec559_exp_mask = 0x7ff0000000000000_u64 |
| | Exponent mask bits 52-62 of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint64_t const | jau::double_iec559_mant_mask = 0x000fffffffffffff_u64 |
| | Mantissa mask bits 0-51 of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint64_t const | jau::double_iec559_nan_bitval = 0x7ff8000000000000_u64 |
| | NaN bit-value of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint64_t const | jau::double_iec559_negative_inf_bitval = 0xfff0000000000000_u64 |
| | Negative infinity bit-value of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint64_t const | jau::double_iec559_positive_inf_bitval = 0x7ff0000000000000_u64 |
| | Positive infinity bit-value of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint64_t const | jau::double_iec559_sign_bit = 1_u64 << 63 |
| | Signed bit 63 of IEEE 754 (IEC 559) double double-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_exp_mask = 0x7f800000_u32 |
| | Exponent mask bits 23-30 of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_mant_mask = 0x007fffff_u32 |
| | Mantissa mask bits 0-22 of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_nan_bitval = 0x7fc00000_u32 |
| | NaN bit-value of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_negative_inf_bitval = 0xff800000_u32 |
| | Negative infinity bit-value of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_positive_inf_bitval = 0x7f800000_u32 |
| | Positive infinity bit-value of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |
| constexpr uint32_t const | jau::float_iec559_sign_bit = 1_u32 << 31 |
| | Signed bit 31 of IEEE 754 (IEC 559) single float-point bit layout, i.e.
|
| |