The following functions are provided in the HLS math library. Each
function supports half-precision (type half
),
single-precision (type float
) and double precision
(type double
).
Important: For each
function func
listed below, there is also an
associated half-precision only function named half_func
and single-precision only function named funcf
provided in the library.
When mixing half-precision, single-precision and double-precision
data types, check for common synthesis errors to prevent introducing type-conversion
hardware in the final FPGA implementation.
Trigonometric Functions
acos |
acospi |
asin |
asinpi |
atan |
atan2 |
atan2pi |
cos |
cospi |
sin |
sincos |
sinpi |
tan |
tanpi |
|
|
Hyperbolic Functions
acosh |
asinh |
atanh |
cosh |
sinh |
tanh |
|
|
Exponential Functions
exp |
exp10 |
exp2 |
expm1 |
frexp |
ldexp |
modf |
|
Power Functions
cbrt |
hypot |
pow |
rsqrt |
sqrt |
|
|
|
Rounding Functions
ceil |
floor |
llrint |
llround |
lrint |
lround |
nearbyint |
rint |
round |
trunc |
|
|
Floating-point
copysign |
nan |
nextafter |
nexttoward |
Difference Functions
fdim |
fmax |
fmin |
maxmag |
minmag |
|
|
|
Other Functions
abs |
divide |
fabs |
fma |
fract |
mad |
recip |
|
Classification Functions
fpclassify |
isfinite |
isinf |
isnan |
isnormal |
signbit |
|
|
Comparison Functions
isgreater |
isgreaterequal |
isless |
islessequal |
islessgreater |
isunordered |
|
|
Relational Functions
all |
any |
bitselect |
isequal |
isnotequal |
isordered |
select |
|