Mathematical Functions (C / C ++)

C header file contains <math.h>

C ++ header file contains <cmath>

function

 

double cos(double)

This function returns the cosine of the angle in radians (double type)

double tan(double)

This function returns the tangent of the angle in radians (double type)

double sin(double)

This function returns the sine of the angle in radians (double type)

double log(double)

This function returns the natural logarithm

double pow(double x,double y)

This function returns x to the power y

double hypot(double)

This function returns the square root of the sum of squares of two arguments; that is, two parameters as a right triangle at right angles to the edge, the function returns the length of the hypotenuse.

double sqrt(double)

This function returns the square root of

int abs(int)

This function returns the absolute value of the integer

double fabs(double)

This function returns the absolute value of any of a float

double floor(double)

This function returns a value less than or equal to the largest integer arguments passed

Guess you like

Origin www.cnblogs.com/wanghao-boke/p/11304998.html