half > Class Reference

half > Class Reference#

half: std::numeric_limits< half_float::half > Class Reference
std::numeric_limits< half_float::half > Class Reference

Numeric limits for half-precision floats. More...

#include <half.hpp>

Inherits numeric_limits< float >.

Static Public Member Functions

static constexpr half_float::half min () noexcept
 Smallest positive normal value.
 
static constexpr half_float::half lowest () noexcept
 Smallest finite value.
 
static constexpr half_float::half max () noexcept
 Largest finite value.
 
static constexpr half_float::half epsilon () noexcept
 Difference between one and next representable value.
 
static constexpr half_float::half round_error () noexcept
 Maximum rounding error.
 
static constexpr half_float::half infinity () noexcept
 Positive infinity.
 
static constexpr half_float::half quiet_NaN () noexcept
 Quiet NaN.
 
static constexpr half_float::half signaling_NaN () noexcept
 Signalling NaN.
 
static constexpr half_float::half denorm_min () noexcept
 Smallest positive subnormal value.
 

Static Public Attributes

static constexpr bool is_signed = true
 Supports signed values.
 
static constexpr bool is_exact = false
 Is not exact.
 
static constexpr bool is_modulo = false
 Doesn't provide modulo arithmetic.
 
static constexpr bool is_iec559 = true
 IEEE conformant.
 
static constexpr bool has_infinity = true
 Supports infinity.
 
static constexpr bool has_quiet_NaN = true
 Supports quiet NaNs.
 
static constexpr float_denorm_style has_denorm = denorm_present
 Supports subnormal values.
 
static constexpr float_round_style round_style
 Rounding mode. More...
 
static constexpr int digits = 11
 Significant digits.
 
static constexpr int digits10 = 3
 Significant decimal digits.
 
static constexpr int max_digits10 = 5
 Required decimal digits to represent all possible values.
 
static constexpr int radix = 2
 Number base.
 
static constexpr int min_exponent = -13
 One more than smallest exponent.
 
static constexpr int min_exponent10 = -4
 Smallest normalized representable power of 10.
 
static constexpr int max_exponent = 16
 One more than largest exponent.
 
static constexpr int max_exponent10 = 4
 Largest finitely representable power of 10.
 

Detailed Description

Numeric limits for half-precision floats.

Because of the underlying single-precision implementation of many operations, it inherits some properties from std::numeric_limits<float>.

Definition at line 2953 of file half.hpp.

Member Data Documentation

◆ round_style

constexpr float_round_style std::numeric_limits< half_float::half >::round_style
staticconstexpr
Initial value:
= (std::numeric_limits<float>::round_style==
static const std::float_round_style round_style
Rounding mode to use.
Definition: half.hpp:1181

Rounding mode.

Due to the mix of internal single-precision computations (using the rounding mode of the underlying single-precision implementation) with the rounding mode of the single-to-half conversions, the actual rounding mode might be std::round_indeterminate if the default half-precision rounding mode doesn't match the single-precision rounding mode.

Definition at line 2982 of file half.hpp.


The documentation for this class was generated from the following file:
  • /home/docs/checkouts/readthedocs.org/user_builds/advanced-micro-devices-half/checkouts/latest/include/half.hpp