Module 'math'
-
acos(number)Returns the arc cosine of
number. Throws TypeError ifnumberis not anIntorFloat
Example: acos(1) //0.0
-
asin(number)Returns the arc sine of
number. Throws TypeError ifnumberis not anIntorFloatExample:
asin(0) //0.0 -
atan(number)Returns the arc tangent of
number. Throws TypeError ifnumberis not anIntorFloatExample:
atan(0) //0.0 -
cbrt(number)Returns the cube root of
number. Throws TypeError ifnumberis not anIntorFloatExample:
cbrt(0) //0.0 -
ceil(number)Returns the ceiling of
number. Throws TypeError ifnumberis not anIntorFloatExample:
ceil(1.5) //2.0 -
cos(number)Returns the cosine of
number. Throws TypeError ifnumberis not anIntorFloatExample:
cos(0) //1.0 -
floor(number)Returns the floor of
number. Throws TypeError ifnumberis not anIntorFloatExample:
floor(1.5) //1.0 -
round(number)Returns the
numberrounded. Throws TypeError ifnumberis not anIntorFloatExample:
round(1.5) //2.0 -
sin(number)Returns the sine of
number. Throws TypeError ifnumberis not anIntorFloatExample:
sin(0) //0.0 -
sqrt(number)Returns the square root of
number. Throws TypeError ifnumberis not anIntorFloatExample:
sqrt(1.0) //1.0 -
tan(number)Returns the tangent of
number. Throws TypeError ifnumberis not anIntorFloatExample:
tan(0.0) //0.0 -
log(number)Returns the natural logarithm of
number. Throws TypeError ifnumberis not anIntorFloatExample:
log(1.0) //0.0 -
log2(number)Returns the base 2 logarithm of
number. Throws TypeError ifnumberis not anIntorFloatExample:
log2(1.0) //0.0 -
exp(number)Returns e raised to the power of
number. Throws TypeError ifnumberis not anIntorFloatExample:
exp(0.0) //1.0 -
pow(base,exponent)Returns
baseraised to the power ofexponent. TypeError ifbaseorexponentis not anIntorFloatExample:
pow(2,2) //4.0 -
abs(number)Returns the absolute value of
numberExample:
abs(-2) //2 -
Constants
NaNInfinityELN2LOG2ESQRT1_2LN10LOG10ESQRT2