Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 3/28/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

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

The Intel® HLS Compiler Pro 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 62.  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 63.  Hyperbolic Functions
Hyperbolic Function Supported?
Double-precision floating point function Single-precision floating point function
cosh coshf
sinh sinhf
tanh tanhf
acosh acoshf
asinh asinhf
atanh atanhf
Table 64.  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)*
expm1 expm1f
ilogb ilogbf
log1p log1pf
log2 log2f
logb logbf
scalbn scalbnf X
scalbln scalblnf X
Table 65.  Power Functions
Power Function Supported?
Double-precision floating point function Single-precision floating point function
pow powf
sqrt sqrtf
cbrt cbrtf
hypot hypotf
Table 66.  Error and Gamma Functions
Error or Gamma Function Supported?
Double-precision floating point function Single-precision floating point function
erf erff
erfc erfcf
tgamma tgammaf
lgamma lgammaf
lgamma_r (Linux only)6 lgamma_rf (Linux only)6
Table 67.  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
remquo remquof
Table 68.  Floating-Point Manipulation Functions
Floating-Point Manipulation Function Supported?
Double-precision floating point function Single-precision floating point function
copysign copysignf
nan nanf X
nextafter nextafterf
nexttoward nexttowardf X
Table 69.  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 70.  Other Functions
Function Supported?
Double-precision floating point function Single-precision floating point function
fabs fabsf
fma fmaf
Table 71.  Classification Macros
Classification Macro Supported?
Double-precision floating point function Single-precision floating point function
fpclassify (Linux only) fpclassifyf (Linux only)
isfinite isfinitef
isinf isinff
isnan isnanf
isnormal (Linux only) isnormalf (Linux only)
signbit (Linux only) signbitf (Linux only)
Table 72.  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)
* 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