Wrapper implementing unspecialized half-precision functions.
More...
#include <half.hpp>
|
| static expr | plus (float x, float y) |
| |
| static expr | minus (float x, float y) |
| |
| static expr | multiplies (float x, float y) |
| |
| static expr | divides (float x, float y) |
| |
| template<typename charT , typename traits > |
| static std::basic_ostream< charT, traits > & | write (std::basic_ostream< charT, traits > &out, float arg) |
| |
| template<typename charT , typename traits > |
| static std::basic_istream< charT, traits > & | read (std::basic_istream< charT, traits > &in, half &arg) |
| |
| static expr | fmod (float x, float y) |
| |
| static expr | remainder (float x, float y) |
| |
| static expr | remquo (float x, float y, int *quo) |
| |
| static expr | fdim (float x, float y) |
| |
| static expr | fma (float x, float y, float z) |
| |
| static half | nanh () |
| |
| static expr | exp (float arg) |
| |
| static expr | expm1 (float arg) |
| |
| static expr | exp2 (float arg) |
| |
| static expr | log (float arg) |
| |
| static expr | log10 (float arg) |
| |
| static expr | log1p (float arg) |
| |
| static expr | log2 (float arg) |
| |
| static expr | sqrt (float arg) |
| |
| static expr | cbrt (float arg) |
| |
| static expr | hypot (float x, float y) |
| |
| static expr | pow (float base, float exp) |
| |
| static expr | sin (float arg) |
| |
| static expr | cos (float arg) |
| |
| static expr | tan (float arg) |
| |
| static expr | asin (float arg) |
| |
| static expr | acos (float arg) |
| |
| static expr | atan (float arg) |
| |
| static expr | atan2 (float x, float y) |
| |
| static expr | sinh (float arg) |
| |
| static expr | cosh (float arg) |
| |
| static expr | tanh (float arg) |
| |
| static expr | asinh (float arg) |
| |
| static expr | acosh (float arg) |
| |
| static expr | atanh (float arg) |
| |
| static expr | erf (float arg) |
| |
| static expr | erfc (float arg) |
| |
| static expr | lgamma (float arg) |
| |
| static expr | tgamma (float arg) |
| |
| static half | floor (half arg) |
| |
| static half | ceil (half arg) |
| |
| static half | trunc (half arg) |
| |
| static half | round (half arg) |
| |
| static long | lround (half arg) |
| |
| static half | rint (half arg) |
| |
| static long | lrint (half arg) |
| |
| static half | frexp (half arg, int *exp) |
| |
| static half | modf (half arg, half *iptr) |
| |
| static half | scalbln (half arg, long exp) |
| |
| static int | ilogb (half arg) |
| |
| static half | logb (half arg) |
| |
| static half | nextafter (half from, half to) |
| |
| static half | nexttoward (half from, long double to) |
| |
| static half | copysign (half x, half y) |
| |
| static int | fpclassify (half arg) |
| |
| static bool | isfinite (half arg) |
| |
| static bool | isinf (half arg) |
| |
| static bool | isnan (half arg) |
| |
| static bool | isnormal (half arg) |
| |
| static bool | signbit (half arg) |
| |
| static bool | isequal (half x, half y) |
| |
| static bool | isnotequal (half x, half y) |
| |
| static bool | isgreater (half x, half y) |
| |
| static bool | isgreaterequal (half x, half y) |
| |
| static bool | isless (half x, half y) |
| |
| static bool | islessequal (half x, half y) |
| |
| static bool | islessgreater (half x, half y) |
| |
| static bool | isunordered (half x, half y) |
| |
|
| static double | erf (double arg) |
| |
| static double | lgamma (double arg) |
| |
Wrapper implementing unspecialized half-precision functions.
◆ acos()
| static expr half_float::detail::functions::acos |
( |
float | arg | ) |
|
|
inlinestatic |
Arc cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ acosh()
| static expr half_float::detail::functions::acosh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic area cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ asin()
| static expr half_float::detail::functions::asin |
( |
float | arg | ) |
|
|
inlinestatic |
Arc sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ asinh()
| static expr half_float::detail::functions::asinh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic area sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ atan()
| static expr half_float::detail::functions::atan |
( |
float | arg | ) |
|
|
inlinestatic |
Arc tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ atan2()
| static expr half_float::detail::functions::atan2 |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Arc tangent implementation.
- Parameters
-
| x | first argument |
| y | second argument |
- Returns
- function value stored in single-preicision
◆ atanh()
| static expr half_float::detail::functions::atanh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic area tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ cbrt()
| static expr half_float::detail::functions::cbrt |
( |
float | arg | ) |
|
|
inlinestatic |
Cubic root implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ ceil()
| static half half_float::detail::functions::ceil |
( |
half | arg | ) |
|
|
inlinestatic |
Ceiling implementation.
- Parameters
-
- Returns
- rounded value
◆ copysign()
| static half half_float::detail::functions::copysign |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Sign implementation
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- composed value
◆ cos()
| static expr half_float::detail::functions::cos |
( |
float | arg | ) |
|
|
inlinestatic |
Cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ cosh()
| static expr half_float::detail::functions::cosh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ divides()
| static expr half_float::detail::functions::divides |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Division implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision quotient stored in single-precision
◆ erf() [1/2]
| static double half_float::detail::functions::erf |
( |
double | arg | ) |
|
|
inlinestaticprivate |
◆ erf() [2/2]
| static expr half_float::detail::functions::erf |
( |
float | arg | ) |
|
|
inlinestatic |
Error function implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ erfc()
| static expr half_float::detail::functions::erfc |
( |
float | arg | ) |
|
|
inlinestatic |
Complementary implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ exp()
| static expr half_float::detail::functions::exp |
( |
float | arg | ) |
|
|
inlinestatic |
Exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ exp2()
| static expr half_float::detail::functions::exp2 |
( |
float | arg | ) |
|
|
inlinestatic |
Binary exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ expm1()
| static expr half_float::detail::functions::expm1 |
( |
float | arg | ) |
|
|
inlinestatic |
Exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ fdim()
| static expr half_float::detail::functions::fdim |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Positive difference implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Positive difference stored in single-precision
◆ floor()
| static half half_float::detail::functions::floor |
( |
half | arg | ) |
|
|
inlinestatic |
Floor implementation.
- Parameters
-
- Returns
- rounded value
◆ fma()
| static expr half_float::detail::functions::fma |
( |
float | x, |
|
|
float | y, |
|
|
float | z ) |
|
inlinestatic |
Fused multiply-add implementation.
- Parameters
-
| x | first operand |
| y | second operand |
| z | third operand |
- Returns
- x * y + z stored in single-precision
◆ fmod()
| static expr half_float::detail::functions::fmod |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Modulo implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision division remainder stored in single-precision
◆ fpclassify()
| static int half_float::detail::functions::fpclassify |
( |
half | arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
| true | if infinite number |
| false | else |
◆ frexp()
| static half half_float::detail::functions::frexp |
( |
half | arg, |
|
|
int * | exp ) |
|
inlinestatic |
Decompression implementation.
- Parameters
-
| arg | number to decompress |
| exp | address to store exponent at |
- Returns
- normalized significant
◆ hypot()
| static expr half_float::detail::functions::hypot |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Hypotenuse implementation.
- Parameters
-
| x | first argument |
| y | second argument |
- Returns
- function value stored in single-preicision
◆ ilogb()
| static int half_float::detail::functions::ilogb |
( |
half | arg | ) |
|
|
inlinestatic |
Exponent implementation.
- Parameters
-
- Returns
- floating point exponent
◆ isequal()
| static bool half_float::detail::functions::isequal |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
| true | if operands equal |
| false | else |
◆ isfinite()
| static bool half_float::detail::functions::isfinite |
( |
half | arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
| true | if finite number |
| false | else |
◆ isgreater()
| static bool half_float::detail::functions::isgreater |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
◆ isgreaterequal()
| static bool half_float::detail::functions::isgreaterequal |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
◆ isinf()
| static bool half_float::detail::functions::isinf |
( |
half | arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
| true | if infinite number |
| false | else |
◆ isless()
| static bool half_float::detail::functions::isless |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
◆ islessequal()
| static bool half_float::detail::functions::islessequal |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
◆ islessgreater()
| static bool half_float::detail::functions::islessgreater |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
| true | if either x > y nor x < y |
| false | else |
◆ isnan()
| static bool half_float::detail::functions::isnan |
( |
half | arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
| true | if not a number |
| false | else |
◆ isnormal()
| static bool half_float::detail::functions::isnormal |
( |
half | arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
| true | if normal number |
| false | else |
◆ isnotequal()
| static bool half_float::detail::functions::isnotequal |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
| true | if operands not equal |
| false | else |
◆ isunordered()
| static bool half_float::detail::functions::isunordered |
( |
half | x, |
|
|
half | y ) |
|
inlinestatic |
Comparison implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Return values
-
| true | if operand unordered |
| false | else |
◆ lgamma() [1/2]
| static double half_float::detail::functions::lgamma |
( |
double | arg | ) |
|
|
inlinestaticprivate |
◆ lgamma() [2/2]
| static expr half_float::detail::functions::lgamma |
( |
float | arg | ) |
|
|
inlinestatic |
Gamma logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ log()
| static expr half_float::detail::functions::log |
( |
float | arg | ) |
|
|
inlinestatic |
Logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ log10()
| static expr half_float::detail::functions::log10 |
( |
float | arg | ) |
|
|
inlinestatic |
Common logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ log1p()
| static expr half_float::detail::functions::log1p |
( |
float | arg | ) |
|
|
inlinestatic |
Logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ log2()
| static expr half_float::detail::functions::log2 |
( |
float | arg | ) |
|
|
inlinestatic |
Binary logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ logb()
| static half half_float::detail::functions::logb |
( |
half | arg | ) |
|
|
inlinestatic |
Exponent implementation.
- Parameters
-
- Returns
- floating point exponent
◆ lrint()
| static long half_float::detail::functions::lrint |
( |
half | arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
◆ lround()
| static long half_float::detail::functions::lround |
( |
half | arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
◆ minus()
| static expr half_float::detail::functions::minus |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Subtraction implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision difference stored in single-precision
◆ modf()
| static half half_float::detail::functions::modf |
( |
half | arg, |
|
|
half * | iptr ) |
|
inlinestatic |
Decompression implementation.
- Parameters
-
| arg | number to decompress |
| iptr | address to store integer part at |
- Returns
- fractional part
◆ multiplies()
| static expr half_float::detail::functions::multiplies |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Multiplication implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision product stored in single-precision
◆ nanh()
| static half half_float::detail::functions::nanh |
( |
| ) |
|
|
inlinestatic |
Get NaN.
- Returns
- Half-precision quiet NaN
◆ nextafter()
| static half half_float::detail::functions::nextafter |
( |
half | from, |
|
|
half | to ) |
|
inlinestatic |
Enumeration implementation.
- Parameters
-
| from | number to increase/decrease |
| to | direction to enumerate into |
- Returns
- next representable number
◆ nexttoward()
| static half half_float::detail::functions::nexttoward |
( |
half | from, |
|
|
long double | to ) |
|
inlinestatic |
Enumeration implementation.
- Parameters
-
| from | number to increase/decrease |
| to | direction to enumerate into |
- Returns
- next representable number
◆ plus()
| static expr half_float::detail::functions::plus |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Addition implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision sum stored in single-precision
◆ pow()
| static expr half_float::detail::functions::pow |
( |
float | base, |
|
|
float | exp ) |
|
inlinestatic |
Power implementation.
- Parameters
-
| base | value to exponentiate |
| exp | power to expontiate to |
- Returns
- function value stored in single-preicision
◆ read()
template<typename charT , typename traits >
| static std::basic_istream< charT, traits > & half_float::detail::functions::read |
( |
std::basic_istream< charT, traits > & | in, |
|
|
half & | arg ) |
|
inlinestatic |
Input implementation.
- Parameters
-
| in | stream to read from |
| arg | half to read into |
- Returns
- reference to stream
◆ remainder()
| static expr half_float::detail::functions::remainder |
( |
float | x, |
|
|
float | y ) |
|
inlinestatic |
Remainder implementation.
- Parameters
-
| x | first operand |
| y | second operand |
- Returns
- Half-precision division remainder stored in single-precision
◆ remquo()
| static expr half_float::detail::functions::remquo |
( |
float | x, |
|
|
float | y, |
|
|
int * | quo ) |
|
inlinestatic |
Remainder implementation.
- Parameters
-
| x | first operand |
| y | second operand |
| quo | address to store quotient bits at |
- Returns
- Half-precision division remainder stored in single-precision
◆ rint()
| static half half_float::detail::functions::rint |
( |
half | arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
◆ round()
| static half half_float::detail::functions::round |
( |
half | arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
◆ scalbln()
| static half half_float::detail::functions::scalbln |
( |
half | arg, |
|
|
long | exp ) |
|
inlinestatic |
Scaling implementation.
- Parameters
-
| arg | number to scale |
| exp | power of two to scale by |
- Returns
- scaled number
◆ signbit()
| static bool half_float::detail::functions::signbit |
( |
half | arg | ) |
|
|
inlinestatic |
Sign bit implementation.
- Parameters
-
- Return values
-
| true | if signed |
| false | if unsigned |
◆ sin()
| static expr half_float::detail::functions::sin |
( |
float | arg | ) |
|
|
inlinestatic |
Sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ sinh()
| static expr half_float::detail::functions::sinh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ sqrt()
| static expr half_float::detail::functions::sqrt |
( |
float | arg | ) |
|
|
inlinestatic |
Square root implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ tan()
| static expr half_float::detail::functions::tan |
( |
float | arg | ) |
|
|
inlinestatic |
Tan implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ tanh()
| static expr half_float::detail::functions::tanh |
( |
float | arg | ) |
|
|
inlinestatic |
Hyperbolic tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ tgamma()
| static expr half_float::detail::functions::tgamma |
( |
float | arg | ) |
|
|
inlinestatic |
Gamma implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
◆ trunc()
| static half half_float::detail::functions::trunc |
( |
half | arg | ) |
|
|
inlinestatic |
Truncation implementation.
- Parameters
-
- Returns
- rounded value
◆ write()
template<typename charT , typename traits >
| static std::basic_ostream< charT, traits > & half_float::detail::functions::write |
( |
std::basic_ostream< charT, traits > & | out, |
|
|
float | arg ) |
|
inlinestatic |
Output implementation.
- Parameters
-
| out | stream to write to |
| arg | value to write |
- Returns
- reference to stream
The documentation for this struct was generated from the following file: