16 math functions

1. Absolute value function
ABS(X)
2. Symbolic functions
sign(X) #return 1, -1, 0
3. Get random number function
rand() #return a random number within (1,-1)
rand(X) #returns a fixed random number within (1,-1)
4. Function to get integer
ceil(X) / ceiling(X) #ceil(X) / ceiling(X) gets the smallest integer not less than X,
floor(X) #floor(X)Get the largest integer not greater than X
即:ceil(int) / ceiling(int) = floor(int)
5. Rounding function
round(X) # round up
round(X,Y) #Y indicates the number of decimal places reserved, Y can be negative
truncate(X,Y)# truncation: After the number of digits is reserved, the following ones are deleted directly
6. Find the remainder function
mod(X,Y) #return the remainder of X/Y
7. Exponentiation function
pow(X,Y)/power(X,Y) #返回X^Y
EXP(X) #return e^X, e= 2.718281828459045
SQRT(X) #return the square root of X
8. Angle and radian interchange function
radians(X) #Angle is converted to radians
degrees(X) # radians are converted to degrees
9. Pi function
PI() #return the value of pi
10. Trigonometric functions
sin(X)
asin(X) #equivalent to arcsin()
cos(X)
acos(X) #equivalent to arccos()
tan(X)
atan(X) #equivalent to arctan()
cot(X)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324852548&siteId=291194637