Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

ID 683310
Date 12/18/2019
Public
Document Table of Contents

A.1. Math Functions Provided by the math.h Header File

The Intel® HLS Compiler Standard Edition supports a subset of functions that are present in your native compiler through the HLS/math.h header file.

For each math.h function listed below, "●" indicates that the HLS compiler supports the function; "X" indicates that the function is not supported.

The math functions supported on Linux operating systems might differ from the math functions supported on Windows operating systems. Review the comments in the HLS/math.h header file to see which math functions are supported on the different operating systems.

Table 36.  Trigonometric Functions
Trigonometric Function Supported?
Double-precision floating point function Single-precision floating point function
cos cosf
sin sinf
tan tanf
acos acosf
asin asinf
atan atanf
atan2 atan2f
Table 37.  Hyperbolic Functions
Hyperbolic Function Supported?
Double-precision floating point function Single-precision floating point function
cosh coshf
sinh sinhf
tanh tanhf
acosh acoshf X
asinh asinhf X
atanh atanhf X
Table 38.  Exponential and Logarithmic Functions
Exponential or Logarithmic Function Supported?
Double-precision floating point function Single-precision floating point function
exp expf
frexp frexpf
ldexp ldexpf
log logf
log10 log10f
modf modff
exp2 exp2f
exp10 (Linux only) exp10f (Linux only)* X
expm1 expm1f
ilogb ilogbf X
log1p log1pf
log2 log2f
logb logbf X
scalbn scalbnf X
scalbln scalblnf
Table 39.  Power Functions
Power Function Supported?
Double-precision floating point function Single-precision floating point function
pow powf
sqrt sqrtf
cbrt cbrtf X
hypot hypotf X
Table 40.  Error and Gamma Functions
Error or Gamma Function Supported?
Double-precision floating point function Single-precision floating point function
erf erff X
erfc erfcf X
tgamma tgammaf X
lgamma lgammaf X
lgamma_r (Linux only)2 lgamma_rf (Linux only)2 X
Table 41.  Rounding and Remainder Functions
Rounding or Remainder Function Supported?
Double-precision floating point function Single-precision floating point function
ceil ceilf
floor floorf
fmod fmodf
trunc truncf
round roundf
lround lroundf X
llround llroundf X
rint rintf
lrint lrintf X
llrint llrintf X
nearbyint nearbyintf X
remainder remainderf X
remquo remquof X
Table 42.  Floating-Point Manipulation Functions
Floating-Point Manipulation Function Supported?
Double-precision floating point function Single-precision floating point function
copysign copysignf X
nan nanf X
nextafter nextafterf X
nexttoward nexttowardf X
Table 43.  Minimum, Maximum, and Difference Functions
Minimum, Maximum, or Difference Function Supported?
Double-precision floating point function Single-precision floating point function
fdim fdim
fmax fmax
fmin fmin
Table 44.  Other Functions
Function Supported?
Double-precision floating point function Single-precision floating point function
fabs fabsf
fma fmaf X
Table 45.  Classification Macros
Classification Macro Supported?
Double-precision floating point function Single-precision floating point function
fpclassify (Linux only) fpclassifyf (Linux only) X
isfinite isfinitef
isinf isinff
isnan isnanf
isnormal (Linux only) isnormalf (Linux only) X
signbit (Linux only) signbitf (Linux only) X
Table 46.  Comparison Macros
Comparison Macro Supported?
Double-precision floating point function Single-precision floating point function
isgreater isgreaterf X
isgreaterequal isgreaterequalf X
isless islessf X
islessequal islessequalf X
islessgreater islessgreaterf X
isunordered (Linux only) isunorderedf (Linux only) X
* For Windows, support for this function is in the extendedmath.h header file
* For Windows, support for this function is in the extendedmath.h header file