Single Precision Floating-point Mathematical Functions

Single Precision Floating-point Mathematical Functions#

HIP Runtime API Reference: Single Precision Floating-point Mathematical Functions
Single Precision Floating-point Mathematical Functions
Collaboration diagram for Single Precision Floating-point Mathematical Functions:

Functions

__DEVICE__ float acosf (float __x)
 Returns the arc cosine of x.
 
__DEVICE__ float acoshf (float __x)
 Returns the nonnegative arc hyperbolic cosine of x.
 
__DEVICE__ float asinf (float __x)
 Returns the arc sine of x.
 
__DEVICE__ float asinhf (float __x)
 Returns the arc hyperbolic sine of x.
 
__DEVICE__ float atan2f (float __x, float __y)
 Returns the arc tangent of the ratio of x and y.
 
__DEVICE__ float atanf (float __x)
 Returns the arc tangent of x.
 
__DEVICE__ float atanhf (float __x)
 Returns the arc hyperbolic tangent of x.
 
__DEVICE__ float cbrtf (float __x)
 Returns the cube root of x.
 
__DEVICE__ float ceilf (float __x)
 Returns ceiling of x.
 
__DEVICE__ float copysignf (float __x, float __y)
 Create value with given magnitude, copying sign of second value.
 
__DEVICE__ float cosf (float __x)
 Returns the cosine of x.
 
__DEVICE__ float coshf (float __x)
 Returns the hyperbolic cosine of x.
 
__DEVICE__ float cospif (float __x)
 Returns the cosine of \( \pi x\).
 
__DEVICE__ float cyl_bessel_i0f (float __x)
 Returns the value of the regular modified cylindrical Bessel function of order 0 for x.
 
__DEVICE__ float cyl_bessel_i1f (float __x)
 Returns the value of the regular modified cylindrical Bessel function of order 1 for x.
 
__DEVICE__ float erfcf (float __x)
 Returns the complementary error function of x.
 
__DEVICE__ float erfcinvf (float __x)
 Returns the inverse complementary function of x.
 
__DEVICE__ float erfcxf (float __x)
 Returns the scaled complementary error function of x.
 
__DEVICE__ float erff (float __x)
 Returns the error function of x.
 
__DEVICE__ float erfinvf (float __x)
 Returns the inverse error function of x.
 
__DEVICE__ float exp10f (float __x)
 Returns \( 10^x \).
 
__DEVICE__ float exp2f (float __x)
 Returns \( 2^x \).
 
__DEVICE__ float expf (float __x)
 Returns \( e^x \).
 
__DEVICE__ float expm1f (float __x)
 Returns \( \ln x - 1 \).
 
__DEVICE__ float fabsf (float __x)
 Returns the absolute value of x
 
__DEVICE__ float fdimf (float __x, float __y)
 Returns the positive difference between x and y.
 
__DEVICE__ float fdividef (float __x, float __y)
 Divide two floating point values.
 
__DEVICE__ float floorf (float __x)
 Returns the largest integer less than or equal to x.
 
__DEVICE__ float fmaf (float __x, float __y, float __z)
 Returns \(x \cdot y + z\) as a single operation.
 
__DEVICE__ float fmaxf (float __x, float __y)
 Determine the maximum numeric value of x and y.
 
__DEVICE__ float fminf (float __x, float __y)
 Determine the minimum numeric value of x and y.
 
__DEVICE__ float fmodf (float __x, float __y)
 Returns the floating-point remainder of x / y.
 
__DEVICE__ float frexpf (float __x, int *__nptr)
 Extract mantissa and exponent of x.
 
__DEVICE__ float hypotf (float __x, float __y)
 Returns the square root of the sum of squares of x and y.
 
__DEVICE__ int ilogbf (float __x)
 Returns the unbiased integer exponent of x.
 
__DEVICE__ __RETURN_TYPE __finitef (float __x)
 Determine whether x is finite.
 
__DEVICE__ __RETURN_TYPE __isinff (float __x)
 Determine whether x is infinite.
 
__DEVICE__ __RETURN_TYPE __isnanf (float __x)
 Determine whether x is a NaN.
 
__DEVICE__ float j0f (float __x)
 Returns the value of the Bessel function of the first kind of order 0 for x.
 
__DEVICE__ float j1f (float __x)
 Returns the value of the Bessel function of the first kind of order 1 for x.
 
__DEVICE__ float jnf (int __n, float __x)
 Returns the value of the Bessel function of the first kind of order n for x.
 
__DEVICE__ float ldexpf (float __x, int __e)
 Returns the value of \(x \cdot 2^{e}\) for x and e.
 
__DEVICE__ float lgammaf (float __x)
 Returns the natural logarithm of the absolute value of the gamma function of x.
 
__DEVICE__ long long int llrintf (float __x)
 Round x to nearest integer value.
 
__DEVICE__ long long int llroundf (float __x)
 Round to nearest integer value.
 
__DEVICE__ float log10f (float __x)
 Returns the base 10 logarithm of x.
 
__DEVICE__ float log1pf (float __x)
 Returns the natural logarithm of x + 1.
 
__DEVICE__ float log2f (float __x)
 Returns the base 2 logarithm of x.
 
__DEVICE__ float logbf (float __x)
 Returns the floating point representation of the exponent of x.
 
__DEVICE__ float logf (float __x)
 Returns the natural logarithm of x.
 
__DEVICE__ long int lrintf (float __x)
 Round x to nearest integer value.
 
__DEVICE__ long int lroundf (float __x)
 Round to nearest integer value.
 
__DEVICE__ float modff (float __x, float *__iptr)
 Break down x into fractional and integral parts.
 
__DEVICE__ float nanf (const char *__tagp __attribute__((nonnull)))
 Returns "Not a Number" value.
 
__DEVICE__ float nearbyintf (float __x)
 Round x to the nearest integer.
 
__DEVICE__ float nextafterf (float __x, float __y)
 Returns next representable single-precision floating-point value after x.
 
__DEVICE__ float norm3df (float __x, float __y, float __z)
 Returns the square root of the sum of squares of x, y and z.
 
__DEVICE__ float norm4df (float __x, float __y, float __z, float __w)
 Returns the square root of the sum of squares of x, y, z and w.
 
__DEVICE__ float normcdff (float __x)
 Returns the standard normal cumulative distribution function.
 
__DEVICE__ float normcdfinvf (float __x)
 Returns the inverse of the standard normal cumulative distribution function.
 
__DEVICE__ float normf (int __dim, const float *__a)
 Returns the square root of the sum of squares of any number of coordinates.
 
__DEVICE__ float powf (float __x, float __y)
 Returns \( x^y \).
 
__DEVICE__ float powif (float __x, int __y)
 Returns the value of first argument to the power of second argument.
 
__DEVICE__ float rcbrtf (float __x)
 Returns the reciprocal cube root function.
 
__DEVICE__ float remainderf (float __x, float __y)
 Returns single-precision floating-point remainder.
 
__DEVICE__ float remquof (float __x, float __y, int *__quo)
 Returns single-precision floating-point remainder and part of quotient.
 
__DEVICE__ float rhypotf (float __x, float __y)
 Returns one over the square root of the sum of squares of x and y.
 
__DEVICE__ float rintf (float __x)
 Round x to nearest integer value in floating-point.
 
__DEVICE__ float rnorm3df (float __x, float __y, float __z)
 Returns one over the square root of the sum of squares of x, y and z.
 
__DEVICE__ float rnorm4df (float __x, float __y, float __z, float __w)
 Returns one over the square root of the sum of squares of x, y, z and w.
 
__DEVICE__ float rnormf (int __dim, const float *__a)
 Returns the reciprocal of square root of the sum of squares of any number of coordinates.
 
__DEVICE__ float roundf (float __x)
 Round to nearest integer value in floating-point.
 
__DEVICE__ float rsqrtf (float __x)
 Returns the reciprocal of the square root of x.
 
__DEVICE__ float scalblnf (float __x, long int __n)
 Scale x by \( 2^n \).
 
__DEVICE__ float scalbnf (float __x, int __n)
 Scale x by \( 2^n \).
 
__DEVICE__ __RETURN_TYPE __signbitf (float __x)
 Return the sign bit of x.
 
__DEVICE__ void sincosf (float __x, float *__sinptr, float *__cosptr)
 Returns the sine and cosine of x.
 
__DEVICE__ void sincospif (float __x, float *__sinptr, float *__cosptr)
 Returns the sine and cosine of \( \pi x\).
 
__DEVICE__ float sinf (float __x)
 Returns the sine of x.
 
__DEVICE__ float sinhf (float __x)
 Returns the hyperbolic sine of x.
 
__DEVICE__ float sinpif (float __x)
 Returns the hyperbolic sine of \( \pi x\).
 
__DEVICE__ float sqrtf (float __x)
 Returns the square root of x.
 
__DEVICE__ float tanf (float __x)
 Returns the tangent of x.
 
__DEVICE__ float tanhf (float __x)
 Returns the hyperbolic tangent of x.
 
__DEVICE__ float tgammaf (float __x)
 Returns the gamma function of x.
 
__DEVICE__ float truncf (float __x)
 Truncate x to the integral part.
 
__DEVICE__ float y0f (float __x)
 Returns the value of the Bessel function of the second kind of order 0 for x.
 
__DEVICE__ float y1f (float __x)
 Returns the value of the Bessel function of the second kind of order 1 for x.
 
__DEVICE__ float ynf (int __n, float __x)
 Returns the value of the Bessel function of the second kind of order n for x.
 

Detailed Description

Single Precision Floating-point Mathematical Functions

Function Documentation

◆ __finitef()

__DEVICE__ __RETURN_TYPE __finitef ( float  __x)

Determine whether x is finite.

◆ __isinff()

__DEVICE__ __RETURN_TYPE __isinff ( float  __x)

Determine whether x is infinite.

◆ __isnanf()

__DEVICE__ __RETURN_TYPE __isnanf ( float  __x)

Determine whether x is a NaN.

◆ __signbitf()

__DEVICE__ __RETURN_TYPE __signbitf ( float  __x)

Return the sign bit of x.

◆ acosf()

__DEVICE__ float acosf ( float  __x)

Returns the arc cosine of x.

◆ acoshf()

__DEVICE__ float acoshf ( float  __x)

Returns the nonnegative arc hyperbolic cosine of x.

◆ asinf()

__DEVICE__ float asinf ( float  __x)

Returns the arc sine of x.

◆ asinhf()

__DEVICE__ float asinhf ( float  __x)

Returns the arc hyperbolic sine of x.

◆ atan2f()

__DEVICE__ float atan2f ( float  __x,
float  __y 
)

Returns the arc tangent of the ratio of x and y.

◆ atanf()

__DEVICE__ float atanf ( float  __x)

Returns the arc tangent of x.

◆ atanhf()

__DEVICE__ float atanhf ( float  __x)

Returns the arc hyperbolic tangent of x.

◆ cbrtf()

__DEVICE__ float cbrtf ( float  __x)

Returns the cube root of x.

◆ ceilf()

__DEVICE__ float ceilf ( float  __x)

Returns ceiling of x.

◆ copysignf()

__DEVICE__ float copysignf ( float  __x,
float  __y 
)

Create value with given magnitude, copying sign of second value.

◆ cosf()

__DEVICE__ float cosf ( float  __x)

Returns the cosine of x.

◆ coshf()

__DEVICE__ float coshf ( float  __x)

Returns the hyperbolic cosine of x.

◆ cospif()

__DEVICE__ float cospif ( float  __x)

Returns the cosine of \( \pi x\).

◆ cyl_bessel_i0f()

__DEVICE__ float cyl_bessel_i0f ( float  __x)

Returns the value of the regular modified cylindrical Bessel function of order 0 for x.

◆ cyl_bessel_i1f()

__DEVICE__ float cyl_bessel_i1f ( float  __x)

Returns the value of the regular modified cylindrical Bessel function of order 1 for x.

◆ erfcf()

__DEVICE__ float erfcf ( float  __x)

Returns the complementary error function of x.

◆ erfcinvf()

__DEVICE__ float erfcinvf ( float  __x)

Returns the inverse complementary function of x.

◆ erfcxf()

__DEVICE__ float erfcxf ( float  __x)

Returns the scaled complementary error function of x.

◆ erff()

__DEVICE__ float erff ( float  __x)

Returns the error function of x.

◆ erfinvf()

__DEVICE__ float erfinvf ( float  __x)

Returns the inverse error function of x.

◆ exp10f()

__DEVICE__ float exp10f ( float  __x)

Returns \( 10^x \).

◆ exp2f()

__DEVICE__ float exp2f ( float  __x)

Returns \( 2^x \).

◆ expf()

__DEVICE__ float expf ( float  __x)

Returns \( e^x \).

◆ expm1f()

__DEVICE__ float expm1f ( float  __x)

Returns \( \ln x - 1 \).

◆ fabsf()

__DEVICE__ float fabsf ( float  __x)

Returns the absolute value of x

◆ fdimf()

__DEVICE__ float fdimf ( float  __x,
float  __y 
)

Returns the positive difference between x and y.

◆ fdividef()

__DEVICE__ float fdividef ( float  __x,
float  __y 
)

Divide two floating point values.

◆ floorf()

__DEVICE__ float floorf ( float  __x)

Returns the largest integer less than or equal to x.

◆ fmaf()

__DEVICE__ float fmaf ( float  __x,
float  __y,
float  __z 
)

Returns \(x \cdot y + z\) as a single operation.

◆ fmaxf()

__DEVICE__ float fmaxf ( float  __x,
float  __y 
)

Determine the maximum numeric value of x and y.

◆ fminf()

__DEVICE__ float fminf ( float  __x,
float  __y 
)

Determine the minimum numeric value of x and y.

◆ fmodf()

__DEVICE__ float fmodf ( float  __x,
float  __y 
)

Returns the floating-point remainder of x / y.

◆ frexpf()

__DEVICE__ float frexpf ( float  __x,
int *  __nptr 
)

Extract mantissa and exponent of x.

◆ hypotf()

__DEVICE__ float hypotf ( float  __x,
float  __y 
)

Returns the square root of the sum of squares of x and y.

◆ ilogbf()

__DEVICE__ int ilogbf ( float  __x)

Returns the unbiased integer exponent of x.

◆ j0f()

__DEVICE__ float j0f ( float  __x)

Returns the value of the Bessel function of the first kind of order 0 for x.

◆ j1f()

__DEVICE__ float j1f ( float  __x)

Returns the value of the Bessel function of the first kind of order 1 for x.

◆ jnf()

__DEVICE__ float jnf ( int  __n,
float  __x 
)

Returns the value of the Bessel function of the first kind of order n for x.

◆ ldexpf()

__DEVICE__ float ldexpf ( float  __x,
int  __e 
)

Returns the value of \(x \cdot 2^{e}\) for x and e.

◆ lgammaf()

__DEVICE__ float lgammaf ( float  __x)

Returns the natural logarithm of the absolute value of the gamma function of x.

◆ llrintf()

__DEVICE__ long long int llrintf ( float  __x)

Round x to nearest integer value.

◆ llroundf()

__DEVICE__ long long int llroundf ( float  __x)

Round to nearest integer value.

◆ log10f()

__DEVICE__ float log10f ( float  __x)

Returns the base 10 logarithm of x.

◆ log1pf()

__DEVICE__ float log1pf ( float  __x)

Returns the natural logarithm of x + 1.

◆ log2f()

__DEVICE__ float log2f ( float  __x)

Returns the base 2 logarithm of x.

◆ logbf()

__DEVICE__ float logbf ( float  __x)

Returns the floating point representation of the exponent of x.

◆ logf()

__DEVICE__ float logf ( float  __x)

Returns the natural logarithm of x.

◆ lrintf()

__DEVICE__ long int lrintf ( float  __x)

Round x to nearest integer value.

◆ lroundf()

__DEVICE__ long int lroundf ( float  __x)

Round to nearest integer value.

◆ modff()

__DEVICE__ float modff ( float  __x,
float *  __iptr 
)

Break down x into fractional and integral parts.

◆ nanf()

__DEVICE__ float nanf ( const char *__tagp   __attribute__(nonnull))

Returns "Not a Number" value.

◆ nearbyintf()

__DEVICE__ float nearbyintf ( float  __x)

Round x to the nearest integer.

◆ nextafterf()

__DEVICE__ float nextafterf ( float  __x,
float  __y 
)

Returns next representable single-precision floating-point value after x.

◆ norm3df()

__DEVICE__ float norm3df ( float  __x,
float  __y,
float  __z 
)

Returns the square root of the sum of squares of x, y and z.

◆ norm4df()

__DEVICE__ float norm4df ( float  __x,
float  __y,
float  __z,
float  __w 
)

Returns the square root of the sum of squares of x, y, z and w.

◆ normcdff()

__DEVICE__ float normcdff ( float  __x)

Returns the standard normal cumulative distribution function.

◆ normcdfinvf()

__DEVICE__ float normcdfinvf ( float  __x)

Returns the inverse of the standard normal cumulative distribution function.

◆ normf()

__DEVICE__ float normf ( int  __dim,
const float *  __a 
)

Returns the square root of the sum of squares of any number of coordinates.

◆ powf()

__DEVICE__ float powf ( float  __x,
float  __y 
)

Returns \( x^y \).

◆ powif()

__DEVICE__ float powif ( float  __x,
int  __y 
)

Returns the value of first argument to the power of second argument.

◆ rcbrtf()

__DEVICE__ float rcbrtf ( float  __x)

Returns the reciprocal cube root function.

◆ remainderf()

__DEVICE__ float remainderf ( float  __x,
float  __y 
)

Returns single-precision floating-point remainder.

◆ remquof()

__DEVICE__ float remquof ( float  __x,
float  __y,
int *  __quo 
)

Returns single-precision floating-point remainder and part of quotient.

◆ rhypotf()

__DEVICE__ float rhypotf ( float  __x,
float  __y 
)

Returns one over the square root of the sum of squares of x and y.

◆ rintf()

__DEVICE__ float rintf ( float  __x)

Round x to nearest integer value in floating-point.

◆ rnorm3df()

__DEVICE__ float rnorm3df ( float  __x,
float  __y,
float  __z 
)

Returns one over the square root of the sum of squares of x, y and z.

◆ rnorm4df()

__DEVICE__ float rnorm4df ( float  __x,
float  __y,
float  __z,
float  __w 
)

Returns one over the square root of the sum of squares of x, y, z and w.

◆ rnormf()

__DEVICE__ float rnormf ( int  __dim,
const float *  __a 
)

Returns the reciprocal of square root of the sum of squares of any number of coordinates.

◆ roundf()

__DEVICE__ float roundf ( float  __x)

Round to nearest integer value in floating-point.

◆ rsqrtf()

__DEVICE__ float rsqrtf ( float  __x)

Returns the reciprocal of the square root of x.

◆ scalblnf()

__DEVICE__ float scalblnf ( float  __x,
long int  __n 
)

Scale x by \( 2^n \).

◆ scalbnf()

__DEVICE__ float scalbnf ( float  __x,
int  __n 
)

Scale x by \( 2^n \).

◆ sincosf()

__DEVICE__ void sincosf ( float  __x,
float *  __sinptr,
float *  __cosptr 
)

Returns the sine and cosine of x.

◆ sincospif()

__DEVICE__ void sincospif ( float  __x,
float *  __sinptr,
float *  __cosptr 
)

Returns the sine and cosine of \( \pi x\).

◆ sinf()

__DEVICE__ float sinf ( float  __x)

Returns the sine of x.

◆ sinhf()

__DEVICE__ float sinhf ( float  __x)

Returns the hyperbolic sine of x.

◆ sinpif()

__DEVICE__ float sinpif ( float  __x)

Returns the hyperbolic sine of \( \pi x\).

◆ sqrtf()

__DEVICE__ float sqrtf ( float  __x)

Returns the square root of x.

◆ tanf()

__DEVICE__ float tanf ( float  __x)

Returns the tangent of x.

◆ tanhf()

__DEVICE__ float tanhf ( float  __x)

Returns the hyperbolic tangent of x.

◆ tgammaf()

__DEVICE__ float tgammaf ( float  __x)

Returns the gamma function of x.

◆ truncf()

__DEVICE__ float truncf ( float  __x)

Truncate x to the integral part.

◆ y0f()

__DEVICE__ float y0f ( float  __x)

Returns the value of the Bessel function of the second kind of order 0 for x.

◆ y1f()

__DEVICE__ float y1f ( float  __x)

Returns the value of the Bessel function of the second kind of order 1 for x.

◆ ynf()

__DEVICE__ float ynf ( int  __n,
float  __x 
)

Returns the value of the Bessel function of the second kind of order n for x.