Double Precision Floating-point Mathematical Functions#
Functions | |
| __DEVICE__ double | acos (double __x) |
Returns the arc cosine of x. More... | |
| __DEVICE__ double | acosh (double __x) |
Returns the nonnegative arc hyperbolic cosine of x. More... | |
| __DEVICE__ double | asin (double __x) |
Returns the arc sine of x. More... | |
| __DEVICE__ double | asinh (double __x) |
Returns the arc hyperbolic sine of x. More... | |
| __DEVICE__ double | atan (double __x) |
Returns the arc tangent of x. More... | |
| __DEVICE__ double | atan2 (double __x, double __y) |
Returns the arc tangent of the ratio of x and y. More... | |
| __DEVICE__ double | atanh (double __x) |
Returns the arc hyperbolic tangent of x. More... | |
| __DEVICE__ double | cbrt (double __x) |
Returns the cube root of x. More... | |
| __DEVICE__ double | ceil (double __x) |
Returns ceiling of x. More... | |
| __DEVICE__ double | copysign (double __x, double __y) |
| Create value with given magnitude, copying sign of second value. More... | |
| __DEVICE__ double | cos (double __x) |
Returns the cosine of x. More... | |
| __DEVICE__ double | cosh (double __x) |
Returns the hyperbolic cosine of x. More... | |
| __DEVICE__ double | cospi (double __x) |
| Returns the cosine of \( x\pi\). More... | |
| __DEVICE__ double | cyl_bessel_i0 (double __x) |
Returns the value of the regular modified cylindrical Bessel function of order 0 for x. More... | |
| __DEVICE__ double | cyl_bessel_i1 (double __x) |
Returns the value of the regular modified cylindrical Bessel function of order 1 for x. More... | |
| __DEVICE__ double | erf (double __x) |
Returns the error function of x. More... | |
| __DEVICE__ double | erfc (double __x) |
Returns the complementary error function of x. More... | |
| __DEVICE__ double | erfcinv (double __x) |
Returns the inverse complementary function of x. More... | |
| __DEVICE__ double | erfcx (double __x) |
Returns the scaled complementary error function of x. More... | |
| __DEVICE__ double | erfinv (double __x) |
Returns the inverse error function of x. More... | |
| __DEVICE__ double | exp (double __x) |
| Returns \( e^x \). More... | |
| __DEVICE__ double | exp10 (double __x) |
| Returns \( 10^x \). More... | |
| __DEVICE__ double | exp2 (double __x) |
| Returns \( 2^x \). More... | |
| __DEVICE__ double | expm1 (double __x) |
Returns \( e^x -1\) for x. More... | |
| __DEVICE__ double | fabs (double __x) |
Returns the absolute value of x. More... | |
| __DEVICE__ double | fdim (double __x, double __y) |
Returns the positive difference between x and y. More... | |
| __DEVICE__ double | floor (double __x) |
Returns the largest integer less than or equal to x. More... | |
| __DEVICE__ double | fma (double __x, double __y, double __z) |
| Returns \(x \cdot y + z\) as a single operation. More... | |
| __DEVICE__ double | fmax (double __x, double __y) |
Determine the maximum numeric value of x and y. More... | |
| __DEVICE__ double | fmin (double __x, double __y) |
Determine the minimum numeric value of x and y. More... | |
| __DEVICE__ double | fmod (double __x, double __y) |
Returns the floating-point remainder of x / y. More... | |
| __DEVICE__ double | frexp (double __x, int *__nptr) |
Extract mantissa and exponent of x. More... | |
| __DEVICE__ double | hypot (double __x, double __y) |
Returns the square root of the sum of squares of x and y. More... | |
| __DEVICE__ int | ilogb (double __x) |
Returns the unbiased integer exponent of x. More... | |
| __DEVICE__ __RETURN_TYPE | __finite (double __x) |
Determine whether x is finite. More... | |
| __DEVICE__ __RETURN_TYPE | __isinf (double __x) |
Determine whether x is infinite. More... | |
| __DEVICE__ __RETURN_TYPE | __isnan (double __x) |
Determine whether x is a NaN. More... | |
| __DEVICE__ double | j0 (double __x) |
Returns the value of the Bessel function of the first kind of order 0 for x. More... | |
| __DEVICE__ double | j1 (double __x) |
Returns the value of the Bessel function of the first kind of order 1 for x. More... | |
| __DEVICE__ double | jn (int __n, double __x) |
Returns the value of the Bessel function of the first kind of order n for x. More... | |
| __DEVICE__ double | ldexp (double __x, int __e) |
Returns the value of \(x \cdot 2^{e}\) for x and e. More... | |
| __DEVICE__ double | lgamma (double __x) |
Returns the natural logarithm of the absolute value of the gamma function of x. More... | |
| __DEVICE__ long long int | llrint (double __x) |
Round x to nearest integer value. More... | |
| __DEVICE__ long long int | llround (double __x) |
| Round to nearest integer value. More... | |
| __DEVICE__ double | log (double __x) |
Returns the natural logarithm of x. More... | |
| __DEVICE__ double | log10 (double __x) |
Returns the base 10 logarithm of x. More... | |
| __DEVICE__ double | log1p (double __x) |
Returns the natural logarithm of x + 1. More... | |
| __DEVICE__ double | log2 (double __x) |
Returns the base 2 logarithm of x. More... | |
| __DEVICE__ double | logb (double __x) |
Returns the floating point representation of the exponent of x. More... | |
| __DEVICE__ long int | lrint (double __x) |
Round x to nearest integer value. More... | |
| __DEVICE__ long int | lround (double __x) |
| Round to nearest integer value. More... | |
| __DEVICE__ double | modf (double __x, double *__iptr) |
Break down x into fractional and integral parts. More... | |
| __DEVICE__ double | nan (const char *__tagp) |
| Returns "Not a Number" value. More... | |
| __DEVICE__ double | nearbyint (double __x) |
Round x to the nearest integer. More... | |
| __DEVICE__ double | nextafter (double __x, double __y) |
Returns next representable single-precision floating-point value after x. More... | |
| __DEVICE__ double | norm (int __dim, const double *__a) |
| Returns the square root of the sum of squares of any number of coordinates. More... | |
| __DEVICE__ double | norm3d (double __x, double __y, double __z) |
Returns the square root of the sum of squares of x, y and z. More... | |
| __DEVICE__ double | norm4d (double __x, double __y, double __z, double __w) |
Returns the square root of the sum of squares of x, y, z and w. More... | |
| __DEVICE__ double | normcdf (double __x) |
| Returns the standard normal cumulative distribution function. More... | |
| __DEVICE__ double | normcdfinv (double __x) |
| Returns the inverse of the standard normal cumulative distribution function. More... | |
| __DEVICE__ double | pow (double __x, double __y) |
| Returns \( x^y \). More... | |
| __DEVICE__ double | powi (double __x, int __y) |
| Returns the value of first argument to the power of second argument. More... | |
| __DEVICE__ double | rcbrt (double __x) |
| Returns the reciprocal cube root function. More... | |
| __DEVICE__ double | remainder (double __x, double __y) |
| Returns double-precision floating-point remainder. More... | |
| __DEVICE__ double | remquo (double __x, double __y, int *__quo) |
| Returns double-precision floating-point remainder and part of quotient. More... | |
| __DEVICE__ double | rhypot (double __x, double __y) |
Returns one over the square root of the sum of squares of x and y. More... | |
| __DEVICE__ double | rint (double __x) |
Round x to nearest integer value in floating-point. More... | |
| __DEVICE__ double | rnorm (int __dim, const double *__a) |
| Returns the reciprocal of square root of the sum of squares of any number of coordinates. More... | |
| __DEVICE__ double | rnorm3d (double __x, double __y, double __z) |
Returns one over the square root of the sum of squares of x, y and z. More... | |
| __DEVICE__ double | rnorm4d (double __x, double __y, double __z, double __w) |
Returns one over the square root of the sum of squares of x, y, z and w. More... | |
| __DEVICE__ double | round (double __x) |
| Round to nearest integer value in floating-point. More... | |
| __DEVICE__ double | rsqrt (double __x) |
Returns the reciprocal of the square root of x. More... | |
| __DEVICE__ double | scalbln (double __x, long int __n) |
Scale x by \( 2^n \). More... | |
| __DEVICE__ double | scalbn (double __x, int __n) |
Scale x by \( 2^n \). More... | |
| __DEVICE__ __RETURN_TYPE | __signbit (double __x) |
Return the sign bit of x. More... | |
| __DEVICE__ double | sin (double __x) |
Returns the sine of x. More... | |
| __DEVICE__ void | sincos (double __x, double *__sinptr, double *__cosptr) |
Returns the sine and cosine of x. More... | |
| __DEVICE__ void | sincospi (double __x, double *__sinptr, double *__cosptr) |
| Returns the sine and cosine of \( \pi x\). More... | |
| __DEVICE__ double | sinh (double __x) |
Returns the hyperbolic sine of x. More... | |
| __DEVICE__ double | sinpi (double __x) |
| Returns the hyperbolic sine of \( \pi x\). More... | |
| __DEVICE__ double | sqrt (double __x) |
Returns the square root of x. More... | |
| __DEVICE__ double | tan (double __x) |
Returns the tangent of x. More... | |
| __DEVICE__ double | tanh (double __x) |
Returns the hyperbolic tangent of x. More... | |
| __DEVICE__ double | tgamma (double __x) |
Returns the gamma function of x. More... | |
| __DEVICE__ double | trunc (double __x) |
Truncate x to the integral part. More... | |
| __DEVICE__ double | y0 (double __x) |
Returns the value of the Bessel function of the second kind of order 0 for x. More... | |
| __DEVICE__ double | y1 (double __x) |
Returns the value of the Bessel function of the second kind of order 1 for x. More... | |
| __DEVICE__ double | yn (int __n, double __x) |
Returns the value of the Bessel function of the second kind of order n for x. More... | |
Detailed Description
Double Precision Floating-point Mathematical Functions
Function Documentation
◆ __finite()
| __DEVICE__ __RETURN_TYPE __finite | ( | double | __x | ) |
Determine whether x is finite.
◆ __isinf()
| __DEVICE__ __RETURN_TYPE __isinf | ( | double | __x | ) |
Determine whether x is infinite.
◆ __isnan()
| __DEVICE__ __RETURN_TYPE __isnan | ( | double | __x | ) |
Determine whether x is a NaN.
◆ __signbit()
| __DEVICE__ __RETURN_TYPE __signbit | ( | double | __x | ) |
Return the sign bit of x.
◆ acos()
| __DEVICE__ double acos | ( | double | __x | ) |
Returns the arc cosine of x.
◆ acosh()
| __DEVICE__ double acosh | ( | double | __x | ) |
Returns the nonnegative arc hyperbolic cosine of x.
◆ asin()
| __DEVICE__ double asin | ( | double | __x | ) |
Returns the arc sine of x.
◆ asinh()
| __DEVICE__ double asinh | ( | double | __x | ) |
Returns the arc hyperbolic sine of x.
◆ atan()
| __DEVICE__ double atan | ( | double | __x | ) |
Returns the arc tangent of x.
◆ atan2()
| __DEVICE__ double atan2 | ( | double | __x, |
| double | __y | ||
| ) |
Returns the arc tangent of the ratio of x and y.
◆ atanh()
| __DEVICE__ double atanh | ( | double | __x | ) |
Returns the arc hyperbolic tangent of x.
◆ cbrt()
| __DEVICE__ double cbrt | ( | double | __x | ) |
Returns the cube root of x.
◆ ceil()
| __DEVICE__ double ceil | ( | double | __x | ) |
Returns ceiling of x.
◆ copysign()
| __DEVICE__ double copysign | ( | double | __x, |
| double | __y | ||
| ) |
Create value with given magnitude, copying sign of second value.
◆ cos()
| __DEVICE__ double cos | ( | double | __x | ) |
Returns the cosine of x.
◆ cosh()
| __DEVICE__ double cosh | ( | double | __x | ) |
Returns the hyperbolic cosine of x.
◆ cospi()
| __DEVICE__ double cospi | ( | double | __x | ) |
Returns the cosine of \( x\pi\).
◆ cyl_bessel_i0()
| __DEVICE__ double cyl_bessel_i0 | ( | double | __x | ) |
Returns the value of the regular modified cylindrical Bessel function of order 0 for x.
◆ cyl_bessel_i1()
| __DEVICE__ double cyl_bessel_i1 | ( | double | __x | ) |
Returns the value of the regular modified cylindrical Bessel function of order 1 for x.
◆ erf()
| __DEVICE__ double erf | ( | double | __x | ) |
Returns the error function of x.
◆ erfc()
| __DEVICE__ double erfc | ( | double | __x | ) |
Returns the complementary error function of x.
◆ erfcinv()
| __DEVICE__ double erfcinv | ( | double | __x | ) |
Returns the inverse complementary function of x.
◆ erfcx()
| __DEVICE__ double erfcx | ( | double | __x | ) |
Returns the scaled complementary error function of x.
◆ erfinv()
| __DEVICE__ double erfinv | ( | double | __x | ) |
Returns the inverse error function of x.
◆ exp()
| __DEVICE__ double exp | ( | double | __x | ) |
Returns \( e^x \).
◆ exp10()
| __DEVICE__ double exp10 | ( | double | __x | ) |
Returns \( 10^x \).
◆ exp2()
| __DEVICE__ double exp2 | ( | double | __x | ) |
Returns \( 2^x \).
◆ expm1()
| __DEVICE__ double expm1 | ( | double | __x | ) |
Returns \( e^x -1\) for x.
◆ fabs()
| __DEVICE__ double fabs | ( | double | __x | ) |
Returns the absolute value of x.
◆ fdim()
| __DEVICE__ double fdim | ( | double | __x, |
| double | __y | ||
| ) |
Returns the positive difference between x and y.
◆ floor()
| __DEVICE__ double floor | ( | double | __x | ) |
Returns the largest integer less than or equal to x.
◆ fma()
| __DEVICE__ double fma | ( | double | __x, |
| double | __y, | ||
| double | __z | ||
| ) |
Returns \(x \cdot y + z\) as a single operation.
◆ fmax()
| __DEVICE__ double fmax | ( | double | __x, |
| double | __y | ||
| ) |
Determine the maximum numeric value of x and y.
◆ fmin()
| __DEVICE__ double fmin | ( | double | __x, |
| double | __y | ||
| ) |
Determine the minimum numeric value of x and y.
◆ fmod()
| __DEVICE__ double fmod | ( | double | __x, |
| double | __y | ||
| ) |
Returns the floating-point remainder of x / y.
◆ frexp()
| __DEVICE__ double frexp | ( | double | __x, |
| int * | __nptr | ||
| ) |
Extract mantissa and exponent of x.
◆ hypot()
| __DEVICE__ double hypot | ( | double | __x, |
| double | __y | ||
| ) |
Returns the square root of the sum of squares of x and y.
◆ ilogb()
| __DEVICE__ int ilogb | ( | double | __x | ) |
Returns the unbiased integer exponent of x.
◆ j0()
| __DEVICE__ double j0 | ( | double | __x | ) |
Returns the value of the Bessel function of the first kind of order 0 for x.
◆ j1()
| __DEVICE__ double j1 | ( | double | __x | ) |
Returns the value of the Bessel function of the first kind of order 1 for x.
◆ jn()
| __DEVICE__ double jn | ( | int | __n, |
| double | __x | ||
| ) |
Returns the value of the Bessel function of the first kind of order n for x.
◆ ldexp()
| __DEVICE__ double ldexp | ( | double | __x, |
| int | __e | ||
| ) |
Returns the value of \(x \cdot 2^{e}\) for x and e.
◆ lgamma()
| __DEVICE__ double lgamma | ( | double | __x | ) |
Returns the natural logarithm of the absolute value of the gamma function of x.
◆ llrint()
| __DEVICE__ long long int llrint | ( | double | __x | ) |
Round x to nearest integer value.
◆ llround()
| __DEVICE__ long long int llround | ( | double | __x | ) |
Round to nearest integer value.
◆ log()
| __DEVICE__ double log | ( | double | __x | ) |
Returns the natural logarithm of x.
◆ log10()
| __DEVICE__ double log10 | ( | double | __x | ) |
Returns the base 10 logarithm of x.
◆ log1p()
| __DEVICE__ double log1p | ( | double | __x | ) |
Returns the natural logarithm of x + 1.
◆ log2()
| __DEVICE__ double log2 | ( | double | __x | ) |
Returns the base 2 logarithm of x.
◆ logb()
| __DEVICE__ double logb | ( | double | __x | ) |
Returns the floating point representation of the exponent of x.
◆ lrint()
| __DEVICE__ long int lrint | ( | double | __x | ) |
Round x to nearest integer value.
◆ lround()
| __DEVICE__ long int lround | ( | double | __x | ) |
Round to nearest integer value.
◆ modf()
| __DEVICE__ double modf | ( | double | __x, |
| double * | __iptr | ||
| ) |
Break down x into fractional and integral parts.
◆ nan()
| __DEVICE__ double nan | ( | const char * | __tagp | ) |
Returns "Not a Number" value.
◆ nearbyint()
| __DEVICE__ double nearbyint | ( | double | __x | ) |
Round x to the nearest integer.
◆ nextafter()
| __DEVICE__ double nextafter | ( | double | __x, |
| double | __y | ||
| ) |
Returns next representable single-precision floating-point value after x.
◆ norm()
| __DEVICE__ double norm | ( | int | __dim, |
| const double * | __a | ||
| ) |
Returns the square root of the sum of squares of any number of coordinates.
◆ norm3d()
| __DEVICE__ double norm3d | ( | double | __x, |
| double | __y, | ||
| double | __z | ||
| ) |
Returns the square root of the sum of squares of x, y and z.
◆ norm4d()
| __DEVICE__ double norm4d | ( | double | __x, |
| double | __y, | ||
| double | __z, | ||
| double | __w | ||
| ) |
Returns the square root of the sum of squares of x, y, z and w.
◆ normcdf()
| __DEVICE__ double normcdf | ( | double | __x | ) |
Returns the standard normal cumulative distribution function.
◆ normcdfinv()
| __DEVICE__ double normcdfinv | ( | double | __x | ) |
Returns the inverse of the standard normal cumulative distribution function.
◆ pow()
| __DEVICE__ double pow | ( | double | __x, |
| double | __y | ||
| ) |
Returns \( x^y \).
◆ powi()
| __DEVICE__ double powi | ( | double | __x, |
| int | __y | ||
| ) |
Returns the value of first argument to the power of second argument.
◆ rcbrt()
| __DEVICE__ double rcbrt | ( | double | __x | ) |
Returns the reciprocal cube root function.
◆ remainder()
| __DEVICE__ double remainder | ( | double | __x, |
| double | __y | ||
| ) |
Returns double-precision floating-point remainder.
◆ remquo()
| __DEVICE__ double remquo | ( | double | __x, |
| double | __y, | ||
| int * | __quo | ||
| ) |
Returns double-precision floating-point remainder and part of quotient.
◆ rhypot()
| __DEVICE__ double rhypot | ( | double | __x, |
| double | __y | ||
| ) |
Returns one over the square root of the sum of squares of x and y.
◆ rint()
| __DEVICE__ double rint | ( | double | __x | ) |
Round x to nearest integer value in floating-point.
◆ rnorm()
| __DEVICE__ double rnorm | ( | int | __dim, |
| const double * | __a | ||
| ) |
Returns the reciprocal of square root of the sum of squares of any number of coordinates.
◆ rnorm3d()
| __DEVICE__ double rnorm3d | ( | double | __x, |
| double | __y, | ||
| double | __z | ||
| ) |
Returns one over the square root of the sum of squares of x, y and z.
◆ rnorm4d()
| __DEVICE__ double rnorm4d | ( | double | __x, |
| double | __y, | ||
| double | __z, | ||
| double | __w | ||
| ) |
Returns one over the square root of the sum of squares of x, y, z and w.
◆ round()
| __DEVICE__ double round | ( | double | __x | ) |
Round to nearest integer value in floating-point.
◆ rsqrt()
| __DEVICE__ double rsqrt | ( | double | __x | ) |
Returns the reciprocal of the square root of x.
◆ scalbln()
| __DEVICE__ double scalbln | ( | double | __x, |
| long int | __n | ||
| ) |
Scale x by \( 2^n \).
◆ scalbn()
| __DEVICE__ double scalbn | ( | double | __x, |
| int | __n | ||
| ) |
Scale x by \( 2^n \).
◆ sin()
| __DEVICE__ double sin | ( | double | __x | ) |
Returns the sine of x.
◆ sincos()
| __DEVICE__ void sincos | ( | double | __x, |
| double * | __sinptr, | ||
| double * | __cosptr | ||
| ) |
Returns the sine and cosine of x.
◆ sincospi()
| __DEVICE__ void sincospi | ( | double | __x, |
| double * | __sinptr, | ||
| double * | __cosptr | ||
| ) |
Returns the sine and cosine of \( \pi x\).
◆ sinh()
| __DEVICE__ double sinh | ( | double | __x | ) |
Returns the hyperbolic sine of x.
◆ sinpi()
| __DEVICE__ double sinpi | ( | double | __x | ) |
Returns the hyperbolic sine of \( \pi x\).
◆ sqrt()
| __DEVICE__ double sqrt | ( | double | __x | ) |
Returns the square root of x.
◆ tan()
| __DEVICE__ double tan | ( | double | __x | ) |
Returns the tangent of x.
◆ tanh()
| __DEVICE__ double tanh | ( | double | __x | ) |
Returns the hyperbolic tangent of x.
◆ tgamma()
| __DEVICE__ double tgamma | ( | double | __x | ) |
Returns the gamma function of x.
◆ trunc()
| __DEVICE__ double trunc | ( | double | __x | ) |
Truncate x to the integral part.
◆ y0()
| __DEVICE__ double y0 | ( | double | __x | ) |
Returns the value of the Bessel function of the second kind of order 0 for x.
◆ y1()
| __DEVICE__ double y1 | ( | double | __x | ) |
Returns the value of the Bessel function of the second kind of order 1 for x.
◆ yn()
| __DEVICE__ double yn | ( | int | __n, |
| double | __x | ||
| ) |
Returns the value of the Bessel function of the second kind of order n for x.