Intel® High Level Synthesis Compiler Pro Edition: Reference Manual

ID 683349
Date 10/02/2023
Public

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

Document Table of Contents

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

The Intel® HLS Compiler Pro 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 Pro 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 73.  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 74.  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) *
Table 75.  Error and Gamma Functions
Error or Gamma Function Supported?
Double-precision floating point function Single-precision floating point function
lgamma_r (Windows only)8 lgamma_rf (Windows only)8
Table 76.  Minimum, Maximum, and Difference Functions
Minimum, Maximum, or Difference Function Supported?
Double-precision floating point function Single-precision floating point function
maxmag maxmagf
minmag minmagf
Table 77.  Other Functions
Function Supported?
Double-precision floating point function Single-precision floating point function
fract fractf
mad madf
oclnan oclnanf
rootn rootnf
Table 78.  Classification Macros
Classification Macro Supported?
Double-precision floating point function Single-precision floating point function
isordered isorderedf
In addition, the HLS/extendedmath.h header file supports the following versions of the popcount function:
Table 79.  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