Half-precision floating-point type.
This class implements an IEEE-conformant half-precision floating-point type with the usual arithmetic operators and conversions. It is implicitly convertible to single-precision floating-point, which makes artihmetic expressions and functions with mixed-type operands to be of the most precise operand type.
According to the C++98/03 definition, the half type is not a POD type. But according to C++11's less strict and extended definitions it is both a standard layout type and a trivially copyable type (even if not a POD type), which means it can be standard-conformantly copied using raw binary copies. But in this context some more words about the actual size of the type. Although the half is representing an IEEE 16-bit type, it does not neccessarily have to be of exactly 16-bits size. But on any reasonable implementation the actual binary representation of this type will most probably not ivolve any additional "magic" or padding beyond the simple binary representation of the underlying 16-bit IEEE number, even if not strictly guaranteed by the standard. But even then it only has an actual size of 16 bits if your C++ implementation supports an unsigned integer type of exactly 16 bits width. But this should be the case on nearly any reasonable platform.
So if your C++ implementation is not totally exotic or imposes special alignment requirements, it is a reasonable assumption that the data of a half is just comprised of the 2 bytes of the underlying IEEE representation.
Definition at line 2072 of file includes/half.hpp.
Public Member Functions | |
Construction and assignment | |
| HALF_CONSTEXPR | half () HALF_NOEXCEPT |
| Default constructor. More... | |
| half (float rhs) | |
| Conversion constructor. More... | |
| operator float () const | |
| Conversion to single-precision. More... | |
| half & | operator= (float rhs) |
| Assignment operator. More... | |
| HALF_CONSTEXPR | half () HALF_NOEXCEPT |
| Default constructor. More... | |
| half (float rhs) | |
| Conversion constructor. More... | |
| operator float () const | |
| Conversion to single-precision. More... | |
| half & | operator= (float rhs) |
| Assignment operator. More... | |
Arithmetic updates | |
| half & | operator+= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator-= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator*= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator/= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator+= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator-= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator*= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator/= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator+= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator-= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator*= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator/= (half rhs) |
| Arithmetic assignment. More... | |
| half & | operator+= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator-= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator*= (float rhs) |
| Arithmetic assignment. More... | |
| half & | operator/= (float rhs) |
| Arithmetic assignment. More... | |
Increment and decrement | |
| half & | operator++ () |
| Prefix increment. More... | |
| half & | operator-- () |
| Prefix decrement. More... | |
| half | operator++ (int) |
| Postfix increment. More... | |
| half | operator-- (int) |
| Postfix decrement. More... | |
| half & | operator++ () |
| Prefix increment. More... | |
| half & | operator-- () |
| Prefix decrement. More... | |
| half | operator++ (int) |
| Postfix increment. More... | |
| half | operator-- (int) |
| Postfix decrement. More... | |
Friends | |
| template<typename , typename , std::float_round_style > | |
| struct | detail::half_caster |
| class | std::numeric_limits< half > |
| HALF_CONSTEXPR_NOERR bool | operator== (half, half) |
| Comparison for equality. More... | |
| HALF_CONSTEXPR_NOERR bool | operator!= (half, half) |
| Comparison for inequality. More... | |
| HALF_CONSTEXPR_NOERR bool | operator< (half, half) |
| Comparison for less than. More... | |
| HALF_CONSTEXPR_NOERR bool | operator> (half, half) |
| Comparison for greater than. More... | |
| HALF_CONSTEXPR_NOERR bool | operator<= (half, half) |
| Comparison for less equal. More... | |
| HALF_CONSTEXPR_NOERR bool | operator>= (half, half) |
| Comparison for greater equal. More... | |
| HALF_CONSTEXPR half | operator- (half) |
| Negation. More... | |
| half | operator+ (half, half) |
| Addition. More... | |
| half | operator- (half, half) |
| Subtraction. More... | |
| half | operator* (half, half) |
| Multiplication. More... | |
| half | operator/ (half, half) |
| Division. More... | |
| template<typename charT , typename traits > | |
| std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &, half) |
| Output operator. More... | |
| template<typename charT , typename traits > | |
| std::basic_istream< charT, traits > & | operator>> (std::basic_istream< charT, traits > &, half &) |
| Input operator. More... | |
| HALF_CONSTEXPR half | fabs (half) |
| Absolute value. More... | |
| half | fmod (half, half) |
| Remainder of division. More... | |
| half | remainder (half, half) |
| Remainder of division. More... | |
| half | remquo (half, half, int *) |
| Remainder of division. More... | |
| half | fma (half, half, half) |
| Fused multiply add. More... | |
| HALF_CONSTEXPR_NOERR half | fmax (half, half) |
| Maximum of half expressions. More... | |
| HALF_CONSTEXPR_NOERR half | fmin (half, half) |
| Minimum of half expressions. More... | |
| half | fdim (half, half) |
| Positive difference. More... | |
| half | nanh (const char *) |
| Get NaN value. More... | |
| half | exp (half) |
| Exponential function. More... | |
| half | exp2 (half) |
| Binary exponential. More... | |
| half | expm1 (half) |
| Exponential minus one. More... | |
| half | log (half) |
| Natural logarithm. More... | |
| half | log10 (half) |
| Common logarithm. More... | |
| half | log2 (half) |
| Binary logarithm. More... | |
| half | log1p (half) |
| Natural logarithm plus one. More... | |
| half | sqrt (half) |
| Square root. More... | |
| half | rsqrt (half) |
| Inverse square root. More... | |
| half | cbrt (half) |
| Cubic root. More... | |
| half | hypot (half, half) |
| Hypotenuse function. More... | |
| half | hypot (half, half, half) |
| Hypotenuse function. More... | |
| half | pow (half, half) |
| Power function. More... | |
| void | sincos (half, half *, half *) |
| Compute sine and cosine simultaneously. More... | |
| half | sin (half) |
| Sine function. More... | |
| half | cos (half) |
| Cosine function. More... | |
| half | tan (half) |
| Tangent function. More... | |
| half | asin (half) |
| Arc sine. More... | |
| half | acos (half) |
| Arc cosine function. More... | |
| half | atan (half) |
| Arc tangent function. More... | |
| half | atan2 (half, half) |
| Arc tangent function. More... | |
| half | sinh (half) |
| Hyperbolic sine. More... | |
| half | cosh (half) |
| Hyperbolic cosine. More... | |
| half | tanh (half) |
| Hyperbolic tangent. More... | |
| half | asinh (half) |
| Hyperbolic area sine. More... | |
| half | acosh (half) |
| Hyperbolic area cosine. More... | |
| half | atanh (half) |
| Hyperbolic area tangent. More... | |
| half | erf (half) |
| Error function. More... | |
| half | erfc (half) |
| Complementary error function. More... | |
| half | lgamma (half) |
| Natural logarithm of gamma function. More... | |
| half | tgamma (half) |
| Gamma function. More... | |
| half | ceil (half) |
| Nearest integer not less than half value. More... | |
| half | floor (half) |
| Nearest integer not greater than half value. More... | |
| half | trunc (half) |
| Nearest integer not greater in magnitude than half value. More... | |
| half | round (half) |
| Nearest integer. More... | |
| long | lround (half) |
| Nearest integer. More... | |
| half | rint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| long | lrint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| half | nearbyint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| half | frexp (half, int *) |
| Decompress floating-point number. More... | |
| half | scalbln (half, long) |
| Multiply by power of two. More... | |
| half | modf (half, half *) |
| Extract integer and fractional parts. More... | |
| int | ilogb (half) |
| Extract exponent. More... | |
| half | logb (half) |
| Extract exponent. More... | |
| half | nextafter (half, half) |
| Next representable value. More... | |
| half | nexttoward (half, long double) |
| Next representable value. More... | |
| HALF_CONSTEXPR half | copysign (half, half) |
| Take sign. More... | |
| HALF_CONSTEXPR int | fpclassify (half) |
| Classify floating-point value. More... | |
| HALF_CONSTEXPR bool | isfinite (half) |
| Check if finite number. More... | |
| HALF_CONSTEXPR bool | isinf (half) |
| Check for infinity. More... | |
| HALF_CONSTEXPR bool | isnan (half) |
| Check for NaN. More... | |
| HALF_CONSTEXPR bool | isnormal (half) |
| Check if normal number. More... | |
| HALF_CONSTEXPR bool | signbit (half) |
| Check sign. More... | |
| HALF_CONSTEXPR bool | isgreater (half, half) |
| Quiet comparison for greater than. More... | |
| HALF_CONSTEXPR bool | isgreaterequal (half, half) |
| Quiet comparison for greater equal. More... | |
| HALF_CONSTEXPR bool | isless (half, half) |
| Quiet comparison for less than. More... | |
| HALF_CONSTEXPR bool | islessequal (half, half) |
| Quiet comparison for less equal. More... | |
| HALF_CONSTEXPR bool | islessgreater (half, half) |
| Quiet comarison for less or greater. More... | |
| HALF_CONSTEXPR_NOERR bool | operator== (half, half) |
| Comparison for equality. More... | |
| HALF_CONSTEXPR_NOERR bool | operator!= (half, half) |
| Comparison for inequality. More... | |
| HALF_CONSTEXPR_NOERR bool | operator< (half, half) |
| Comparison for less than. More... | |
| HALF_CONSTEXPR_NOERR bool | operator> (half, half) |
| Comparison for greater than. More... | |
| HALF_CONSTEXPR_NOERR bool | operator<= (half, half) |
| Comparison for less equal. More... | |
| HALF_CONSTEXPR_NOERR bool | operator>= (half, half) |
| Comparison for greater equal. More... | |
| HALF_CONSTEXPR half | operator- (half) |
| Negation. More... | |
| half | operator+ (half, half) |
| Addition. More... | |
| half | operator- (half, half) |
| Subtraction. More... | |
| half | operator* (half, half) |
| Multiplication. More... | |
| half | operator/ (half, half) |
| Division. More... | |
| template<typename charT , typename traits > | |
| std::basic_ostream< charT, traits > & | operator<< (std::basic_ostream< charT, traits > &, half) |
| Output operator. More... | |
| template<typename charT , typename traits > | |
| std::basic_istream< charT, traits > & | operator>> (std::basic_istream< charT, traits > &, half &) |
| Input operator. More... | |
| HALF_CONSTEXPR half | fabs (half) |
| Absolute value. More... | |
| half | fmod (half, half) |
| Remainder of division. More... | |
| half | remainder (half, half) |
| Remainder of division. More... | |
| half | remquo (half, half, int *) |
| Remainder of division. More... | |
| half | fma (half, half, half) |
| Fused multiply add. More... | |
| HALF_CONSTEXPR_NOERR half | fmax (half, half) |
| Maximum of half expressions. More... | |
| HALF_CONSTEXPR_NOERR half | fmin (half, half) |
| Minimum of half expressions. More... | |
| half | fdim (half, half) |
| Positive difference. More... | |
| half | nanh (const char *) |
| Get NaN value. More... | |
| half | exp (half) |
| Exponential function. More... | |
| half | exp2 (half) |
| Binary exponential. More... | |
| half | expm1 (half) |
| Exponential minus one. More... | |
| half | log (half) |
| Natural logarithm. More... | |
| half | log10 (half) |
| Common logarithm. More... | |
| half | log2 (half) |
| Binary logarithm. More... | |
| half | log1p (half) |
| Natural logarithm plus one. More... | |
| half | sqrt (half) |
| Square root. More... | |
| half | rsqrt (half) |
| Inverse square root. More... | |
| half | cbrt (half) |
| Cubic root. More... | |
| half | hypot (half, half) |
| Hypotenuse function. More... | |
| half | hypot (half, half, half) |
| Hypotenuse function. More... | |
| half | pow (half, half) |
| Power function. More... | |
| void | sincos (half, half *, half *) |
| Compute sine and cosine simultaneously. More... | |
| half | sin (half) |
| Sine function. More... | |
| half | cos (half) |
| Cosine function. More... | |
| half | tan (half) |
| Tangent function. More... | |
| half | asin (half) |
| Arc sine. More... | |
| half | acos (half) |
| Arc cosine function. More... | |
| half | atan (half) |
| Arc tangent function. More... | |
| half | atan2 (half, half) |
| Arc tangent function. More... | |
| half | sinh (half) |
| Hyperbolic sine. More... | |
| half | cosh (half) |
| Hyperbolic cosine. More... | |
| half | tanh (half) |
| Hyperbolic tangent. More... | |
| half | asinh (half) |
| Hyperbolic area sine. More... | |
| half | acosh (half) |
| Hyperbolic area cosine. More... | |
| half | atanh (half) |
| Hyperbolic area tangent. More... | |
| half | erf (half) |
| Error function. More... | |
| half | erfc (half) |
| Complementary error function. More... | |
| half | lgamma (half) |
| Natural logarithm of gamma function. More... | |
| half | tgamma (half) |
| Gamma function. More... | |
| half | ceil (half) |
| Nearest integer not less than half value. More... | |
| half | floor (half) |
| Nearest integer not greater than half value. More... | |
| half | trunc (half) |
| Nearest integer not greater in magnitude than half value. More... | |
| half | round (half) |
| Nearest integer. More... | |
| long | lround (half) |
| Nearest integer. More... | |
| half | rint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| long | lrint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| half | nearbyint (half) |
| Nearest integer using half's internal rounding mode. More... | |
| half | frexp (half, int *) |
| Decompress floating-point number. More... | |
| half | scalbln (half, long) |
| Multiply by power of two. More... | |
| half | modf (half, half *) |
| Extract integer and fractional parts. More... | |
| int | ilogb (half) |
| Extract exponent. More... | |
| half | logb (half) |
| Extract exponent. More... | |
| half | nextafter (half, half) |
| Next representable value. More... | |
| half | nexttoward (half, long double) |
| Next representable value. More... | |
| HALF_CONSTEXPR half | copysign (half, half) |
| Take sign. More... | |
| HALF_CONSTEXPR int | fpclassify (half) |
| Classify floating-point value. More... | |
| HALF_CONSTEXPR bool | isfinite (half) |
| Check if finite number. More... | |
| HALF_CONSTEXPR bool | isinf (half) |
| Check for infinity. More... | |
| HALF_CONSTEXPR bool | isnan (half) |
| Check for NaN. More... | |
| HALF_CONSTEXPR bool | isnormal (half) |
| Check if normal number. More... | |
| HALF_CONSTEXPR bool | signbit (half) |
| Check sign. More... | |
| HALF_CONSTEXPR bool | isgreater (half, half) |
| Quiet comparison for greater than. More... | |
| HALF_CONSTEXPR bool | isgreaterequal (half, half) |
| Quiet comparison for greater equal. More... | |
| HALF_CONSTEXPR bool | isless (half, half) |
| Quiet comparison for less than. More... | |
| HALF_CONSTEXPR bool | islessequal (half, half) |
| Quiet comparison for less equal. More... | |
| HALF_CONSTEXPR bool | islessgreater (half, half) |
| Quiet comarison for less or greater. More... | |
| template<typename , typename , std::float_round_style > | |
| struct | detail::half_caster |
|
inline |
Default constructor.
This initializes the half to 0. Although this does not match the builtin types' default-initialization semantics and may be less efficient than no initialization, it is needed to provide proper value-initialization semantics.
Definition at line 2081 of file includes/half.hpp.
Referenced by operator++(), and operator--().
|
inlineexplicit |
Conversion constructor.
| rhs | float to convert |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2086 of file includes/half.hpp.
|
inline |
Default constructor.
This initializes the half to 0. Although this does not match the builtin types' default-initialization semantics and may be less efficient than no initialization, it is needed to provide proper value-initialization semantics.
Definition at line 2081 of file 9.2/includes/half.hpp.
|
inlineexplicit |
Conversion constructor.
| rhs | float to convert |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2086 of file 9.2/includes/half.hpp.
|
inline |
Conversion to single-precision.
Definition at line 2090 of file includes/half.hpp.
|
inline |
Conversion to single-precision.
Definition at line 2090 of file 9.2/includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to multiply with |
| FE_... | according to operator=() |
Definition at line 2146 of file includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to multiply with |
| FE_... | according to operator=() |
Definition at line 2146 of file 9.2/includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to multiply with |
| FE_... | according to operator*(half,half) |
Definition at line 2121 of file includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to multiply with |
| FE_... | according to operator*(half,half) |
Definition at line 2121 of file 9.2/includes/half.hpp.
|
inline |
Prefix increment.
| FE_... | according to operator+(half,half) |
Definition at line 2161 of file includes/half.hpp.
References half_float::detail::binary, and half().
|
inline |
Prefix increment.
| FE_... | according to operator+(half,half) |
Definition at line 2161 of file 9.2/includes/half.hpp.
References half_float::detail::binary, and half().
|
inline |
Postfix increment.
| FE_... | according to operator+(half,half) |
Definition at line 2171 of file 9.2/includes/half.hpp.
|
inline |
Postfix increment.
| FE_... | according to operator+(half,half) |
Definition at line 2171 of file includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to add |
| FE_... | according to operator=() |
Definition at line 2134 of file 9.2/includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to add |
| FE_... | according to operator=() |
Definition at line 2134 of file includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to add |
| FE_... | according to operator+(half,half) |
Definition at line 2107 of file 9.2/includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to add |
| FE_... | according to operator+(half,half) |
Definition at line 2107 of file includes/half.hpp.
|
inline |
Prefix decrement.
| FE_... | according to operator-(half,half) |
Definition at line 2166 of file includes/half.hpp.
References half_float::detail::binary, and half().
|
inline |
Prefix decrement.
| FE_... | according to operator-(half,half) |
Definition at line 2166 of file 9.2/includes/half.hpp.
References half_float::detail::binary, and half().
|
inline |
Postfix decrement.
| FE_... | according to operator-(half,half) |
Definition at line 2176 of file 9.2/includes/half.hpp.
|
inline |
Postfix decrement.
| FE_... | according to operator-(half,half) |
Definition at line 2176 of file includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to subtract |
| FE_... | according to operator=() |
Definition at line 2140 of file includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to subtract |
| FE_... | according to operator=() |
Definition at line 2140 of file 9.2/includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to subtract |
| FE_... | according to operator-(half,half) |
Definition at line 2114 of file includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to subtract |
| FE_... | according to operator-(half,half) |
Definition at line 2114 of file 9.2/includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to divide by |
| FE_... | according to operator=() |
Definition at line 2152 of file 9.2/includes/half.hpp.
|
inline |
Arithmetic assignment.
| rhs | single-precision value to divide by |
| FE_... | according to operator=() |
Definition at line 2152 of file includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to divide by |
| FE_... | according to operator/(half,half) |
Definition at line 2128 of file 9.2/includes/half.hpp.
Arithmetic assignment.
| T | type of concrete half expression |
| rhs | half expression to divide by |
| FE_... | according to operator/(half,half) |
Definition at line 2128 of file includes/half.hpp.
|
inline |
Assignment operator.
| rhs | single-precision value to copy from |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2096 of file 9.2/includes/half.hpp.
|
inline |
Assignment operator.
| rhs | single-precision value to copy from |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2096 of file includes/half.hpp.
Arc cosine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::acos.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3700 of file includes/half.hpp.
Arc cosine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::acos.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3700 of file includes/half.hpp.
Hyperbolic area cosine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::acosh.
| arg | function argument |
| FE_INVALID | for signaling NaN or arguments <1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3925 of file includes/half.hpp.
Hyperbolic area cosine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::acosh.
| arg | function argument |
| FE_INVALID | for signaling NaN or arguments <1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3925 of file includes/half.hpp.
Arc sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::asin.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3671 of file includes/half.hpp.
Arc sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::asin.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3671 of file includes/half.hpp.
Hyperbolic area sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::asinh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3897 of file includes/half.hpp.
Hyperbolic area sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::asinh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3897 of file includes/half.hpp.
Arc tangent function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::atan.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3725 of file includes/half.hpp.
Arc tangent function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::atan.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3725 of file includes/half.hpp.
Arc tangent function.
This function may be 1 ULP off the correctly rounded exact result in ~0.005% of inputs for std::round_to_nearest, in ~0.1% of inputs for std::round_toward_zero and in ~0.02% of inputs for any other rounding mode.
See also: Documentation for std::atan2.
| y | numerator |
| x | denominator |
| FE_INVALID | if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3755 of file includes/half.hpp.
Arc tangent function.
This function may be 1 ULP off the correctly rounded exact result in ~0.005% of inputs for std::round_to_nearest, in ~0.1% of inputs for std::round_toward_zero and in ~0.02% of inputs for any other rounding mode.
See also: Documentation for std::atan2.
| y | numerator |
| x | denominator |
| FE_INVALID | if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3755 of file includes/half.hpp.
Hyperbolic area tangent.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::atanh.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_DIVBYZERO | for +/-1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3950 of file includes/half.hpp.
Hyperbolic area tangent.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::atanh.
| arg | function argument |
| FE_INVALID | for signaling NaN or if abs(arg) > 1 |
| FE_DIVBYZERO | for +/-1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3950 of file includes/half.hpp.
Cubic root.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cbrt.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | according to rounding |
Definition at line 3281 of file includes/half.hpp.
Cubic root.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cbrt.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | according to rounding |
Definition at line 3281 of file includes/half.hpp.
Nearest integer not less than half value.
See also: Documentation for std::ceil.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4088 of file includes/half.hpp.
Nearest integer not less than half value.
See also: Documentation for std::ceil.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4088 of file includes/half.hpp.
|
friend |
Take sign.
See also: Documentation for std::copysign.
| x | value to change sign for |
| y | value to take sign from |
Definition at line 4359 of file includes/half.hpp.
|
friend |
Take sign.
See also: Documentation for std::copysign.
| x | value to change sign for |
| y | value to take sign from |
Definition at line 4359 of file includes/half.hpp.
Cosine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cos.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3606 of file includes/half.hpp.
Cosine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cos.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3606 of file includes/half.hpp.
Hyperbolic cosine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cosh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3838 of file includes/half.hpp.
Hyperbolic cosine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::cosh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3838 of file includes/half.hpp.
|
friend |
Definition at line 2275 of file 9.2/includes/half.hpp.
|
friend |
Definition at line 2275 of file includes/half.hpp.
Error function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.5% of inputs.
See also: Documentation for std::erf.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3983 of file includes/half.hpp.
Error function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.5% of inputs.
See also: Documentation for std::erf.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3983 of file includes/half.hpp.
Complementary error function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.5% of inputs.
See also: Documentation for std::erfc.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4005 of file includes/half.hpp.
Complementary error function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.5% of inputs.
See also: Documentation for std::erfc.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4005 of file includes/half.hpp.
Exponential function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::exp.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2953 of file includes/half.hpp.
Exponential function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::exp.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2953 of file includes/half.hpp.
Binary exponential.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::exp2.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2988 of file includes/half.hpp.
Binary exponential.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::exp2.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2988 of file includes/half.hpp.
Exponential minus one.
This function may be 1 ULP off the correctly rounded exact result in <0.05% of inputs for std::round_to_nearest and in <1% of inputs for any other rounding mode.
See also: Documentation for std::expm1.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3014 of file includes/half.hpp.
Exponential minus one.
This function may be 1 ULP off the correctly rounded exact result in <0.05% of inputs for std::round_to_nearest and in <1% of inputs for any other rounding mode.
See also: Documentation for std::expm1.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3014 of file includes/half.hpp.
|
friend |
Absolute value.
See also: Documentation for std::fabs.
| arg | operand |
Definition at line 2746 of file includes/half.hpp.
|
friend |
Absolute value.
See also: Documentation for std::fabs.
| arg | operand |
Definition at line 2746 of file includes/half.hpp.
Positive difference.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::fdim.
| x | first operand |
| y | second operand |
| FE_... | according to operator-(half,half) |
Definition at line 2921 of file includes/half.hpp.
Positive difference.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::fdim.
| x | first operand |
| y | second operand |
| FE_... | according to operator-(half,half) |
Definition at line 2921 of file includes/half.hpp.
Nearest integer not greater than half value.
See also: Documentation for std::floor.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4096 of file includes/half.hpp.
Nearest integer not greater than half value.
See also: Documentation for std::floor.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4096 of file includes/half.hpp.
Fused multiply add.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::fma.
| x | first operand |
| y | second operand |
| z | third operand |
| FE_INVALID | according to operator*() and operator+() unless any argument is a quiet NaN and no argument is a signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding the final addition |
Definition at line 2826 of file includes/half.hpp.
Fused multiply add.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::fma.
| x | first operand |
| y | second operand |
| z | third operand |
| FE_INVALID | according to operator*() and operator+() unless any argument is a quiet NaN and no argument is a signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding the final addition |
Definition at line 2826 of file includes/half.hpp.
|
friend |
Maximum of half expressions.
See also: Documentation for std::fmax.
| x | first operand |
| y | second operand |
| FE_INVALID | if x or y is signaling NaN |
Definition at line 2895 of file includes/half.hpp.
|
friend |
Maximum of half expressions.
See also: Documentation for std::fmax.
| x | first operand |
| y | second operand |
| FE_INVALID | if x or y is signaling NaN |
Definition at line 2895 of file includes/half.hpp.
|
friend |
Minimum of half expressions.
See also: Documentation for std::fmin.
| x | first operand |
| y | second operand |
| FE_INVALID | if x or y is signaling NaN |
Definition at line 2907 of file includes/half.hpp.
|
friend |
Minimum of half expressions.
See also: Documentation for std::fmin.
| x | first operand |
| y | second operand |
| FE_INVALID | if x or y is signaling NaN |
Definition at line 2907 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::fmod.
| x | first operand |
| y | second operand |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2760 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::fmod.
| x | first operand |
| y | second operand |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2760 of file includes/half.hpp.
|
friend |
Classify floating-point value.
See also: Documentation for std::fpclassify.
| arg | number to classify |
| FP_ZERO | for positive and negative zero |
| FP_SUBNORMAL | for subnormal numbers |
| FP_INFINITY | for positive and negative infinity |
| FP_NAN | for NaNs |
| FP_NORMAL | for all other (normal) values |
Definition at line 4374 of file includes/half.hpp.
|
friend |
Classify floating-point value.
See also: Documentation for std::fpclassify.
| arg | number to classify |
| FP_ZERO | for positive and negative zero |
| FP_SUBNORMAL | for subnormal numbers |
| FP_INFINITY | for positive and negative infinity |
| FP_NAN | for NaNs |
| FP_NORMAL | for all other (normal) values |
Definition at line 4374 of file includes/half.hpp.
Decompress floating-point number.
See also: Documentation for std::frexp.
| arg | number to decompress |
| exp | address to store exponent at |
| FE_INVALID | for signaling NaN |
Definition at line 4171 of file includes/half.hpp.
Decompress floating-point number.
See also: Documentation for std::frexp.
| arg | number to decompress |
| exp | address to store exponent at |
| FE_INVALID | for signaling NaN |
Definition at line 4171 of file includes/half.hpp.
Hypotenuse function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::hypot.
| x | first argument |
| y | second argument |
| FE_INVALID | if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding of the final square root |
Definition at line 3332 of file includes/half.hpp.
Hypotenuse function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::hypot.
| x | first argument |
| y | second argument |
| FE_INVALID | if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding of the final square root |
Definition at line 3332 of file includes/half.hpp.
Hypotenuse function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::hypot.
| x | first argument |
| y | second argument |
| z | third argument |
| FE_INVALID | if x, y or z is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding of the final square root |
Definition at line 3378 of file includes/half.hpp.
Hypotenuse function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::hypot.
| x | first argument |
| y | second argument |
| z | third argument |
| FE_INVALID | if x, y or z is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding of the final square root |
Definition at line 3378 of file includes/half.hpp.
|
friend |
Extract exponent.
See also: Documentation for std::ilogb.
| arg | number to query |
| FP_ILOGB0 | for zero |
| FP_ILOGBNAN | for NaN |
| INT_MAX | for infinity |
| FE_INVALID | for 0 or infinite values |
Definition at line 4264 of file includes/half.hpp.
|
friend |
Extract exponent.
See also: Documentation for std::ilogb.
| arg | number to query |
| FP_ILOGB0 | for zero |
| FP_ILOGBNAN | for NaN |
| INT_MAX | for infinity |
| FE_INVALID | for 0 or infinite values |
Definition at line 4264 of file includes/half.hpp.
|
friend |
Check if finite number.
See also: Documentation for std::isfinite.
| arg | number to check |
| true | if neither infinity nor NaN |
| false | else |
Definition at line 4388 of file includes/half.hpp.
|
friend |
Check if finite number.
See also: Documentation for std::isfinite.
| arg | number to check |
| true | if neither infinity nor NaN |
| false | else |
Definition at line 4388 of file includes/half.hpp.
|
friend |
Quiet comparison for greater than.
See also: Documentation for std::isgreater.
| x | first operand |
| y | second operand |
| true | if x greater than y |
| false | else |
Definition at line 4429 of file includes/half.hpp.
|
friend |
Quiet comparison for greater than.
See also: Documentation for std::isgreater.
| x | first operand |
| y | second operand |
| true | if x greater than y |
| false | else |
Definition at line 4429 of file includes/half.hpp.
|
friend |
Quiet comparison for greater equal.
See also: Documentation for std::isgreaterequal.
| x | first operand |
| y | second operand |
| true | if x greater equal y |
| false | else |
Definition at line 4440 of file includes/half.hpp.
|
friend |
Quiet comparison for greater equal.
See also: Documentation for std::isgreaterequal.
| x | first operand |
| y | second operand |
| true | if x greater equal y |
| false | else |
Definition at line 4440 of file includes/half.hpp.
|
friend |
Check for infinity.
See also: Documentation for std::isinf.
| arg | number to check |
| true | for positive or negative infinity |
| false | else |
Definition at line 4395 of file includes/half.hpp.
|
friend |
Check for infinity.
See also: Documentation for std::isinf.
| arg | number to check |
| true | for positive or negative infinity |
| false | else |
Definition at line 4395 of file includes/half.hpp.
|
friend |
Quiet comparison for less than.
See also: Documentation for std::isless.
| x | first operand |
| y | second operand |
| true | if x less than y |
| false | else |
Definition at line 4451 of file includes/half.hpp.
|
friend |
Quiet comparison for less than.
See also: Documentation for std::isless.
| x | first operand |
| y | second operand |
| true | if x less than y |
| false | else |
Definition at line 4451 of file includes/half.hpp.
|
friend |
Quiet comparison for less equal.
See also: Documentation for std::islessequal.
| x | first operand |
| y | second operand |
| true | if x less equal y |
| false | else |
Definition at line 4462 of file includes/half.hpp.
|
friend |
Quiet comparison for less equal.
See also: Documentation for std::islessequal.
| x | first operand |
| y | second operand |
| true | if x less equal y |
| false | else |
Definition at line 4462 of file includes/half.hpp.
|
friend |
Quiet comarison for less or greater.
See also: Documentation for std::islessgreater.
| x | first operand |
| y | second operand |
| true | if either less or greater |
| false | else |
Definition at line 4473 of file includes/half.hpp.
|
friend |
Quiet comarison for less or greater.
See also: Documentation for std::islessgreater.
| x | first operand |
| y | second operand |
| true | if either less or greater |
| false | else |
Definition at line 4473 of file includes/half.hpp.
|
friend |
Check for NaN.
See also: Documentation for std::isnan.
| arg | number to check |
| true | for NaNs |
| false | else |
Definition at line 4402 of file includes/half.hpp.
|
friend |
Check for NaN.
See also: Documentation for std::isnan.
| arg | number to check |
| true | for NaNs |
| false | else |
Definition at line 4402 of file includes/half.hpp.
|
friend |
Check if normal number.
See also: Documentation for std::isnormal.
| arg | number to check |
| true | if normal number |
| false | if either subnormal, zero, infinity or NaN |
Definition at line 4409 of file includes/half.hpp.
|
friend |
Check if normal number.
See also: Documentation for std::isnormal.
| arg | number to check |
| true | if normal number |
| false | if either subnormal, zero, infinity or NaN |
Definition at line 4409 of file includes/half.hpp.
Natural logarithm of gamma function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in ~0.025% of inputs.
See also: Documentation for std::lgamma.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_DIVBYZERO | for 0 or negative integer arguments |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4030 of file includes/half.hpp.
Natural logarithm of gamma function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in ~0.025% of inputs.
See also: Documentation for std::lgamma.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_DIVBYZERO | for 0 or negative integer arguments |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4030 of file includes/half.hpp.
Natural logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3067 of file includes/half.hpp.
Natural logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3067 of file includes/half.hpp.
Common logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log10.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3095 of file includes/half.hpp.
Common logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log10.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3095 of file includes/half.hpp.
Natural logarithm plus one.
This function may be 1 ULP off the correctly rounded exact result in <0.05% of inputs for std::round_to_nearest and in ~1% of inputs for any other rounding mode.
See also: Documentation for std::log1p.
| arg | function argument |
| FE_INVALID | for signaling NaN or argument <-1 |
| FE_DIVBYZERO | for -1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3173 of file includes/half.hpp.
Natural logarithm plus one.
This function may be 1 ULP off the correctly rounded exact result in <0.05% of inputs for std::round_to_nearest and in ~1% of inputs for any other rounding mode.
See also: Documentation for std::log1p.
| arg | function argument |
| FE_INVALID | for signaling NaN or argument <-1 |
| FE_DIVBYZERO | for -1 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3173 of file includes/half.hpp.
Binary logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log2.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3130 of file includes/half.hpp.
Binary logarithm.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::log2.
| arg | function argument |
| FE_INVALID | for signaling NaN or negative argument |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3130 of file includes/half.hpp.
Extract exponent.
See also: Documentation for std::logb.
| arg | number to query |
| FE_INVALID | for signaling NaN |
| FE_DIVBYZERO | for 0 |
Definition at line 4282 of file includes/half.hpp.
Extract exponent.
See also: Documentation for std::logb.
| arg | number to query |
| FE_INVALID | for signaling NaN |
| FE_DIVBYZERO | for 0 |
Definition at line 4282 of file includes/half.hpp.
|
friend |
Nearest integer using half's internal rounding mode.
See also: Documentation for std::lrint.
| arg | half expression to round |
| FE_INVALID | if value is not representable as long |
| FE_INEXACT | if value had to be rounded |
Definition at line 4135 of file includes/half.hpp.
|
friend |
Nearest integer using half's internal rounding mode.
See also: Documentation for std::lrint.
| arg | half expression to round |
| FE_INVALID | if value is not representable as long |
| FE_INEXACT | if value had to be rounded |
Definition at line 4135 of file includes/half.hpp.
|
friend |
Nearest integer.
See also: Documentation for std::lround.
| arg | half to round |
| FE_INVALID | if value is not representable as long |
Definition at line 4119 of file includes/half.hpp.
|
friend |
Nearest integer.
See also: Documentation for std::lround.
| arg | half to round |
| FE_INVALID | if value is not representable as long |
Definition at line 4119 of file includes/half.hpp.
Extract integer and fractional parts.
See also: Documentation for std::modf.
| arg | number to decompress |
| iptr | address to store integer part at |
| FE_INVALID | for signaling NaN |
Definition at line 4236 of file includes/half.hpp.
Extract integer and fractional parts.
See also: Documentation for std::modf.
| arg | number to decompress |
| iptr | address to store integer part at |
| FE_INVALID | for signaling NaN |
Definition at line 4236 of file includes/half.hpp.
|
friend |
Get NaN value.
See also: Documentation for std::nan.
| arg | string code |
Definition at line 2932 of file includes/half.hpp.
|
friend |
Get NaN value.
See also: Documentation for std::nan.
| arg | string code |
Definition at line 2932 of file includes/half.hpp.
Nearest integer using half's internal rounding mode.
See also: Documentation for std::nearbyint.
| arg | half expression to round |
| FE_INVALID | for signaling NaN |
Definition at line 4142 of file includes/half.hpp.
Nearest integer using half's internal rounding mode.
See also: Documentation for std::nearbyint.
| arg | half expression to round |
| FE_INVALID | for signaling NaN |
Definition at line 4142 of file includes/half.hpp.
Next representable value.
See also: Documentation for std::nextafter.
| from | value to compute next representable value for |
| to | direction towards which to compute next value |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW | for infinite result from finite argument |
| FE_UNDERFLOW | for subnormal result |
Definition at line 4308 of file includes/half.hpp.
Next representable value.
See also: Documentation for std::nextafter.
| from | value to compute next representable value for |
| to | direction towards which to compute next value |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW | for infinite result from finite argument |
| FE_UNDERFLOW | for subnormal result |
Definition at line 4308 of file includes/half.hpp.
Next representable value.
See also: Documentation for std::nexttoward.
| from | value to compute next representable value for |
| to | direction towards which to compute next value |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW | for infinite result from finite argument |
| FE_UNDERFLOW | for subnormal result |
Definition at line 4335 of file includes/half.hpp.
Next representable value.
See also: Documentation for std::nexttoward.
| from | value to compute next representable value for |
| to | direction towards which to compute next value |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW | for infinite result from finite argument |
| FE_UNDERFLOW | for subnormal result |
Definition at line 4335 of file includes/half.hpp.
|
friend |
Comparison for inequality.
| x | first operand |
| y | second operand |
| true | if operands not equal |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2494 of file includes/half.hpp.
|
friend |
Comparison for inequality.
| x | first operand |
| y | second operand |
| true | if operands not equal |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2494 of file includes/half.hpp.
Multiplication.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if multiplying 0 with infinity or if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2635 of file includes/half.hpp.
Multiplication.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if multiplying 0 with infinity or if x or y is signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2635 of file includes/half.hpp.
Addition.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if x and y are infinities with different signs or signaling NaNs |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2569 of file includes/half.hpp.
Addition.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if x and y are infinities with different signs or signaling NaNs |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2569 of file includes/half.hpp.
|
friend |
Negation.
| arg | operand |
Definition at line 2560 of file includes/half.hpp.
|
friend |
Negation.
| arg | operand |
Definition at line 2560 of file includes/half.hpp.
Subtraction.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if x and y are infinities with equal signs or signaling NaNs |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2619 of file includes/half.hpp.
Subtraction.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if x and y are infinities with equal signs or signaling NaNs |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2619 of file includes/half.hpp.
Division.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if dividing 0s or infinities with each other or if x or y is signaling NaN |
| FE_DIVBYZERO | if dividing finite value by 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2668 of file includes/half.hpp.
Division.
This operation is exact to rounding for all rounding modes.
| x | left operand |
| y | right operand |
| FE_INVALID | if dividing 0s or infinities with each other or if x or y is signaling NaN |
| FE_DIVBYZERO | if dividing finite value by 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2668 of file includes/half.hpp.
|
friend |
Comparison for less than.
| x | first operand |
| y | second operand |
| true | if x less than y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2505 of file includes/half.hpp.
|
friend |
Comparison for less than.
| x | first operand |
| y | second operand |
| true | if x less than y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2505 of file includes/half.hpp.
|
friend |
Output operator.
This uses the built-in functionality for streaming out floating-point numbers.
| out | output stream to write into |
| arg | half expression to write |
Definition at line 2707 of file includes/half.hpp.
|
friend |
Output operator.
This uses the built-in functionality for streaming out floating-point numbers.
| out | output stream to write into |
| arg | half expression to write |
Definition at line 2707 of file includes/half.hpp.
|
friend |
Comparison for less equal.
| x | first operand |
| y | second operand |
| true | if x less equal y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2529 of file includes/half.hpp.
|
friend |
Comparison for less equal.
| x | first operand |
| y | second operand |
| true | if x less equal y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2529 of file includes/half.hpp.
|
friend |
Comparison for equality.
| x | first operand |
| y | second operand |
| true | if operands equal |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2483 of file includes/half.hpp.
|
friend |
Comparison for equality.
| x | first operand |
| y | second operand |
| true | if operands equal |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2483 of file includes/half.hpp.
|
friend |
Comparison for greater than.
| x | first operand |
| y | second operand |
| true | if x greater than y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2517 of file includes/half.hpp.
|
friend |
Comparison for greater than.
| x | first operand |
| y | second operand |
| true | if x greater than y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2517 of file includes/half.hpp.
|
friend |
Comparison for greater equal.
| x | first operand |
| y | second operand |
| true | if x greater equal y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2541 of file includes/half.hpp.
|
friend |
Comparison for greater equal.
| x | first operand |
| y | second operand |
| true | if x greater equal y |
| false | else |
| FE_INVALID | if x or y is NaN |
Definition at line 2541 of file includes/half.hpp.
|
friend |
Input operator.
This uses the built-in functionality for streaming in floating-point numbers, specifically double precision floating point numbers (unless overridden with HALF_ARITHMETIC_TYPE). So the input string is first rounded to double precision using the underlying platform's current floating-point rounding mode before being rounded to half-precision using the library's half-precision rounding mode.
| in | input stream to read from |
| arg | half to read into |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2725 of file includes/half.hpp.
|
friend |
Input operator.
This uses the built-in functionality for streaming in floating-point numbers, specifically double precision floating point numbers (unless overridden with HALF_ARITHMETIC_TYPE). So the input string is first rounded to double precision using the underlying platform's current floating-point rounding mode before being rounded to half-precision using the library's half-precision rounding mode.
| in | input stream to read from |
| arg | half to read into |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 2725 of file includes/half.hpp.
Power function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in ~0.00025% of inputs.
See also: Documentation for std::pow.
| x | base |
| y | exponent |
| FE_INVALID | if x or y is signaling NaN or if x is finite an negative and y is finite and not integral |
| FE_DIVBYZERO | if x is 0 and y is negative |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3444 of file includes/half.hpp.
Power function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in ~0.00025% of inputs.
See also: Documentation for std::pow.
| x | base |
| y | exponent |
| FE_INVALID | if x or y is signaling NaN or if x is finite an negative and y is finite and not integral |
| FE_DIVBYZERO | if x is 0 and y is negative |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3444 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::remainder.
| x | first operand |
| y | second operand |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2781 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::remainder.
| x | first operand |
| y | second operand |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2781 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::remquo.
| x | first operand |
| y | second operand |
| quo | address to store some bits of quotient at |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2801 of file includes/half.hpp.
Remainder of division.
See also: Documentation for std::remquo.
| x | first operand |
| y | second operand |
| quo | address to store some bits of quotient at |
| FE_INVALID | if x is infinite or y is 0 or if x or y is signaling NaN |
Definition at line 2801 of file includes/half.hpp.
Nearest integer using half's internal rounding mode.
See also: Documentation for std::rint.
| arg | half expression to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4127 of file includes/half.hpp.
Nearest integer using half's internal rounding mode.
See also: Documentation for std::rint.
| arg | half expression to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4127 of file includes/half.hpp.
Nearest integer.
See also: Documentation for std::round.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4112 of file includes/half.hpp.
Nearest integer.
See also: Documentation for std::round.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4112 of file includes/half.hpp.
Inverse square root.
This function is exact to rounding for all rounding modes and thus generally more accurate than directly computing 1 / sqrt(arg) in half-precision, in addition to also being faster.
| arg | function argument |
| FE_INVALID | for signaling NaN and negative arguments |
| FE_INEXACT | according to rounding |
Definition at line 3244 of file includes/half.hpp.
Inverse square root.
This function is exact to rounding for all rounding modes and thus generally more accurate than directly computing 1 / sqrt(arg) in half-precision, in addition to also being faster.
| arg | function argument |
| FE_INVALID | for signaling NaN and negative arguments |
| FE_INEXACT | according to rounding |
Definition at line 3244 of file includes/half.hpp.
Multiply by power of two.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::scalbln.
| arg | number to modify |
| exp | power of two to multiply with |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4191 of file includes/half.hpp.
Multiply by power of two.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::scalbln.
| arg | number to modify |
| exp | power of two to multiply with |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4191 of file includes/half.hpp.
|
friend |
Check sign.
See also: Documentation for std::signbit.
| arg | number to check |
| true | for negative number |
| false | for positive number |
Definition at line 4416 of file includes/half.hpp.
|
friend |
Check sign.
See also: Documentation for std::signbit.
| arg | number to check |
| true | for negative number |
| false | for positive number |
Definition at line 4416 of file includes/half.hpp.
Sine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sin.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3573 of file includes/half.hpp.
Sine function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sin.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3573 of file includes/half.hpp.
Compute sine and cosine simultaneously.
This returns the same results as sin() and cos() but is faster than calling each function individually.
This function is exact to rounding for all rounding modes.
| arg | function argument |
| sin | variable to take sine of arg |
| cos | variable to take cosine of arg |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3508 of file includes/half.hpp.
Compute sine and cosine simultaneously.
This returns the same results as sin() and cos() but is faster than calling each function individually.
This function is exact to rounding for all rounding modes.
| arg | function argument |
| sin | variable to take sine of arg |
| cos | variable to take cosine of arg |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3508 of file includes/half.hpp.
Hyperbolic sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sinh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3810 of file includes/half.hpp.
Hyperbolic sine.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sinh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3810 of file includes/half.hpp.
Square root.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sqrt.
| arg | function argument |
| FE_INVALID | for signaling NaN and negative arguments |
| FE_INEXACT | according to rounding |
Definition at line 3223 of file includes/half.hpp.
Square root.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::sqrt.
| arg | function argument |
| FE_INVALID | for signaling NaN and negative arguments |
| FE_INEXACT | according to rounding |
Definition at line 3223 of file includes/half.hpp.
|
friend |
Definition at line 2276 of file includes/half.hpp.
Tangent function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::tan.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3634 of file includes/half.hpp.
Tangent function.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::tan.
| arg | function argument |
| FE_INVALID | for signaling NaN or infinity |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3634 of file includes/half.hpp.
Hyperbolic tangent.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::tanh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3865 of file includes/half.hpp.
Hyperbolic tangent.
This function is exact to rounding for all rounding modes.
See also: Documentation for std::tanh.
| arg | function argument |
| FE_INVALID | for signaling NaN |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 3865 of file includes/half.hpp.
Gamma function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.25% of inputs.
See also: Documentation for std::tgamma.
| arg | function argument |
| FE_INVALID | for signaling NaN, negative infinity or negative integer arguments |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4055 of file includes/half.hpp.
Gamma function.
This function may be 1 ULP off the correctly rounded exact result for any rounding mode in <0.25% of inputs.
See also: Documentation for std::tgamma.
| arg | function argument |
| FE_INVALID | for signaling NaN, negative infinity or negative integer arguments |
| FE_DIVBYZERO | for 0 |
| FE_OVERFLOW,...UNDERFLOW,...INEXACT | according to rounding |
Definition at line 4055 of file includes/half.hpp.
Nearest integer not greater in magnitude than half value.
See also: Documentation for std::trunc.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4104 of file includes/half.hpp.
Nearest integer not greater in magnitude than half value.
See also: Documentation for std::trunc.
| arg | half to round |
| FE_INVALID | for signaling NaN |
| FE_INEXACT | if value had to be rounded |
Definition at line 4104 of file includes/half.hpp.