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) |
|
Wrapper implementing unspecialized half-precision functions.
Definition at line 1513 of file half.hpp.
◆ acos()
static expr acos |
( |
float |
arg | ) |
|
|
inlinestatic |
Arc cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1803 of file half.hpp.
◆ acosh()
static expr acosh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic area cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1847 of file half.hpp.
◆ asin()
static expr asin |
( |
float |
arg | ) |
|
|
inlinestatic |
Arc sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1798 of file half.hpp.
◆ asinh()
static expr asinh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic area sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1834 of file half.hpp.
◆ atan()
static expr atan |
( |
float |
arg | ) |
|
|
inlinestatic |
Arc tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1808 of file half.hpp.
◆ atan2()
static expr atan2 |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Arc tangent implementation.
- Parameters
-
x | first argument |
y | second argument |
- Returns
- function value stored in single-preicision
Definition at line 1814 of file half.hpp.
◆ atanh()
static expr atanh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic area tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1860 of file half.hpp.
◆ cbrt()
static expr cbrt |
( |
float |
arg | ) |
|
|
inlinestatic |
Cubic root implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1747 of file half.hpp.
◆ ceil()
Ceiling implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1948 of file half.hpp.
◆ copysign()
Sign implementation
- Parameters
-
x | first operand |
y | second operand |
- Returns
- composed value
Definition at line 2159 of file half.hpp.
◆ cos()
static expr cos |
( |
float |
arg | ) |
|
|
inlinestatic |
Cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1788 of file half.hpp.
◆ cosh()
static expr cosh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic cosine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1824 of file half.hpp.
◆ divides()
static expr divides |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Division implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision quotient stored in single-precision
Definition at line 1537 of file half.hpp.
◆ erf()
static expr erf |
( |
float |
arg | ) |
|
|
inlinestatic |
Error function implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1872 of file half.hpp.
◆ erfc()
static expr erfc |
( |
float |
arg | ) |
|
|
inlinestatic |
Complementary implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1884 of file half.hpp.
◆ exp()
static expr exp |
( |
float |
arg | ) |
|
|
inlinestatic |
Exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1679 of file half.hpp.
◆ exp2()
static expr exp2 |
( |
float |
arg | ) |
|
|
inlinestatic |
Binary exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1696 of file half.hpp.
◆ expm1()
static expr expm1 |
( |
float |
arg | ) |
|
|
inlinestatic |
Exponential implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1684 of file half.hpp.
◆ fdim()
static expr fdim |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Positive difference implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Positive difference stored in single-precision
Definition at line 1649 of file half.hpp.
◆ floor()
Floor implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1943 of file half.hpp.
◆ fma()
static expr 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
Definition at line 1663 of file half.hpp.
◆ fmod()
static expr fmod |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Modulo implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision division remainder stored in single-precision
Definition at line 1566 of file half.hpp.
◆ fpclassify()
static int fpclassify |
( |
half |
arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
true | if infinite number |
false | else |
Definition at line 2165 of file half.hpp.
◆ frexp()
static half frexp |
( |
half |
arg, |
|
|
int * |
exp |
|
) |
| |
|
inlinestatic |
Decompression implementation.
- Parameters
-
arg | number to decompress |
exp | address to store exponent at |
- Returns
- normalized significant
Definition at line 1991 of file half.hpp.
◆ hypot()
static expr hypot |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Hypotenuse implementation.
- Parameters
-
x | first argument |
y | second argument |
- Returns
- function value stored in single-preicision
Definition at line 1763 of file half.hpp.
◆ ilogb()
static int ilogb |
( |
half |
arg | ) |
|
|
inlinestatic |
Exponent implementation.
- Parameters
-
- Returns
- floating point exponent
Definition at line 2074 of file half.hpp.
◆ isequal()
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
true | if operands equal |
false | else |
Definition at line 2206 of file half.hpp.
◆ isfinite()
static bool isfinite |
( |
half |
arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
true | if finite number |
false | else |
Definition at line 2175 of file half.hpp.
◆ isgreater()
static bool isgreater |
( |
half |
x, |
|
|
half |
y |
|
) |
| |
|
inlinestatic |
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
Definition at line 2220 of file half.hpp.
◆ isgreaterequal()
static bool isgreaterequal |
( |
half |
x, |
|
|
half |
y |
|
) |
| |
|
inlinestatic |
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
Definition at line 2231 of file half.hpp.
◆ isinf()
static bool isinf |
( |
half |
arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
true | if infinite number |
false | else |
Definition at line 2181 of file half.hpp.
◆ isless()
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
Definition at line 2242 of file half.hpp.
◆ islessequal()
static bool islessequal |
( |
half |
x, |
|
|
half |
y |
|
) |
| |
|
inlinestatic |
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
Definition at line 2253 of file half.hpp.
◆ islessgreater()
static bool 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 |
Definition at line 2264 of file half.hpp.
◆ isnan()
static bool isnan |
( |
half |
arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
true | if not a number |
false | else |
Definition at line 2187 of file half.hpp.
◆ isnormal()
static bool isnormal |
( |
half |
arg | ) |
|
|
inlinestatic |
Classification implementation.
- Parameters
-
- Return values
-
true | if normal number |
false | else |
Definition at line 2193 of file half.hpp.
◆ isnotequal()
static bool isnotequal |
( |
half |
x, |
|
|
half |
y |
|
) |
| |
|
inlinestatic |
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
true | if operands not equal |
false | else |
Definition at line 2213 of file half.hpp.
◆ isunordered()
static bool isunordered |
( |
half |
x, |
|
|
half |
y |
|
) |
| |
|
inlinestatic |
Comparison implementation.
- Parameters
-
x | first operand |
y | second operand |
- Return values
-
true | if operand unordered |
false | else |
Definition at line 2278 of file half.hpp.
◆ lgamma()
static expr lgamma |
( |
float |
arg | ) |
|
|
inlinestatic |
Gamma logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1896 of file half.hpp.
◆ log()
static expr log |
( |
float |
arg | ) |
|
|
inlinestatic |
Logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1708 of file half.hpp.
◆ log10()
static expr log10 |
( |
float |
arg | ) |
|
|
inlinestatic |
Common logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1713 of file half.hpp.
◆ log1p()
static expr log1p |
( |
float |
arg | ) |
|
|
inlinestatic |
Logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1718 of file half.hpp.
◆ log2()
static expr log2 |
( |
float |
arg | ) |
|
|
inlinestatic |
Binary logarithm implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1730 of file half.hpp.
◆ logb()
Exponent implementation.
- Parameters
-
- Returns
- floating point exponent
Definition at line 2095 of file half.hpp.
◆ lrint()
static long lrint |
( |
half |
arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1973 of file half.hpp.
◆ lround()
static long lround |
( |
half |
arg | ) |
|
|
inlinestatic |
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1963 of file half.hpp.
◆ minus()
static expr minus |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Subtraction implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision difference stored in single-precision
Definition at line 1525 of file half.hpp.
◆ modf()
Decompression implementation.
- Parameters
-
arg | number to decompress |
iptr | address to store integer part at |
- Returns
- fractional part
Definition at line 2005 of file half.hpp.
◆ multiplies()
static expr multiplies |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Multiplication implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision product stored in single-precision
Definition at line 1531 of file half.hpp.
◆ nanh()
Get NaN.
- Returns
- Half-precision quiet NaN
Definition at line 1674 of file half.hpp.
◆ nextafter()
Enumeration implementation.
- Parameters
-
from | number to increase/decrease |
to | direction to enumerate into |
- Returns
- next representable number
Definition at line 2125 of file half.hpp.
◆ nexttoward()
static half nexttoward |
( |
half |
from, |
|
|
long double |
to |
|
) |
| |
|
inlinestatic |
Enumeration implementation.
- Parameters
-
from | number to increase/decrease |
to | direction to enumerate into |
- Returns
- next representable number
Definition at line 2143 of file half.hpp.
◆ plus()
static expr plus |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Addition implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision sum stored in single-precision
Definition at line 1519 of file half.hpp.
◆ pow()
static expr 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
Definition at line 1778 of file half.hpp.
◆ read()
static std::basic_istream< charT, traits > & 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
Definition at line 1554 of file half.hpp.
◆ remainder()
static expr remainder |
( |
float |
x, |
|
|
float |
y |
|
) |
| |
|
inlinestatic |
Remainder implementation.
- Parameters
-
x | first operand |
y | second operand |
- Returns
- Half-precision division remainder stored in single-precision
Definition at line 1572 of file half.hpp.
◆ remquo()
static expr 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
Definition at line 1603 of file half.hpp.
◆ rint()
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1968 of file half.hpp.
◆ round()
Nearest integer implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1958 of file half.hpp.
◆ scalbln()
static half scalbln |
( |
half |
arg, |
|
|
long |
exp |
|
) |
| |
|
inlinestatic |
Scaling implementation.
- Parameters
-
arg | number to scale |
exp | power of two to scale by |
- Returns
- scaled number
Definition at line 2026 of file half.hpp.
◆ signbit()
static bool signbit |
( |
half |
arg | ) |
|
|
inlinestatic |
Sign bit implementation.
- Parameters
-
- Return values
-
true | if signed |
false | if unsigned |
Definition at line 2199 of file half.hpp.
◆ sin()
static expr sin |
( |
float |
arg | ) |
|
|
inlinestatic |
Sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1783 of file half.hpp.
◆ sinh()
static expr sinh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic sine implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1819 of file half.hpp.
◆ sqrt()
static expr sqrt |
( |
float |
arg | ) |
|
|
inlinestatic |
Square root implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1742 of file half.hpp.
◆ tan()
static expr tan |
( |
float |
arg | ) |
|
|
inlinestatic |
Tan implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1793 of file half.hpp.
◆ tanh()
static expr tanh |
( |
float |
arg | ) |
|
|
inlinestatic |
Hyperbolic tangent implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1829 of file half.hpp.
◆ tgamma()
static expr tgamma |
( |
float |
arg | ) |
|
|
inlinestatic |
Gamma implementation.
- Parameters
-
- Returns
- function value stored in single-preicision
Definition at line 1918 of file half.hpp.
◆ trunc()
Truncation implementation.
- Parameters
-
- Returns
- rounded value
Definition at line 1953 of file half.hpp.
◆ write()
static std::basic_ostream< charT, traits > & 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
Definition at line 1544 of file half.hpp.
The documentation for this struct was generated from the following file: