Example: bachelor of science

CUDA Math API - Universidad de Sonora

cuda math | July 2013 API Reference math | iiTABLE OF CONTENTSC hapter 1. Mathematical Single Precision Mathematical math | Double Precision Mathematical math | math | Single Precision math | Double Precision math | Integer Type Casting math | math | math | math | 1 Chapter is a list of all modules: Mathematical Functions Single Precision Mathematical Functions Double Precision Mathematical Functions Single Precision Intrinsics Double Precision Intrinsics Integer Intrinsics Type Casting Mathematical FunctionsCUDA mathematical functions are always available in device code.

www.nvidia.com CUDA Math API v5.5 | ii TABLE OF CONTENTS Chapter 1. Modules.....1

Tags:

  Math, Cuda math api, Cuda

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of CUDA Math API - Universidad de Sonora

1 cuda math | July 2013 API Reference math | iiTABLE OF CONTENTSC hapter 1. Mathematical Single Precision Mathematical math | Double Precision Mathematical math | math | Single Precision math | Double Precision math | Integer Type Casting math | math | math | math | 1 Chapter is a list of all modules: Mathematical Functions Single Precision Mathematical Functions Double Precision Mathematical Functions Single Precision Intrinsics Double Precision Intrinsics Integer Intrinsics Type Casting Mathematical FunctionsCUDA mathematical functions are always available in device code.

2 Some functions arealso available in host code as that floating-point functions are overloaded for different argument types. Forexample, the log() function has the following prototypes: double log(double x); float log(float x); float logf(float x); Single Precision Mathematical FunctionsThis section describes single precision mathematical math | 2__device__ float acosf (float x)Calculate the arc cosine of the input will be in radians, in the interval [0, ] for x inside [-1, +1]. acosf(1) returns +0. acosf(x) returns NaN for x outside [-1, +1].DescriptionCalculate the principal value of the arc cosine of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float acoshf (float x)Calculate the nonnegative arc hyperbolic cosine of the input will be in the interval [0, ].

3 Acoshf(1) returns 0. acoshf(x) returns NaN for x in the interval [ , 1).DescriptionCalculate the nonnegative arc hyperbolic cosine of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float asinf (float x)Calculate the arc sine of the input will be in radians, in the interval [- , + ] for x inside [-1, +1]. asinf(0) returns +0. asinf(x) returns NaN for x outside [-1, +1]. math | 3 DescriptionCalculate the principal value of the arc sine of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float asinhf (float x)Calculate the arc hyperbolic sine of the input asinhf(0) returns the arc hyperbolic sine of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float atan2f (float x, float y)Calculate the arc tangent of the ratio of first and second input will be in radians, in the interval [- , + ].]

4 Atan2f(0, 1) returns + the principal value of the arc tangent of the ratio of first and second inputarguments x / y. The quadrant of the result is determined by the signs of inputs x and accuracy information for this function see the cuda C Programming Guide,Appendix C, Table math | 4__device__ float atanf (float x)Calculate the arc tangent of the input will be in radians, in the interval [- , + ]. atanf(0) returns + the principal value of the arc tangent of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float atanhf (float x)Calculate the arc hyperbolic tangent of the input atanhf( ) returns . atanhf( ) returns . atanhf(x) returns NaN for x outside interval [-1, 1].

5 DescriptionCalculate the arc hyperbolic tangent of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float cbrtf (float x)Calculate the cube root of the input . cbrtf( ) returns . cbrtf( ) returns . math | 5 DescriptionCalculate the cube root of x, .For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float ceilf (float x)Calculate ceiling of the input expressed as a floating-point number. ceilf( ) returns . ceilf( ) returns .DescriptionCompute the smallest integer value not less than float copysignf (float x, float y)Create value with given magnitude, copying sign of second a value with the magnitude of x and the sign of a floating-point value with the magnitude x and the sign of float cosf (float x)Calculate the cosine of the input cosf(0) returns 1.

6 Cosf( ) returns the cosine of the input argument x (measured in radians). math | 6 For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table C-1. This function is affected by the --use_fast_math compiler flag. See theCUDA C Programming Guide, Appendix C, Table C-3 for a complete list offunctions float coshf (float x)Calculate the hyperbolic cosine of the input coshf(0) returns 1. coshf( ) returns the hyperbolic cosine of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float cospif (float x)Calculate the cosine of the input argument .Returns cospif( ) returns 1. cospif( ) returns the cosine of x (measured in radians), where x is the input accuracy information for this function see the cuda C Programming Guide,Appendix C, Table math | 7__device__ float erfcf (float x)Calculate the complementary error function of the input erfcf( ) returns 2.

7 Erfcf( ) returns + the complementary error function of the input argument x, 1 - erf(x).For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float erfcinvf (float y)Calculate the inverse complementary error function of the input erfcinvf(0) returns . erfcinvf(2) returns .DescriptionCalculate the inverse complementary error function of the input argument y, for y in theinterval [0, 2]. The inverse complementary error function find the value x that satisfiesthe equation y = erfc(x), for , and .For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float erfcxf (float x)Calculate the scaled complementary error function of the input erfcxf( ) returns erfcxf( ) returns +0 erfcxf(x) returns if the correctly calculated value is outside the single floatingpoint math | 8 DescriptionCalculate the scaled complementary error function of the input argument x.

8 For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float erff (float x)Calculate the error function of the input erff( ) returns . erff( ) returns .DescriptionCalculate the value of the error function for the input argument x, .For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float erfinvf (float y)Calculate the inverse error function of the input erfinvf(1) returns . erfinvf(-1) returns .DescriptionCalculate the inverse error function of the input argument y, for y in the interval [-1,1]. The inverse error function finds the value x that satisfies the equation y = erf(x), for , and .For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table math | 9__device__ float exp10f (float x)Calculate the base 10 exponential of the input.

9 DescriptionCalculate the base 10 exponential of the input argument x. For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table C-1. This function is affected by the --use_fast_math compiler flag. See theCUDA C Programming Guide, Appendix C, Table C-3 for a complete list offunctions float exp2f (float x)Calculate the base 2 exponential of the input .DescriptionCalculate the base 2 exponential of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float expf (float x)Calculate the base exponential of the input .DescriptionCalculate the base exponential of the input argument x, . math | 10 For accuracy information for this function see the cuda C Programming Guide,Appendix C, Table C-1.

10 This function is affected by the --use_fast_math compiler flag. See theCUDA C Programming Guide, Appendix C, Table C-3 for a complete list offunctions float expm1f (float x)Calculate the base exponential of the input argument, minus .DescriptionCalculate the base exponential of the input argument x, minus accuracy information for this function see the cuda C Programming Guide,Appendix C, Table float fabsf (float x)Calculate the absolute value of its the absolute value of its argument. fabs( ) returns . fabs( ) returns the absolute value of the input argument accuracy information for this function see the cuda C Programming Guide,Appendix C, Table math | 11__device__ float fdimf (float x, float y)Compute the positive difference between x and the positive difference between x and y.


Related search queries