Developer Reference for Intel® oneAPI Math Kernel Library for C
VM Mathematical Functions
This section describes VM functions that compute values of mathematical functions on real and complex vector arguments.
Each function is introduced by its short name, a brief description of its purpose, and the calling sequence for each type of data, as well as a description of the input/output arguments.
The input range of parameters is equal to the mathematical range of the input data type, unless the function description specifies input threshold values, which mark off the precision overflow, as follows:
FLT16_MAX denotes the maximum number representable in half precision real data type
FLT_MAX denotes the maximum number representable in single precision real data type
DBL_MAX denotes the maximum number representable in double precision real data type
Table “VM Mathematical Functions” lists available mathematical functions and associated data types.
VM Mathematical Functions
Function |
Data Types |
Description |
|---|---|---|
Arithmetic Functions |
||
v?Add (Performs element by element addition of vector a and vector b.) |
h , s , d , c , z |
Adds vector elements |
v?Sub (Performs element by element subtraction of vector b from vector a.) |
h , s , d , c , z |
Subtracts vector elements |
v?Sqr (Performs element by element squaring of the vector.) |
h , s , d |
Squares vector elements |
v?Mul (Performs element by element multiplication of vector a and vector b.) |
h , s , d , c , z |
Multiplies vector elements |
v?MulByConj (Performs element by element multiplication of vector a element and conjugated vector b element.) |
c , z |
Multiplies elements of one vector by conjugated elements of the second vector |
v?Conj (Performs element by element conjugation of the vector.) |
c , z |
Conjugates vector elements |
v?Abs (Computes absolute value of vector elements.) |
h , s , d , c , z |
Computes the absolute value of vector elements |
v?Arg (Computes argument of vector elements.) |
c , z |
Computes the argument of vector elements |
v?LinearFrac (Performs linear fraction transformation of vectors a and b with scalar parameters.) |
h , s , d |
Performs linear fraction transformation of vectors |
v?Fmod (The v?Fmod function performs element by element computation of the modulus function of vector a with respect to vector b.) |
h , s , d |
Performs element by element computation of the modulus function of vector a with respect to vector b |
v?Remainder (Performs element by element computation of the remainder function on the elements of vector a and the corresponding elements of vector b.) |
h , s , d |
Performs element by element computation of the remainder function on the elements of vector a and the corresponding elements of vector b |
Power and Root Functions |
||
v?Inv (Performs element by element inversion of the vector.) |
h , s , d |
Inverts vector elements |
v?Div (Performs element by element division of vector a by vector b) |
h , s , d , c , z |
Divides elements of one vector by elements of the second vector |
v?Sqrt (Computes a square root of vector elements.) |
h , s , d , c , z |
Computes the square root of vector elements |
v?InvSqrt (Computes an inverse square root of vector elements.) |
h , s , d |
Computes the inverse square root of vector elements |
v?Cbrt (Computes a cube root of vector elements.) |
h , s , d |
Computes the cube root of vector elements |
v?InvCbrt (Computes an inverse cube root of vector elements.) |
h , s , d |
Computes the inverse cube root of vector elements |
v?Pow2o3 (Computes the cube root of the square of each vector element.) |
h , s , d |
Computes the cube root of the square of each vector element |
v?Pow3o2 (Computes the square root of the cube of each vector element.) |
h , s , d |
Computes the square root of the cube of each vector element |
v?Pow (Computes a to the power b for elements of two vectors.) |
h , s , d , c , z |
Raises each vector element to the specified power |
v?Powx (Computes vector a to the scalar power b.) |
h , s , d , c , z |
Raises each vector element to the constant power |
v?Powr (Computes a to the power b for elements of two vectors, where the elements of vector argument a are all non-negative.) |
h , s , d |
Computes a to the power b for elements of two vectors, where the elements of vector argument a are all non-negative |
v?Hypot (Computes a square root of sum of two squared elements.) |
h , s , d |
Computes the square root of sum of squares |
Exponential and Logarithmic Functions |
||
v?Exp (Computes an exponential of vector elements.) |
h , s , d , c , z |
Computes the base e exponential of vector elements |
v?Exp2 (Computes the base 2 exponential of vector elements.) |
h , s , d |
Computes the base 2 exponential of vector elements |
v?Exp10 (Computes the base 10 exponential of vector elements.) |
h , s , d |
Computes the base 10 exponential of vector elements |
v?Expm1 (Computes an exponential of vector elements decreased by 1.) |
h , s , d |
Computes the base e exponential of vector elements decreased by 1 |
v?Ln (Computes natural logarithm of vector elements.) |
h , s , d , c , z |
Computes the natural logarithm of vector elements |
v?Log2 (Computes the base 2 logarithm of vector elements.) |
h , s , d |
Computes the base 2 logarithm of vector elements |
v?Log10 (Computes the base 10 logarithm of vector elements.) |
h , s , d , c , z |
Computes the base 10 logarithm of vector elements |
v?Log1p (Computes a natural logarithm of vector elements that are increased by 1.) |
h , s , d |
Computes the natural logarithm of vector elements that are increased by 1 |
v?Logb (Computes the exponents of the elements of input vector a.) |
h , s , d |
Computes the exponents of the elements of input vector a |
Trigonometric Functions |
||
v?Cos (Computes cosine of vector elements.) |
h , s , d , c , z |
Computes the cosine of vector elements |
v?Sin (Computes sine of vector elements.) |
h , s , d , c , z |
Computes the sine of vector elements |
v?SinCos (Computes sine and cosine of vector elements.) |
h , s , d |
Computes the sine and cosine of vector elements |
v?CIS (Computes complex exponent of real vector elements (cosine and sine of real vector elements combined to complex value).) |
c , z |
Computes the complex exponent of vector elements (cosine and sine combined to complex value) |
v?Tan (Computes tangent of vector elements.) |
h , s , d , c , z |
Computes the tangent of vector elements |
v?Acos (Computes inverse cosine of vector elements.) |
h , s , d , c , z |
Computes the inverse cosine of vector elements |
v?Asin (Computes inverse sine of vector elements.) |
h , s , d , c , z |
Computes the inverse sine of vector elements |
v?Atan (Computes inverse tangent of vector elements.) |
h , s , d , c , z |
Computes the inverse tangent of vector elements |
v?Atan2 (Computes four-quadrant inverse tangent of elements of two vectors.) |
h , s , d |
Computes the four-quadrant inverse tangent of ratios of the elements of two vectors |
v?Cospi (Computes the cosine of vector elements multiplied by π.) |
h , s , d |
Computes the cosine of vector elements multiplied by π |
v?Sinpi (Computes the sine of vector elements multiplied by π.) |
h , s , d |
Computes the sine of vector elements multiplied by π |
v?Tanpi (Computes the tangent of vector elements multiplied by π.) |
h , s , d |
Computes the tangent of vector elements multiplied by π |
v?Acospi (Computes the inverse cosine of vector elements divided by π.) |
h , s , d |
Computes the inverse cosine of vector elements divided by π |
v?Asinpi (Computes the inverse sine of vector elements divided by π.) |
h , s , d |
Computes the inverse sine of vector elements divided by π |
v?Atanpi (Computes the inverse tangent of vector elements divided by π.) |
h , s , d |
Computes the inverse tangent of vector elements divided by π |
v?Atan2pi (Computes the four-quadrant inverse tangent of the ratios of the corresponding elements of two vectors divided by π.) |
h , s , d |
Computes the four-quadrant inverse tangent of the ratios of the corresponding elementss of two vectors divided by π |
v?Cosd (Computes the cosine of vector elements multiplied by π/180.) |
h , s , d |
Computes the cosine of vector elements multiplied by π /180 |
v?Sind (Computes the sine of vector elements multiplied by π/180.) |
h , s , d |
Computes the sine of vector elements multiplied by π /180 |
v?Tand (Computes the tangent of vector elements multiplied by π/180.) |
h , s , d |
Computes the tangent of vector elements multiplied by π /180 |
Hyperbolic Functions |
||
v?Cosh (Computes hyperbolic cosine of vector elements.) |
h , s , d , c , z |
Computes the hyperbolic cosine of vector elements |
v?Sinh (Computes hyperbolic sine of vector elements.) |
h , s , d , c , z |
Computes the hyperbolic sine of vector elements |
v?Tanh (Computes hyperbolic tangent of vector elements.) |
h , s , d , c , z |
Computes the hyperbolic tangent of vector elements |
v?Acosh (Computes inverse hyperbolic cosine (nonnegative) of vector elements.) |
h , s , d , c , z |
Computes the inverse hyperbolic cosine of vector elements |
v?Asinh (Computes inverse hyperbolic sine of vector elements.) |
h , s , d , c , z |
Computes the inverse hyperbolic sine of vector elements |
v?Atanh (Computes inverse hyperbolic tangent of vector elements.) |
h , s , d , c , z |
Computes the inverse hyperbolic tangent of vector elements. |
Special Functions |
||
v?Erf (Computes the error function value of vector elements.) |
h , s , d |
Computes the error function value of vector elements |
v?Erfc (Computes the complementary error function value of vector elements.) |
h , s , d |
Computes the complementary error function value of vector elements |
v?Erfcx (Computes the scaled complementary error function value of vector elements.) |
h,s,d |
Computes the scaled complementary error-function value of vector elements |
v?erfcx (Computes the scaled complementary error function value of vector elements.) |
s,d |
Computes the scaled complementary error-function value of vector elements |
v?CdfNorm (Computes the cumulative normal distribution function values of vector elements.) |
h , s , d |
Computes the cumulative normal distribution function value of vector elements |
v?ErfInv (Computes inverse error function value of vector elements.) |
h , s , d |
Computes the inverse error function value of vector elements |
v?ErfcInv (Computes the inverse complementary error function value of vector elements.) |
h , s , d |
Computes the inverse complementary error function value of vector elements |
v?CdfNormInv (Computes the inverse cumulative normal distribution function values of vector elements.) |
h , s , d |
Computes the inverse cumulative normal distribution function value of vector elements |
v?LGamma (Computes the natural logarithm of the absolute value of gamma function for vector elements.) |
h , s , d |
Computes the natural logarithm for the absolute value of the gamma function of vector elements |
v?TGamma (Computes the gamma function of vector elements.) |
h , s , d |
Computes the gamma function of vector elements |
v?ExpInt1 (Computes the exponential integral of vector elements.) |
h , s , d |
Computes the exponential integral of vector elements |
v?I0 (Computes the regular modified cylindrical Bessel function of vector elements.) |
h,s,d |
Computes the regular modified cylindrical Bessel function of order 0 |
v?i0 (Computes the regular modified cylindrical Bessel function of vector elements.) |
s,d |
Computes the regular modified cylindrical Bessel function of order 0 |
v?I1 (Computes the regular modified cylindrical Bessel function of vector elements.) |
h,s,d |
Computes the regular modified cylindrical Bessel function of order 1 |
v?i1 (Computes the regular modified cylindrical Bessel function of vector elements.) |
s,d |
Computes the regular modified cylindrical Bessel function of order 1 |
v?J0 (Computes the Bessel function of the first kind for vector elements.) |
h,s,d |
Computes the Bessel function of the first kind of order 0 |
v?j0 (Computes the Bessel function of the first kind for vector elements.) |
s,d |
Computes the Bessel function of the first kind of order 0 |
v?J1 (Computes the Bessel function of the first kind for vector elements.) |
h,s,d |
Computes the Bessel function of the first kind of order 1 |
v?j1 (Computes the Bessel function of the first kind for vector elements.) |
s,d |
Computes the Bessel function of the first kind of order 1 |
v?Jn (Computes the Bessel function of the first kind for vector elements.) |
h,s,d |
Computes the Bessel function of the first kind of a given order |
v?jn (Computes the Bessel function of the first kind for vector elements.) |
s,d |
Computes the Bessel function of the first kind of a given order |
v?Y0 (Computes the Bessel function of the second kind for vector elements.) |
h,s,d |
Computes the Bessel function of the second kind of order 0 |
v?y0 (Computes the Bessel function of the second kind for vector elements.) |
s,d |
Computes the Bessel function of the second kind of order 0 |
v?Y1 (Computes the Bessel function of the second kind for vector elements.) |
h,s,d |
Computes the Bessel function of the second kind of order 1 |
v?y1 (Computes the Bessel function of the second kind for vector elements.) |
s,d |
Computes the Bessel function of the second kind of order 1 |
v?Yn (Computes the Bessel function of the second kind for vector elements.) |
h,s,d |
Computes the Bessel function of the second kind of a given order |
v?yn (Computes the Bessel function of the second kind for vector elements.) |
s,d |
Computes the Bessel function of the second kind of a given order |
Rounding Functions |
||
v?Floor (Computes an integer value rounded towards minus infinity for each vector element.) |
h , s , d |
Rounds towards minus infinity |
v?Ceil (Computes an integer value rounded towards plus infinity for each vector element.) |
h , s , d |
Rounds towards plus infinity |
v?Trunc (Computes an integer value rounded towards zero for each vector element.) |
h , s , d |
Rounds towards zero infinity |
v?Round (Computes a value rounded to the nearest integer for each vector element.) |
h , s , d |
Rounds to nearest integer |
v?NearbyInt (Computes a rounded integer value in the current rounding mode for each vector element.) |
h , s , d |
Rounds according to current mode |
v?Rint (Computes a rounded integer value in the current rounding mode.) |
h , s , d |
Rounds according to current mode and raising inexact result exception |
v?Modf (Computes a truncated integer value and the remaining fraction part for each vector element.) |
h , s , d |
Computes the integer and fractional parts |
v?Frac (Computes a signed fractional part for each vector element.) |
h , s , d |
Computes the fractional part |
Miscellaneous Functions |
||
v?CopySign (Returns vector of elements of one argument with signs changed to match other argument elements.) |
h , s , d |
Returns vector of elements of one argument with signs changed to match other argument elements |
v?NextAfter (Returns vector of elements containing the next representable floating-point values following the values from the elements of one vector in the direction of the corresponding elements of another vector.) |
h , s , d |
Returns vector of elements containing the next representable floating-point values following the values from the elements of one vector in the direction of the corresponding elements of another vector |
v?Fdim (Returns vector containing the differences of the corresponding elements of the vector arguments if the first is larger and +0 otherwise.) |
h , s , d |
Returns vector containing the differences of the corresponding elements of the vector arguments if the first is larger and +0 otherwise |
v?Fmax (Returns the larger of each pair of elements of the two vector arguments.) |
h , s , d |
Returns the larger of each pair of elements of the two vector arguments |
v?Fmin (Returns the smaller of each pair of elements of the two vector arguments.) |
h , s , d |
Returns the smaller of each pair of elements of the two vector arguments |
v?MaxMag (Returns the element with the larger magnitude between each pair of elements of the two vector arguments.) |
h , s , d |
Returns the element with the larger magnitude between each pair of elements of the two vector arguments |
v?MinMag (Returns the element with the smaller magnitude between each pair of elements of the two vector arguments.) |
h , s , d |
Returns the element with the smaller magnitude between each pair of elements of the two vector arguments |