GADGET-4
half_float::detail Namespace Reference

Classes

struct  binary_specialized
 
struct  binary_specialized< half, half >
 
struct  binary_t
 Tag type for binary construction. More...
 
struct  bits
 Type traits for floating point bits. More...
 
struct  bits< const T >
 
struct  bits< const volatile T >
 
struct  bits< double >
 Unsigned integer of (at least) 64 bits width. More...
 
struct  bits< float >
 Unsigned integer of (at least) 32 bits width. More...
 
struct  bits< volatile T >
 
struct  bool_type
 Helper for tag dispatching. More...
 
struct  conditional
 Conditional type. More...
 
struct  conditional< false, T, F >
 
struct  enable
 
struct  enable< T, expr, expr, expr >
 
struct  enable< T, expr, expr, half >
 
struct  enable< T, expr, expr, void >
 
struct  enable< T, expr, half, expr >
 
struct  enable< T, expr, half, half >
 
struct  enable< T, expr, half, void >
 
struct  enable< T, expr, void, void >
 
struct  enable< T, half, expr, expr >
 
struct  enable< T, half, expr, half >
 
struct  enable< T, half, expr, void >
 
struct  enable< T, half, half, expr >
 
struct  enable< T, half, half, half >
 
struct  enable< T, half, half, void >
 
struct  enable< T, half, void, void >
 
struct  expr
 
struct  functions
 Wrapper implementing unspecialized half-precision functions. More...
 
struct  half_caster
 
struct  half_caster< half, expr, R >
 
struct  half_caster< half, half, R >
 
struct  half_caster< half, U, R >
 
struct  half_caster< T, expr, R >
 
struct  half_caster< T, half, R >
 
struct  is_float
 Type traits for floating point types. More...
 
struct  is_float< const T >
 
struct  is_float< const volatile T >
 
struct  is_float< double >
 
struct  is_float< float >
 
struct  is_float< long double >
 
struct  is_float< volatile T >
 
struct  result
 
struct  result< half, half >
 
struct  unary_specialized
 
struct  unary_specialized< expr >
 

Typedefs

typedef bool_type< true > true_type
 
typedef bool_type< false > false_type
 
typedef unsigned short uint16
 Unsigned integer of (at least) 16 bits width. More...
 

Functions

Classification helpers
template<typename T >
bool builtin_isinf (T arg)
 
template<typename T >
bool builtin_isnan (T arg)
 
template<typename T >
bool builtin_signbit (T arg)
 
Conversion
template<std::float_round_style R>
uint16 float2half_impl (float value, true_type)
 
template<std::float_round_style R>
uint16 float2half_impl (double value, true_type)
 
template<std::float_round_style R, typename T >
uint16 float2half_impl (T value,...)
 
template<std::float_round_style R, typename T >
uint16 float2half (T value)
 
template<std::float_round_style R, bool S, typename T >
uint16 int2half_impl (T value)
 
template<std::float_round_style R, typename T >
uint16 int2half (T value)
 
float half2float_impl (uint16 value, float, true_type)
 
double half2float_impl (uint16 value, double, true_type)
 
template<typename T >
half2float_impl (uint16 value, T,...)
 
template<typename T >
half2float (uint16 value)
 
template<std::float_round_style R, bool E, typename T >
half2int_impl (uint16 value)
 
template<std::float_round_style R, typename T >
half2int (uint16 value)
 
template<typename T >
half2int_up (uint16 value)
 
template<std::float_round_style R, bool E>
uint16 round_half_impl (uint16 value)
 
template<std::float_round_style R>
uint16 round_half (uint16 value)
 
uint16 round_half_up (uint16 value)
 
Comparison operators
template<typename T , typename U >
enable< bool, T, U >::type operator== (T x, U y)
 
template<typename T , typename U >
enable< bool, T, U >::type operator!= (T x, U y)
 
template<typename T , typename U >
enable< bool, T, U >::type operator< (T x, U y)
 
template<typename T , typename U >
enable< bool, T, U >::type operator> (T x, U y)
 
template<typename T , typename U >
enable< bool, T, U >::type operator<= (T x, U y)
 
template<typename T , typename U >
enable< bool, T, U >::type operator>= (T x, U y)
 
Arithmetic operators
template<typename T , typename U >
enable< expr, T, U >::type operator+ (T x, U y)
 
template<typename T , typename U >
enable< expr, T, U >::type operator- (T x, U y)
 
template<typename T , typename U >
enable< expr, T, U >::type operator* (T x, U y)
 
template<typename T , typename U >
enable< expr, T, U >::type operator/ (T x, U y)
 
template<typename T >
HALF_CONSTEXPR enable< T, T >::type operator+ (T arg)
 
template<typename T >
HALF_CONSTEXPR enable< T, T >::type operator- (T arg)
 
Input and output
template<typename T , typename charT , typename traits >
enable< std::basic_ostream< charT, traits > &, T >::type operator<< (std::basic_ostream< charT, traits > &out, T arg)
 
template<typename charT , typename traits >
std::basic_istream< charT, traits > & operator>> (std::basic_istream< charT, traits > &in, half &arg)
 
Basic mathematical operations
half abs (half arg)
 
expr abs (expr arg)
 
half fabs (half arg)
 
expr fabs (expr arg)
 
expr fmod (half x, half y)
 
expr fmod (half x, expr y)
 
expr fmod (expr x, half y)
 
expr fmod (expr x, expr y)
 
expr remainder (half x, half y)
 
expr remainder (half x, expr y)
 
expr remainder (expr x, half y)
 
expr remainder (expr x, expr y)
 
expr remquo (half x, half y, int *quo)
 
expr remquo (half x, expr y, int *quo)
 
expr remquo (expr x, half y, int *quo)
 
expr remquo (expr x, expr y, int *quo)
 
expr fma (half x, half y, half z)
 
expr fma (half x, half y, expr z)
 
expr fma (half x, expr y, half z)
 
expr fma (half x, expr y, expr z)
 
expr fma (expr x, half y, half z)
 
expr fma (expr x, half y, expr z)
 
expr fma (expr x, expr y, half z)
 
expr fma (expr x, expr y, expr z)
 
half fmax (half x, half y)
 
expr fmax (half x, expr y)
 
expr fmax (expr x, half y)
 
expr fmax (expr x, expr y)
 
half fmin (half x, half y)
 
expr fmin (half x, expr y)
 
expr fmin (expr x, half y)
 
expr fmin (expr x, expr y)
 
expr fdim (half x, half y)
 
expr fdim (half x, expr y)
 
expr fdim (expr x, half y)
 
expr fdim (expr x, expr y)
 
half nanh (const char *)
 
Exponential functions
expr exp (half arg)
 
expr exp (expr arg)
 
expr expm1 (half arg)
 
expr expm1 (expr arg)
 
expr exp2 (half arg)
 
expr exp2 (expr arg)
 
expr log (half arg)
 
expr log (expr arg)
 
expr log10 (half arg)
 
expr log10 (expr arg)
 
expr log1p (half arg)
 
expr log1p (expr arg)
 
expr log2 (half arg)
 
expr log2 (expr arg)
 
Power functions
expr sqrt (half arg)
 
expr sqrt (expr arg)
 
expr cbrt (half arg)
 
expr cbrt (expr arg)
 
expr hypot (half x, half y)
 
expr hypot (half x, expr y)
 
expr hypot (expr x, half y)
 
expr hypot (expr x, expr y)
 
expr pow (half base, half exp)
 
expr pow (half base, expr exp)
 
expr pow (expr base, half exp)
 
expr pow (expr base, expr exp)
 
Trigonometric functions
expr sin (half arg)
 
expr sin (expr arg)
 
expr cos (half arg)
 
expr cos (expr arg)
 
expr tan (half arg)
 
expr tan (expr arg)
 
expr asin (half arg)
 
expr asin (expr arg)
 
expr acos (half arg)
 
expr acos (expr arg)
 
expr atan (half arg)
 
expr atan (expr arg)
 
expr atan2 (half x, half y)
 
expr atan2 (half x, expr y)
 
expr atan2 (expr x, half y)
 
expr atan2 (expr x, expr y)
 
Hyperbolic functions
expr sinh (half arg)
 
expr sinh (expr arg)
 
expr cosh (half arg)
 
expr cosh (expr arg)
 
expr tanh (half arg)
 
expr tanh (expr arg)
 
expr asinh (half arg)
 
expr asinh (expr arg)
 
expr acosh (half arg)
 
expr acosh (expr arg)
 
expr atanh (half arg)
 
expr atanh (expr arg)
 
Error and gamma functions
expr erf (half arg)
 
expr erf (expr arg)
 
expr erfc (half arg)
 
expr erfc (expr arg)
 
expr lgamma (half arg)
 
expr lgamma (expr arg)
 
expr tgamma (half arg)
 
expr tgamma (expr arg)
 
Rounding
half ceil (half arg)
 
half ceil (expr arg)
 
half floor (half arg)
 
half floor (expr arg)
 
half trunc (half arg)
 
half trunc (expr arg)
 
half round (half arg)
 
half round (expr arg)
 
long lround (half arg)
 
long lround (expr arg)
 
half nearbyint (half arg)
 
half nearbyint (expr arg)
 
half rint (half arg)
 
half rint (expr arg)
 
long lrint (half arg)
 
long lrint (expr arg)
 
Floating point manipulation
half frexp (half arg, int *exp)
 
half frexp (expr arg, int *exp)
 
half ldexp (half arg, int exp)
 
half ldexp (expr arg, int exp)
 
half modf (half arg, half *iptr)
 
half modf (expr arg, half *iptr)
 
half scalbn (half arg, int exp)
 
half scalbn (expr arg, int exp)
 
half scalbln (half arg, long exp)
 
half scalbln (expr arg, long exp)
 
int ilogb (half arg)
 
int ilogb (expr arg)
 
half logb (half arg)
 
half logb (expr arg)
 
half nextafter (half from, half to)
 
half nextafter (half from, expr to)
 
half nextafter (expr from, half to)
 
half nextafter (expr from, expr to)
 
half nexttoward (half from, long double to)
 
half nexttoward (expr from, long double to)
 
half copysign (half x, half y)
 
half copysign (half x, expr y)
 
half copysign (expr x, half y)
 
half copysign (expr x, expr y)
 
Floating point classification
int fpclassify (half arg)
 
int fpclassify (expr arg)
 
bool isfinite (half arg)
 
bool isfinite (expr arg)
 
bool isinf (half arg)
 
bool isinf (expr arg)
 
bool isnan (half arg)
 
bool isnan (expr arg)
 
bool isnormal (half arg)
 
bool isnormal (expr arg)
 
bool signbit (half arg)
 
bool signbit (expr arg)
 
Comparison
bool isgreater (half x, half y)
 
bool isgreater (half x, expr y)
 
bool isgreater (expr x, half y)
 
bool isgreater (expr x, expr y)
 
bool isgreaterequal (half x, half y)
 
bool isgreaterequal (half x, expr y)
 
bool isgreaterequal (expr x, half y)
 
bool isgreaterequal (expr x, expr y)
 
bool isless (half x, half y)
 
bool isless (half x, expr y)
 
bool isless (expr x, half y)
 
bool isless (expr x, expr y)
 
bool islessequal (half x, half y)
 
bool islessequal (half x, expr y)
 
bool islessequal (expr x, half y)
 
bool islessequal (expr x, expr y)
 
bool islessgreater (half x, half y)
 
bool islessgreater (half x, expr y)
 
bool islessgreater (expr x, half y)
 
bool islessgreater (expr x, expr y)
 
bool isunordered (half x, half y)
 
bool isunordered (half x, expr y)
 
bool isunordered (expr x, half y)
 
bool isunordered (expr x, expr y)
 
Casting
template<typename T , typename U >
half_cast (U arg)
 
template<typename T , std::float_round_style R, typename U >
half_cast (U arg)
 

Variables

HALF_CONSTEXPR_CONST binary_t binary = binary_t()
 Tag for binary construction. More...
 

Typedef Documentation

◆ false_type

typedef bool_type<false> false_type

Definition at line 322 of file half.hpp.

◆ true_type

typedef bool_type<true> true_type

Definition at line 321 of file half.hpp.

◆ uint16

typedef unsigned short uint16

Unsigned integer of (at least) 16 bits width.

Definition at line 393 of file half.hpp.

Function Documentation

◆ abs() [1/2]

expr half_float::detail::abs ( expr  arg)
inline

Definition at line 2621 of file half.hpp.

◆ abs() [2/2]

half half_float::detail::abs ( half  arg)
inline

Absolute value.

Parameters
argoperand
Returns
absolute value of arg

Definition at line 2620 of file half.hpp.

◆ acos() [1/2]

expr half_float::detail::acos ( expr  arg)
inline

Definition at line 2845 of file half.hpp.

◆ acos() [2/2]

expr half_float::detail::acos ( half  arg)
inline

Arc cosine function.

Parameters
argfunction argument
Returns
arc cosine value of arg

Definition at line 2844 of file half.hpp.

◆ acosh() [1/2]

expr half_float::detail::acosh ( expr  arg)
inline

Definition at line 2901 of file half.hpp.

◆ acosh() [2/2]

expr half_float::detail::acosh ( half  arg)
inline

Hyperbolic area cosine.

Parameters
argfunction argument
Returns
area cosine value of arg

Definition at line 2900 of file half.hpp.

◆ asin() [1/2]

expr half_float::detail::asin ( expr  arg)
inline

Definition at line 2838 of file half.hpp.

◆ asin() [2/2]

expr half_float::detail::asin ( half  arg)
inline

Arc sine.

Parameters
argfunction argument
Returns
arc sine value of arg

Definition at line 2837 of file half.hpp.

◆ asinh() [1/2]

expr half_float::detail::asinh ( expr  arg)
inline

Definition at line 2894 of file half.hpp.

◆ asinh() [2/2]

expr half_float::detail::asinh ( half  arg)
inline

Hyperbolic area sine.

Parameters
argfunction argument
Returns
area sine value of arg

Definition at line 2893 of file half.hpp.

◆ atan() [1/2]

expr half_float::detail::atan ( expr  arg)
inline

Definition at line 2852 of file half.hpp.

◆ atan() [2/2]

expr half_float::detail::atan ( half  arg)
inline

Arc tangent function.

Parameters
argfunction argument
Returns
arc tangent value of arg

Definition at line 2851 of file half.hpp.

◆ atan2() [1/4]

expr half_float::detail::atan2 ( expr  x,
expr  y 
)
inline

Definition at line 2862 of file half.hpp.

◆ atan2() [2/4]

expr half_float::detail::atan2 ( expr  x,
half  y 
)
inline

Definition at line 2861 of file half.hpp.

◆ atan2() [3/4]

expr half_float::detail::atan2 ( half  x,
expr  y 
)
inline

Definition at line 2860 of file half.hpp.

◆ atan2() [4/4]

expr half_float::detail::atan2 ( half  x,
half  y 
)
inline

Arc tangent function.

Parameters
xfirst argument
ysecond argument
Returns
arc tangent value

Definition at line 2859 of file half.hpp.

◆ atanh() [1/2]

expr half_float::detail::atanh ( expr  arg)
inline

Definition at line 2908 of file half.hpp.

◆ atanh() [2/2]

expr half_float::detail::atanh ( half  arg)
inline

Hyperbolic area tangent.

Parameters
argfunction argument
Returns
area tangent value of arg

Definition at line 2907 of file half.hpp.

◆ builtin_isinf()

bool half_float::detail::builtin_isinf ( arg)

Check for infinity.

Template Parameters
Targument type (builtin floating point type)
Parameters
argvalue to query
Return values
trueif infinity
falseelse

Definition at line 546 of file half.hpp.

◆ builtin_isnan()

bool half_float::detail::builtin_isnan ( arg)

Check for NaN.

Template Parameters
Targument type (builtin floating point type)
Parameters
argvalue to query
Return values
trueif not a number
falseelse

Definition at line 563 of file half.hpp.

◆ builtin_signbit()

bool half_float::detail::builtin_signbit ( arg)

Check sign.

Template Parameters
Targument type (builtin floating point type)
Parameters
argvalue to query
Return values
trueif signbit set
falseelse

Definition at line 580 of file half.hpp.

◆ cbrt() [1/2]

expr half_float::detail::cbrt ( expr  arg)
inline

Definition at line 2785 of file half.hpp.

◆ cbrt() [2/2]

expr half_float::detail::cbrt ( half  arg)
inline

Cubic root.

Parameters
argfunction argument
Returns
cubic root of arg

Definition at line 2784 of file half.hpp.

◆ ceil() [1/2]

half half_float::detail::ceil ( expr  arg)
inline

Definition at line 2951 of file half.hpp.

◆ ceil() [2/2]

half half_float::detail::ceil ( half  arg)
inline

Nearest integer not less than half value.

Parameters
arghalf to round
Returns
nearest integer not less than arg

Definition at line 2950 of file half.hpp.

◆ copysign() [1/4]

half half_float::detail::copysign ( expr  x,
expr  y 
)
inline

Definition at line 3107 of file half.hpp.

◆ copysign() [2/4]

half half_float::detail::copysign ( expr  x,
half  y 
)
inline

Definition at line 3106 of file half.hpp.

◆ copysign() [3/4]

half half_float::detail::copysign ( half  x,
expr  y 
)
inline

Definition at line 3105 of file half.hpp.

◆ copysign() [4/4]

half half_float::detail::copysign ( half  x,
half  y 
)
inline

Take sign.

Parameters
xvalue to change sign for
yvalue to take sign from
Returns
value equal to x in magnitude and to y in sign

Definition at line 3104 of file half.hpp.

◆ cos() [1/2]

expr half_float::detail::cos ( expr  arg)
inline

Definition at line 2824 of file half.hpp.

◆ cos() [2/2]

expr half_float::detail::cos ( half  arg)
inline

Cosine function.

Parameters
argfunction argument
Returns
cosine value of arg

Definition at line 2823 of file half.hpp.

◆ cosh() [1/2]

expr half_float::detail::cosh ( expr  arg)
inline

Definition at line 2880 of file half.hpp.

◆ cosh() [2/2]

expr half_float::detail::cosh ( half  arg)
inline

Hyperbolic cosine.

Parameters
argfunction argument
Returns
hyperbolic cosine value of arg

Definition at line 2879 of file half.hpp.

◆ erf() [1/2]

expr half_float::detail::erf ( expr  arg)
inline

Definition at line 2919 of file half.hpp.

◆ erf() [2/2]

expr half_float::detail::erf ( half  arg)
inline

Error function.

Parameters
argfunction argument
Returns
error function value of arg

Definition at line 2918 of file half.hpp.

◆ erfc() [1/2]

expr half_float::detail::erfc ( expr  arg)
inline

Definition at line 2926 of file half.hpp.

◆ erfc() [2/2]

expr half_float::detail::erfc ( half  arg)
inline

Complementary error function.

Parameters
argfunction argument
Returns
1 minus error function value of arg

Definition at line 2925 of file half.hpp.

◆ exp() [1/2]

expr half_float::detail::exp ( expr  arg)
inline

Definition at line 2725 of file half.hpp.

◆ exp() [2/2]

expr half_float::detail::exp ( half  arg)
inline

Exponential function.

Parameters
argfunction argument
Returns
e raised to arg

Definition at line 2724 of file half.hpp.

◆ exp2() [1/2]

expr half_float::detail::exp2 ( expr  arg)
inline

Definition at line 2739 of file half.hpp.

◆ exp2() [2/2]

expr half_float::detail::exp2 ( half  arg)
inline

Binary exponential.

Parameters
argfunction argument
Returns
2 raised to arg

Definition at line 2738 of file half.hpp.

◆ expm1() [1/2]

expr half_float::detail::expm1 ( expr  arg)
inline

Definition at line 2732 of file half.hpp.

◆ expm1() [2/2]

expr half_float::detail::expm1 ( half  arg)
inline

Exponential minus one.

Parameters
argfunction argument
Returns
e raised to arg subtracted by 1

Definition at line 2731 of file half.hpp.

◆ fabs() [1/2]

expr half_float::detail::fabs ( expr  arg)
inline

Definition at line 2628 of file half.hpp.

◆ fabs() [2/2]

half half_float::detail::fabs ( half  arg)
inline

Absolute value.

Parameters
argoperand
Returns
absolute value of arg

Definition at line 2627 of file half.hpp.

◆ fdim() [1/4]

expr half_float::detail::fdim ( expr  x,
expr  y 
)
inline

Definition at line 2710 of file half.hpp.

◆ fdim() [2/4]

expr half_float::detail::fdim ( expr  x,
half  y 
)
inline

Definition at line 2709 of file half.hpp.

◆ fdim() [3/4]

expr half_float::detail::fdim ( half  x,
expr  y 
)
inline

Definition at line 2708 of file half.hpp.

◆ fdim() [4/4]

expr half_float::detail::fdim ( half  x,
half  y 
)
inline

Positive difference.

Parameters
xfirst operand
ysecond operand
Returns
x - y or 0 if difference negative

Definition at line 2707 of file half.hpp.

◆ float2half()

uint16 half_float::detail::float2half ( value)

Convert floating point to half-precision.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Tsource type (builtin floating point type)
Parameters
valuefloating point value
Returns
binary representation of half-precision value

Definition at line 834 of file half.hpp.

◆ float2half_impl() [1/3]

uint16 half_float::detail::float2half_impl ( double  value,
true_type   
)

Convert IEEE double-precision to half-precision.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Parameters
valuedouble-precision value
Returns
binary representation of half-precision value

Definition at line 725 of file half.hpp.

◆ float2half_impl() [2/3]

uint16 half_float::detail::float2half_impl ( float  value,
true_type   
)

Convert IEEE single-precision to half-precision. Credit for this goes to Jeroen van der Zijp.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Parameters
valuesingle-precision value
Returns
binary representation of half-precision value

Definition at line 599 of file half.hpp.

◆ float2half_impl() [3/3]

uint16 half_float::detail::float2half_impl ( value,
  ... 
)

Convert non-IEEE floating point to half-precision.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Tsource type (builtin floating point type)
Parameters
valuefloating point value
Returns
binary representation of half-precision value

Definition at line 784 of file half.hpp.

◆ floor() [1/2]

half half_float::detail::floor ( expr  arg)
inline

Definition at line 2958 of file half.hpp.

◆ floor() [2/2]

half half_float::detail::floor ( half  arg)
inline

Nearest integer not greater than half value.

Parameters
arghalf to round
Returns
nearest integer not greater than arg

Definition at line 2957 of file half.hpp.

◆ fma() [1/8]

expr half_float::detail::fma ( expr  x,
expr  y,
expr  z 
)
inline

Definition at line 2678 of file half.hpp.

◆ fma() [2/8]

expr half_float::detail::fma ( expr  x,
expr  y,
half  z 
)
inline

Definition at line 2677 of file half.hpp.

◆ fma() [3/8]

expr half_float::detail::fma ( expr  x,
half  y,
expr  z 
)
inline

Definition at line 2676 of file half.hpp.

◆ fma() [4/8]

expr half_float::detail::fma ( expr  x,
half  y,
half  z 
)
inline

Definition at line 2675 of file half.hpp.

◆ fma() [5/8]

expr half_float::detail::fma ( half  x,
expr  y,
expr  z 
)
inline

Definition at line 2674 of file half.hpp.

◆ fma() [6/8]

expr half_float::detail::fma ( half  x,
expr  y,
half  z 
)
inline

Definition at line 2673 of file half.hpp.

◆ fma() [7/8]

expr half_float::detail::fma ( half  x,
half  y,
expr  z 
)
inline

Definition at line 2672 of file half.hpp.

◆ fma() [8/8]

expr half_float::detail::fma ( half  x,
half  y,
half  z 
)
inline

Fused multiply add.

Parameters
xfirst operand
ysecond operand
zthird operand
Returns
( x * y ) + z rounded as one operation.

Definition at line 2671 of file half.hpp.

◆ fmax() [1/4]

expr half_float::detail::fmax ( expr  x,
expr  y 
)
inline

Definition at line 2689 of file half.hpp.

◆ fmax() [2/4]

expr half_float::detail::fmax ( expr  x,
half  y 
)
inline

Definition at line 2688 of file half.hpp.

◆ fmax() [3/4]

expr half_float::detail::fmax ( half  x,
expr  y 
)
inline

Definition at line 2687 of file half.hpp.

◆ fmax() [4/4]

half half_float::detail::fmax ( half  x,
half  y 
)
inline

Maximum of half expressions.

Parameters
xfirst operand
ysecond operand
Returns
maximum of operands

Definition at line 2686 of file half.hpp.

◆ fmin() [1/4]

expr half_float::detail::fmin ( expr  x,
expr  y 
)
inline

Definition at line 2700 of file half.hpp.

◆ fmin() [2/4]

expr half_float::detail::fmin ( expr  x,
half  y 
)
inline

Definition at line 2699 of file half.hpp.

◆ fmin() [3/4]

expr half_float::detail::fmin ( half  x,
expr  y 
)
inline

Definition at line 2698 of file half.hpp.

◆ fmin() [4/4]

half half_float::detail::fmin ( half  x,
half  y 
)
inline

Minimum of half expressions.

Parameters
xfirst operand
ysecond operand
Returns
minimum of operands

Definition at line 2697 of file half.hpp.

◆ fmod() [1/4]

expr half_float::detail::fmod ( expr  x,
expr  y 
)
inline

Definition at line 2638 of file half.hpp.

◆ fmod() [2/4]

expr half_float::detail::fmod ( expr  x,
half  y 
)
inline

Definition at line 2637 of file half.hpp.

◆ fmod() [3/4]

expr half_float::detail::fmod ( half  x,
expr  y 
)
inline

Definition at line 2636 of file half.hpp.

◆ fmod() [4/4]

expr half_float::detail::fmod ( half  x,
half  y 
)
inline

Remainder of division.

Parameters
xfirst operand
ysecond operand
Returns
remainder of floating point division.

Definition at line 2635 of file half.hpp.

◆ fpclassify() [1/2]

int half_float::detail::fpclassify ( expr  arg)
inline

Definition at line 3122 of file half.hpp.

◆ fpclassify() [2/2]

int half_float::detail::fpclassify ( half  arg)
inline

Classify floating point value.

Parameters
argnumber to classify
Return values
FP_ZEROfor positive and negative zero
FP_SUBNORMALfor subnormal numbers
FP_INFINITYfor positive and negative infinity
FP_NANfor NaNs
FP_NORMALfor all other (normal) values

Definition at line 3121 of file half.hpp.

◆ frexp() [1/2]

half half_float::detail::frexp ( expr  arg,
int *  exp 
)
inline

Definition at line 3027 of file half.hpp.

◆ frexp() [2/2]

half half_float::detail::frexp ( half  arg,
int *  exp 
)
inline

Decompress floating point number.

Parameters
argnumber to decompress
expaddress to store exponent at
Returns
significant in range [0.5, 1)

Definition at line 3026 of file half.hpp.

◆ half2float()

T half_float::detail::half2float ( uint16  value)

Convert half-precision to floating point.

Template Parameters
Ttype to convert to (builtin integer type)
Parameters
valuebinary representation of half-precision value
Returns
floating point value

Definition at line 1189 of file half.hpp.

◆ half2float_impl() [1/3]

double half_float::detail::half2float_impl ( uint16  value,
double  ,
true_type   
)
inline

Convert half-precision to IEEE double-precision.

Parameters
valuebinary representation of half-precision value
Returns
double-precision value

Definition at line 1144 of file half.hpp.

◆ half2float_impl() [2/3]

float half_float::detail::half2float_impl ( uint16  value,
float  ,
true_type   
)
inline

Convert half-precision to IEEE single-precision. Credit for this goes to Jeroen van der Zijp.

Parameters
valuebinary representation of half-precision value
Returns
single-precision value

Definition at line 903 of file half.hpp.

◆ half2float_impl() [3/3]

T half_float::detail::half2float_impl ( uint16  value,
,
  ... 
)

Convert half-precision to non-IEEE floating point.

Template Parameters
Ttype to convert to (builtin integer type)
Parameters
valuebinary representation of half-precision value
Returns
floating point value

Definition at line 1169 of file half.hpp.

◆ half2int()

T half_float::detail::half2int ( uint16  value)

Convert half-precision floating point to integer.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Ttype to convert to (buitlin integer type with at least 16 bits precision, excluding any implicit sign bits)
Parameters
valuebinary representation of half-precision value
Returns
integral value

Definition at line 1241 of file half.hpp.

◆ half2int_impl()

T half_float::detail::half2int_impl ( uint16  value)

Convert half-precision floating point to integer.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Etrue for round to even, false for round away from zero
Ttype to convert to (buitlin integer type with at least 16 bits precision, excluding any implicit sign bits)
Parameters
valuebinary representation of half-precision value
Returns
integral value

Definition at line 1202 of file half.hpp.

◆ half2int_up()

T half_float::detail::half2int_up ( uint16  value)

Convert half-precision floating point to integer using round-to-nearest-away-from-zero.

Template Parameters
Ttype to convert to (buitlin integer type with at least 16 bits precision, excluding any implicit sign bits)
Parameters
valuebinary representation of half-precision value
Returns
integral value

Definition at line 1251 of file half.hpp.

◆ half_cast() [1/2]

T half_float::detail::half_cast ( arg)

Cast to or from half-precision floating point number. This casts between half and any built-in arithmetic type. The values are converted directly using the given rounding mode, without any roundtrip over float that a static_cast would otherwise do. It uses the default rounding mode.

Using this cast with neither of the two types being a half or with any of the two types not being a built-in arithmetic type (apart from half, of course) results in a compiler error and casting between halfs is just a no-op.

Template Parameters
Tdestination type (half or built-in arithmetic type)
Usource type (half or built-in arithmetic type)
Parameters
argvalue to cast
Returns
arg converted to destination type

Definition at line 3256 of file half.hpp.

◆ half_cast() [2/2]

T half_float::detail::half_cast ( arg)

Cast to or from half-precision floating point number. This casts between half and any built-in arithmetic type. The values are converted directly using the given rounding mode, without any roundtrip over float that a static_cast would otherwise do.

Using this cast with neither of the two types being a half or with any of the two types not being a built-in arithmetic type (apart from half, of course) results in a compiler error and casting between halfs is just a no-op.

Template Parameters
Tdestination type (half or built-in arithmetic type)
Rrounding mode to use.
Usource type (half or built-in arithmetic type)
Parameters
argvalue to cast
Returns
arg converted to destination type

Definition at line 3274 of file half.hpp.

◆ hypot() [1/4]

expr half_float::detail::hypot ( expr  x,
expr  y 
)
inline

Definition at line 2795 of file half.hpp.

◆ hypot() [2/4]

expr half_float::detail::hypot ( expr  x,
half  y 
)
inline

Definition at line 2794 of file half.hpp.

◆ hypot() [3/4]

expr half_float::detail::hypot ( half  x,
expr  y 
)
inline

Definition at line 2793 of file half.hpp.

◆ hypot() [4/4]

expr half_float::detail::hypot ( half  x,
half  y 
)
inline

Hypotenuse function.

Parameters
xfirst argument
ysecond argument
Returns
square root of sum of squares without internal over- or underflows

Definition at line 2792 of file half.hpp.

◆ ilogb() [1/2]

int half_float::detail::ilogb ( expr  arg)
inline

Definition at line 3069 of file half.hpp.

◆ ilogb() [2/2]

int half_float::detail::ilogb ( half  arg)
inline

Extract exponent.

Parameters
argnumber to query
Returns
floating point exponent
Return values
FP_ILOGB0for zero
FP_ILOGBNANfor NaN
MAX_INTfor infinity

Definition at line 3068 of file half.hpp.

◆ int2half()

uint16 half_float::detail::int2half ( value)

Convert integer to half-precision floating point.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Ttype to convert (builtin integer type)
Parameters
valueintegral value
Returns
binary representation of half-precision value

Definition at line 894 of file half.hpp.

◆ int2half_impl()

uint16 half_float::detail::int2half_impl ( value)

Convert integer to half-precision floating point.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Strue if value negative, false else
Ttype to convert (builtin integer type)
Parameters
valuenon-negative integral value
Returns
binary representation of half-precision value

Definition at line 846 of file half.hpp.

◆ isfinite() [1/2]

bool half_float::detail::isfinite ( expr  arg)
inline

Definition at line 3130 of file half.hpp.

◆ isfinite() [2/2]

bool half_float::detail::isfinite ( half  arg)
inline

Check if finite number.

Parameters
argnumber to check
Return values
trueif neither infinity nor NaN
falseelse

Definition at line 3129 of file half.hpp.

◆ isgreater() [1/4]

bool half_float::detail::isgreater ( expr  x,
expr  y 
)
inline

Definition at line 3179 of file half.hpp.

◆ isgreater() [2/4]

bool half_float::detail::isgreater ( expr  x,
half  y 
)
inline

Definition at line 3178 of file half.hpp.

◆ isgreater() [3/4]

bool half_float::detail::isgreater ( half  x,
expr  y 
)
inline

Definition at line 3177 of file half.hpp.

◆ isgreater() [4/4]

bool half_float::detail::isgreater ( half  x,
half  y 
)
inline

Comparison for greater than.

Parameters
xfirst operand
ysecond operand
Return values
trueif x greater than y
falseelse

Definition at line 3176 of file half.hpp.

◆ isgreaterequal() [1/4]

bool half_float::detail::isgreaterequal ( expr  x,
expr  y 
)
inline

Definition at line 3191 of file half.hpp.

◆ isgreaterequal() [2/4]

bool half_float::detail::isgreaterequal ( expr  x,
half  y 
)
inline

Definition at line 3190 of file half.hpp.

◆ isgreaterequal() [3/4]

bool half_float::detail::isgreaterequal ( half  x,
expr  y 
)
inline

Definition at line 3189 of file half.hpp.

◆ isgreaterequal() [4/4]

bool half_float::detail::isgreaterequal ( half  x,
half  y 
)
inline

Comparison for greater equal.

Parameters
xfirst operand
ysecond operand
Return values
trueif x greater equal y
falseelse

Definition at line 3188 of file half.hpp.

◆ isinf() [1/2]

bool half_float::detail::isinf ( expr  arg)
inline

Definition at line 3138 of file half.hpp.

◆ isinf() [2/2]

bool half_float::detail::isinf ( half  arg)
inline

Check for infinity.

Parameters
argnumber to check
Return values
truefor positive or negative infinity
falseelse

Definition at line 3137 of file half.hpp.

◆ isless() [1/4]

bool half_float::detail::isless ( expr  x,
expr  y 
)
inline

Definition at line 3202 of file half.hpp.

◆ isless() [2/4]

bool half_float::detail::isless ( expr  x,
half  y 
)
inline

Definition at line 3201 of file half.hpp.

◆ isless() [3/4]

bool half_float::detail::isless ( half  x,
expr  y 
)
inline

Definition at line 3200 of file half.hpp.

◆ isless() [4/4]

bool half_float::detail::isless ( half  x,
half  y 
)
inline

Comparison for less than.

Parameters
xfirst operand
ysecond operand
Return values
trueif x less than y
falseelse

Definition at line 3199 of file half.hpp.

◆ islessequal() [1/4]

bool half_float::detail::islessequal ( expr  x,
expr  y 
)
inline

Definition at line 3214 of file half.hpp.

◆ islessequal() [2/4]

bool half_float::detail::islessequal ( expr  x,
half  y 
)
inline

Definition at line 3213 of file half.hpp.

◆ islessequal() [3/4]

bool half_float::detail::islessequal ( half  x,
expr  y 
)
inline

Definition at line 3212 of file half.hpp.

◆ islessequal() [4/4]

bool half_float::detail::islessequal ( half  x,
half  y 
)
inline

Comparison for less equal.

Parameters
xfirst operand
ysecond operand
Return values
trueif x less equal y
falseelse

Definition at line 3211 of file half.hpp.

◆ islessgreater() [1/4]

bool half_float::detail::islessgreater ( expr  x,
expr  y 
)
inline

Definition at line 3226 of file half.hpp.

◆ islessgreater() [2/4]

bool half_float::detail::islessgreater ( expr  x,
half  y 
)
inline

Definition at line 3225 of file half.hpp.

◆ islessgreater() [3/4]

bool half_float::detail::islessgreater ( half  x,
expr  y 
)
inline

Definition at line 3224 of file half.hpp.

◆ islessgreater() [4/4]

bool half_float::detail::islessgreater ( half  x,
half  y 
)
inline

Comarison for less or greater.

Parameters
xfirst operand
ysecond operand
Return values
trueif either less or greater
falseelse

Definition at line 3223 of file half.hpp.

◆ isnan() [1/2]

bool half_float::detail::isnan ( expr  arg)
inline

Definition at line 3146 of file half.hpp.

◆ isnan() [2/2]

bool half_float::detail::isnan ( half  arg)
inline

Check for NaN.

Parameters
argnumber to check
Return values
truefor NaNs
falseelse

Definition at line 3145 of file half.hpp.

◆ isnormal() [1/2]

bool half_float::detail::isnormal ( expr  arg)
inline

Definition at line 3154 of file half.hpp.

◆ isnormal() [2/2]

bool half_float::detail::isnormal ( half  arg)
inline

Check if normal number.

Parameters
argnumber to check
Return values
trueif normal number
falseif either subnormal, zero, infinity or NaN

Definition at line 3153 of file half.hpp.

◆ isunordered() [1/4]

bool half_float::detail::isunordered ( expr  x,
expr  y 
)
inline

Definition at line 3238 of file half.hpp.

◆ isunordered() [2/4]

bool half_float::detail::isunordered ( expr  x,
half  y 
)
inline

Definition at line 3237 of file half.hpp.

◆ isunordered() [3/4]

bool half_float::detail::isunordered ( half  x,
expr  y 
)
inline

Definition at line 3236 of file half.hpp.

◆ isunordered() [4/4]

bool half_float::detail::isunordered ( half  x,
half  y 
)
inline

Check if unordered.

Parameters
xfirst operand
ysecond operand
Return values
trueif unordered (one or two NaN operands)
falseelse

Definition at line 3235 of file half.hpp.

◆ ldexp() [1/2]

half half_float::detail::ldexp ( expr  arg,
int  exp 
)
inline

Definition at line 3035 of file half.hpp.

◆ ldexp() [2/2]

half half_float::detail::ldexp ( half  arg,
int  exp 
)
inline

Multiply by power of two.

Parameters
argnumber to modify
exppower of two to multiply with
Returns
arg multplied by 2 raised to exp

Definition at line 3034 of file half.hpp.

◆ lgamma() [1/2]

expr half_float::detail::lgamma ( expr  arg)
inline

Definition at line 2933 of file half.hpp.

◆ lgamma() [2/2]

expr half_float::detail::lgamma ( half  arg)
inline

Natural logarithm of gamma function.

Parameters
argfunction argument
Returns
natural logarith of gamma function for arg

Definition at line 2932 of file half.hpp.

◆ log() [1/2]

expr half_float::detail::log ( expr  arg)
inline

Definition at line 2746 of file half.hpp.

◆ log() [2/2]

expr half_float::detail::log ( half  arg)
inline

Natural logorithm.

Parameters
argfunction argument
Returns
logarithm of arg to base e

Definition at line 2745 of file half.hpp.

◆ log10() [1/2]

expr half_float::detail::log10 ( expr  arg)
inline

Definition at line 2753 of file half.hpp.

◆ log10() [2/2]

expr half_float::detail::log10 ( half  arg)
inline

Common logorithm.

Parameters
argfunction argument
Returns
logarithm of arg to base 10

Definition at line 2752 of file half.hpp.

◆ log1p() [1/2]

expr half_float::detail::log1p ( expr  arg)
inline

Definition at line 2760 of file half.hpp.

◆ log1p() [2/2]

expr half_float::detail::log1p ( half  arg)
inline

Natural logorithm.

Parameters
argfunction argument
Returns
logarithm of arg plus 1 to base e

Definition at line 2759 of file half.hpp.

◆ log2() [1/2]

expr half_float::detail::log2 ( expr  arg)
inline

Definition at line 2767 of file half.hpp.

◆ log2() [2/2]

expr half_float::detail::log2 ( half  arg)
inline

Binary logorithm.

Parameters
argfunction argument
Returns
logarithm of arg to base 2

Definition at line 2766 of file half.hpp.

◆ logb() [1/2]

half half_float::detail::logb ( expr  arg)
inline

Definition at line 3076 of file half.hpp.

◆ logb() [2/2]

half half_float::detail::logb ( half  arg)
inline

Extract exponent.

Parameters
argnumber to query
Returns
floating point exponent

Definition at line 3075 of file half.hpp.

◆ lrint() [1/2]

long half_float::detail::lrint ( expr  arg)
inline

Definition at line 3000 of file half.hpp.

◆ lrint() [2/2]

long half_float::detail::lrint ( half  arg)
inline

Nearest integer using half's internal rounding mode.

Parameters
arghalf expression to round
Returns
nearest integer using default rounding mode

Definition at line 2999 of file half.hpp.

◆ lround() [1/2]

long half_float::detail::lround ( expr  arg)
inline

Definition at line 2979 of file half.hpp.

◆ lround() [2/2]

long half_float::detail::lround ( half  arg)
inline

Nearest integer.

Parameters
arghalf to round
Returns
nearest integer, rounded away from zero in half-way cases

Definition at line 2978 of file half.hpp.

◆ modf() [1/2]

half half_float::detail::modf ( expr  arg,
half iptr 
)
inline

Definition at line 3043 of file half.hpp.

◆ modf() [2/2]

half half_float::detail::modf ( half  arg,
half iptr 
)
inline

Extract integer and fractional parts.

Parameters
argnumber to decompress
iptraddress to store integer part at
Returns
fractional part

Definition at line 3042 of file half.hpp.

◆ nanh()

half half_float::detail::nanh ( const char *  )
inline

Get NaN value.

Returns
quiet NaN

Definition at line 2714 of file half.hpp.

◆ nearbyint() [1/2]

half half_float::detail::nearbyint ( expr  arg)
inline

Definition at line 2986 of file half.hpp.

◆ nearbyint() [2/2]

half half_float::detail::nearbyint ( half  arg)
inline

Nearest integer using half's internal rounding mode.

Parameters
arghalf expression to round
Returns
nearest integer using default rounding mode

Definition at line 2985 of file half.hpp.

◆ nextafter() [1/4]

half half_float::detail::nextafter ( expr  from,
expr  to 
)
inline

Definition at line 3087 of file half.hpp.

◆ nextafter() [2/4]

half half_float::detail::nextafter ( expr  from,
half  to 
)
inline

Definition at line 3086 of file half.hpp.

◆ nextafter() [3/4]

half half_float::detail::nextafter ( half  from,
expr  to 
)
inline

Definition at line 3085 of file half.hpp.

◆ nextafter() [4/4]

half half_float::detail::nextafter ( half  from,
half  to 
)
inline

Next representable value.

Parameters
fromvalue to compute next representable value for
todirection towards which to compute next value
Returns
next representable value after from in direction towards to

Definition at line 3084 of file half.hpp.

◆ nexttoward() [1/2]

half half_float::detail::nexttoward ( expr  from,
long double  to 
)
inline

Definition at line 3096 of file half.hpp.

◆ nexttoward() [2/2]

half half_float::detail::nexttoward ( half  from,
long double  to 
)
inline

Next representable value.

Parameters
fromvalue to compute next representable value for
todirection towards which to compute next value
Returns
next representable value after from in direction towards to

Definition at line 3095 of file half.hpp.

◆ operator!=()

enable< bool, T, U >::type half_float::detail::operator!= ( x,
y 
)

Comparison for inequality.

Parameters
xfirst operand
ysecond operand
Return values
trueif operands not equal
falseelse

Definition at line 2477 of file half.hpp.

◆ operator*()

enable< expr, T, U >::type half_float::detail::operator* ( x,
y 
)

Multiply halfs.

Parameters
xleft operand
yright operand
Returns
product of half expressions

Definition at line 2555 of file half.hpp.

◆ operator+() [1/2]

HALF_CONSTEXPR enable< T, T >::type half_float::detail::operator+ ( arg)

Identity.

Parameters
argoperand
Returns
uncahnged operand

Definition at line 2574 of file half.hpp.

◆ operator+() [2/2]

enable< expr, T, U >::type half_float::detail::operator+ ( x,
y 
)

Add halfs.

Parameters
xleft operand
yright operand
Returns
sum of half expressions

Definition at line 2535 of file half.hpp.

◆ operator-() [1/2]

HALF_CONSTEXPR enable< T, T >::type half_float::detail::operator- ( arg)

Negation.

Parameters
argoperand
Returns
negated operand

Definition at line 2583 of file half.hpp.

◆ operator-() [2/2]

enable< expr, T, U >::type half_float::detail::operator- ( x,
y 
)

Subtract halfs.

Parameters
xleft operand
yright operand
Returns
difference of half expressions

Definition at line 2545 of file half.hpp.

◆ operator/()

enable< expr, T, U >::type half_float::detail::operator/ ( x,
y 
)

Divide halfs.

Parameters
xleft operand
yright operand
Returns
quotient of half expressions

Definition at line 2565 of file half.hpp.

◆ operator<()

enable< bool, T, U >::type half_float::detail::operator< ( x,
y 
)

Comparison for less than.

Parameters
xfirst operand
ysecond operand
Return values
trueif x less than y
falseelse

Definition at line 2488 of file half.hpp.

◆ operator<<()

enable< std::basic_ostream< charT, traits > &, T >::type half_float::detail::operator<< ( std::basic_ostream< charT, traits > &  out,
arg 
)

Output operator.

Parameters
outoutput stream to write into
arghalf expression to write
Returns
reference to output stream

Definition at line 2597 of file half.hpp.

◆ operator<=()

enable< bool, T, U >::type half_float::detail::operator<= ( x,
y 
)

Comparison for less equal.

Parameters
xfirst operand
ysecond operand
Return values
trueif x less equal y
falseelse

Definition at line 2510 of file half.hpp.

◆ operator==()

enable< bool, T, U >::type half_float::detail::operator== ( x,
y 
)

Comparison for equality.

Parameters
xfirst operand
ysecond operand
Return values
trueif operands equal
falseelse

Definition at line 2466 of file half.hpp.

◆ operator>()

enable< bool, T, U >::type half_float::detail::operator> ( x,
y 
)

Comparison for greater than.

Parameters
xfirst operand
ysecond operand
Return values
trueif x greater than y
falseelse

Definition at line 2499 of file half.hpp.

◆ operator>=()

enable< bool, T, U >::type half_float::detail::operator>= ( x,
y 
)

Comparison for greater equal.

Parameters
xfirst operand
ysecond operand
Return values
trueif x greater equal y
falseelse

Definition at line 2521 of file half.hpp.

◆ operator>>()

std::basic_istream< charT, traits > & half_float::detail::operator>> ( std::basic_istream< charT, traits > &  in,
half arg 
)

Input operator.

Parameters
ininput stream to read from
arghalf to read into
Returns
reference to input stream

Definition at line 2607 of file half.hpp.

◆ pow() [1/4]

expr half_float::detail::pow ( expr  base,
expr  exp 
)
inline

Definition at line 2806 of file half.hpp.

◆ pow() [2/4]

expr half_float::detail::pow ( expr  base,
half  exp 
)
inline

Definition at line 2805 of file half.hpp.

◆ pow() [3/4]

expr half_float::detail::pow ( half  base,
expr  exp 
)
inline

Definition at line 2804 of file half.hpp.

◆ pow() [4/4]

expr half_float::detail::pow ( half  base,
half  exp 
)
inline

Power function.

Parameters
basefirst argument
expsecond argument
Returns
base raised to exp

Definition at line 2803 of file half.hpp.

◆ remainder() [1/4]

expr half_float::detail::remainder ( expr  x,
expr  y 
)
inline

Definition at line 2650 of file half.hpp.

◆ remainder() [2/4]

expr half_float::detail::remainder ( expr  x,
half  y 
)
inline

Definition at line 2649 of file half.hpp.

◆ remainder() [3/4]

expr half_float::detail::remainder ( half  x,
expr  y 
)
inline

Definition at line 2648 of file half.hpp.

◆ remainder() [4/4]

expr half_float::detail::remainder ( half  x,
half  y 
)
inline

Remainder of division.

Parameters
xfirst operand
ysecond operand
Returns
remainder of floating point division.

Definition at line 2647 of file half.hpp.

◆ remquo() [1/4]

expr half_float::detail::remquo ( expr  x,
expr  y,
int *  quo 
)
inline

Definition at line 2662 of file half.hpp.

◆ remquo() [2/4]

expr half_float::detail::remquo ( expr  x,
half  y,
int *  quo 
)
inline

Definition at line 2661 of file half.hpp.

◆ remquo() [3/4]

expr half_float::detail::remquo ( half  x,
expr  y,
int *  quo 
)
inline

Definition at line 2660 of file half.hpp.

◆ remquo() [4/4]

expr half_float::detail::remquo ( half  x,
half  y,
int *  quo 
)
inline

Remainder of division.

Parameters
xfirst operand
ysecond operand
quoaddress to store some bits of quotient at
Returns
remainder of floating point division.

Definition at line 2659 of file half.hpp.

◆ rint() [1/2]

half half_float::detail::rint ( expr  arg)
inline

Definition at line 2993 of file half.hpp.

◆ rint() [2/2]

half half_float::detail::rint ( half  arg)
inline

Nearest integer using half's internal rounding mode.

Parameters
arghalf expression to round
Returns
nearest integer using default rounding mode

Definition at line 2992 of file half.hpp.

◆ round() [1/2]

half half_float::detail::round ( expr  arg)
inline

Definition at line 2972 of file half.hpp.

◆ round() [2/2]

half half_float::detail::round ( half  arg)
inline

Nearest integer.

Parameters
arghalf to round
Returns
nearest integer, rounded away from zero in half-way cases

Definition at line 2971 of file half.hpp.

◆ round_half()

uint16 half_float::detail::round_half ( uint16  value)

Round half-precision number to nearest integer value.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Parameters
valuebinary representation of half-precision value
Returns
half-precision bits for nearest integral value

Definition at line 1296 of file half.hpp.

◆ round_half_impl()

uint16 half_float::detail::round_half_impl ( uint16  value)

Round half-precision number to nearest integer value.

Template Parameters
Rrounding mode to use, std::round_indeterminate for fastest rounding
Etrue for round to even, false for round away from zero
Parameters
valuebinary representation of half-precision value
Returns
half-precision bits for nearest integral value

Definition at line 1262 of file half.hpp.

◆ round_half_up()

uint16 half_float::detail::round_half_up ( uint16  value)
inline

Round half-precision number to nearest integer value using round-to-nearest-away-from-zero.

Parameters
valuebinary representation of half-precision value
Returns
half-precision bits for nearest integral value

Definition at line 1304 of file half.hpp.

◆ scalbln() [1/2]

half half_float::detail::scalbln ( expr  arg,
long  exp 
)
inline

Definition at line 3059 of file half.hpp.

◆ scalbln() [2/2]

half half_float::detail::scalbln ( half  arg,
long  exp 
)
inline

Multiply by power of two.

Parameters
argnumber to modify
exppower of two to multiply with
Returns
arg multplied by 2 raised to exp

Definition at line 3058 of file half.hpp.

◆ scalbn() [1/2]

half half_float::detail::scalbn ( expr  arg,
int  exp 
)
inline

Definition at line 3051 of file half.hpp.

◆ scalbn() [2/2]

half half_float::detail::scalbn ( half  arg,
int  exp 
)
inline

Multiply by power of two.

Parameters
argnumber to modify
exppower of two to multiply with
Returns
arg multplied by 2 raised to exp

Definition at line 3050 of file half.hpp.

◆ signbit() [1/2]

bool half_float::detail::signbit ( expr  arg)
inline

Definition at line 3162 of file half.hpp.

◆ signbit() [2/2]

bool half_float::detail::signbit ( half  arg)
inline

Check sign.

Parameters
argnumber to check
Return values
truefor negative number
falsefor positive number

Definition at line 3161 of file half.hpp.

◆ sin() [1/2]

expr half_float::detail::sin ( expr  arg)
inline

Definition at line 2817 of file half.hpp.

◆ sin() [2/2]

expr half_float::detail::sin ( half  arg)
inline

Sine function.

Parameters
argfunction argument
Returns
sine value of arg

Definition at line 2816 of file half.hpp.

◆ sinh() [1/2]

expr half_float::detail::sinh ( expr  arg)
inline

Definition at line 2873 of file half.hpp.

◆ sinh() [2/2]

expr half_float::detail::sinh ( half  arg)
inline

Hyperbolic sine.

Parameters
argfunction argument
Returns
hyperbolic sine value of arg

Definition at line 2872 of file half.hpp.

◆ sqrt() [1/2]

expr half_float::detail::sqrt ( expr  arg)
inline

Definition at line 2778 of file half.hpp.

◆ sqrt() [2/2]

expr half_float::detail::sqrt ( half  arg)
inline

Square root.

Parameters
argfunction argument
Returns
square root of arg

Definition at line 2777 of file half.hpp.

◆ tan() [1/2]

expr half_float::detail::tan ( expr  arg)
inline

Definition at line 2831 of file half.hpp.

◆ tan() [2/2]

expr half_float::detail::tan ( half  arg)
inline

Tangent function.

Parameters
argfunction argument
Returns
tangent value of arg

Definition at line 2830 of file half.hpp.

◆ tanh() [1/2]

expr half_float::detail::tanh ( expr  arg)
inline

Definition at line 2887 of file half.hpp.

◆ tanh() [2/2]

expr half_float::detail::tanh ( half  arg)
inline

Hyperbolic tangent.

Parameters
argfunction argument
Returns
hyperbolic tangent value of arg

Definition at line 2886 of file half.hpp.

◆ tgamma() [1/2]

expr half_float::detail::tgamma ( expr  arg)
inline

Definition at line 2940 of file half.hpp.

◆ tgamma() [2/2]

expr half_float::detail::tgamma ( half  arg)
inline

Gamma function.

Parameters
argfunction argument
Returns
gamma function value of arg

Definition at line 2939 of file half.hpp.

◆ trunc() [1/2]

half half_float::detail::trunc ( expr  arg)
inline

Definition at line 2965 of file half.hpp.

◆ trunc() [2/2]

half half_float::detail::trunc ( half  arg)
inline

Nearest integer not greater in magnitude than half value.

Parameters
arghalf to round
Returns
nearest integer not greater in magnitude than arg

Definition at line 2964 of file half.hpp.

Variable Documentation

◆ binary

Tag for binary construction.

Definition at line 424 of file half.hpp.