Intel® High Level Synthesis Compiler Standard Edition: Reference Manual

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

A.2. Math Functions Provided by the extendedmath.h Header File

The Intel® HLS Compiler Standard Edition supports an additional subset of math functions through the HLS/extendedmath.h header file.

For each extendedmath.h function listed below, "●" indicates that the Intel® HLS Compiler Standard Edition 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/extendedmath.h header file to see which math functions are supported on the different operating systems.

Table 47.  Extended Math Functions
Extended Math Functions Supported?
Double-precision floating point function Single-precision floating point function
sincos sincosf
acospi acospif
asinpi asinpif
atanpi atanpif
cospi cospif
sinpi sinpif
tanpi tanpif
pown pownf
powr powrf
rsqrt rsqrtf
Table 48.  Exponential and Logarithmic Functions
Exponential or Logarithmic Function Supported?
Double-precision floating point function Single-precision floating point function
exp10 (Windows only) exp10f (Windows only) * X
Table 49.  Error and Gamma Functions
Error or Gamma Function Supported?
Double-precision floating point function Single-precision floating point function
lgamma_r (Windows only)4 lgamma_rf (Windows only)4 X
Table 50.  Minimum, Maximum, and Difference Functions
Minimum, Maximum, or Difference Function Supported?
Double-precision floating point function Single-precision floating point function
maxmag maxmagf X
minmag minmagf X
Table 51.  Other Functions
Function Supported?
Double-precision floating point function Single-precision floating point function
fract fractf X
mad madf X
oclnan oclnanf X
rootn rootnf X
Table 52.  Classification Macros
Classification Macro Supported?
Double-precision floating point function Single-precision floating point function
isordered isorderedf X
In addition, the HLS/extendedmath.h header file supports the following versions of the popcount function:
Table 53.  Popcount function
Data type Function
Unsigned char popcountc
Unsigned short popcounts
Unsigned int popcount
Unsigned long popcountl
Unsigned long long popcountll

To see an example of how to use the math functions provided by the extendedmath.h header file and how to override a math function in the header file so that you can compile your design with GCC or Microsoft Visual Studio, review the following example design: <quartus_installdir>/hls/examples/QRD.

* For Linux, support for this function is in the math.h header file
* For Linux, support for this function is in the math.h header file