15.4.13 Math command
15.4.13.1 Sin — Sine
Explanation |
sin() is used to calculate the sine of parameter x and return the result. |
Definition |
double sin(double x) x in radians; Return value: Return the calculated result between -1 and 1. |
15.4.13.2 Cos — Cosine
Explanation |
cos() is used to calculate the cosine of parameter x and return the result. |
Definition |
double cos(double x) x in radians; Return value: Return the calculated result between -1 and 1. |
15.4.13.3 Tan — Tangent
Explanation |
tan() is used to calculate the tangent of parameter x and return the result. |
Definition |
double tan(double x) x in radians; Return value: Return the tangent of parameter x. |
15.4.13.4 Cot — Cotangent
Explanation |
cot() is used to calculate the cotangent of parameter x and return the result. |
Definition |
double cot(double x) x in radians; Return value: Return the cotangent of the parameter x. |
15.4.13.5 Asin — Arc sine
Explanation |
asin() is used to calculate the arcsine of parameter x and return the result. |
Definition |
double asin(double x) Parameter x ranges from -1 to 1, beyond which error will be reported. Return value: Return the calculated result between -PI/2 and PI/2, in radians. |
15.4.13.6 Acos — Arc cosine
Explanation |
acos() is used to calculate the arccosine of parameter x and return the result. |
Definition |
double acos(double x) Parameter x ranges from -1 to 1, beyond which error will be reported; Return value: Return the calculated result between 0 and PI, in radians. |
15.4.13.7 Atan — Arc tangent
Explanation |
atan() is used to calculate the arctangent value of parameter x and return the result. |
Definition |
double atan(double x) Return value: Return the calculated result between -PI/2 and PI/2. |
15.4.13.8 Sinh — Hyperbolic sine
Explanation |
tanh() is used to calculate the hyperbolic tangent of parameter x and return the result. |
Definition |
double sinh(double x) The mathematical definition is: (exp(x) - exp(-x))/2; Return value: Return the hyperbolic sine of parameter x. |
15.4.13.9 Cosh — Hyperbolic cosine
Explanation |
cosh() is used to calculate the hyperbolic cosine of parameter x and return the result. |
Definition |
double cosh(double x) The mathematical definition is: (exp(x)+exp(x))/2; Return value: Return the hyperbolic cosine of the parameter x. |
15.4.13.10 Tanh — Hyperbolic tangent
Explanation |
tanh() is used to calculate the hyperbolic tangent of parameter x and return the result. |
Definition |
double tanh(double x) The mathematical definition is: sinh(x)/cosh(x); Return value: Return the hyperbolic tangent of parameter x. |
15.4.13.11 Exp — Exponential
Explanation |
exp() is used to calculate e to the x power, which is the e^x value, and return the result; |
Definition |
double exp(double x) Return value: Return the result of e to the x power. |
15.4.13.12 Ln — Natural logarithm
Explanation |
ln() is used to calculate the logarithm value of x at the base of e and return the result. |
Definition |
double ln(double x) Function description: Find the natural logarithm of x, ln(x), x > 0; Return value: Return the natural logarithm value of parameter x. |
15.4.13.13 log10 — Common logarithm
Explanation |
log10() is used to calculate the logarithm value of x at the base of 10, and return the result. |
Definition |
double log10(double x) Where x>0; Return value: Return the natural logarithm value of parameter x at the base of 10. |
15.4.13.14 pow — Power
Explanation |
pow() is used to calculate x to the y power, which is the xy value, and return the result; |
Definition |
double pow(double x, double y) Return value: Return the result of x to the y power. |
15.4.13.15 sqrt — Square root
Explanation |
sqrt() is used to calculate the square root of parameter x and return the result. |
Definition |
double sqrt(double x) The parameter x must be positive; Return value: Return the square root of parameter x. |
15.4.13.16 ceil — Ceiling
Explanation |
ceil() will return the minimum integer value no less than parameter x, and the result will be returned in the double type. |
Definition |
double ceil(double x) Return value: Return a minimum integer value not less than the parameter x. |
15.4.13.17 floor — Floor
Explanation |
floor() will return the maximum integer value not greater than the parameter x, and the result will be returned in the double type. |
Definition |
double floor(double x) Return value: Return the maximum integer value not greater than the parameter x. |