0% found this document useful (0 votes)
38 views2 pages

Math Properties: The Following Table Lists The Standard Properties of The Math Object

The document describes the standard properties and methods of the Math object in JavaScript. The Math object contains constants like PI and mathematical functions but is not an object that can be instantiated. It includes common trigonometric, logarithmic, and other mathematical functions like sin(), cos(), sqrt(), etc. The functions accept numbers, perform calculations on them and return results without side effects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views2 pages

Math Properties: The Following Table Lists The Standard Properties of The Math Object

The document describes the standard properties and methods of the Math object in JavaScript. The Math object contains constants like PI and mathematical functions but is not an object that can be instantiated. It includes common trigonometric, logarithmic, and other mathematical functions like sin(), cos(), sqrt(), etc. The functions accept numbers, perform calculations on them and return results without side effects.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Math Properties

The following table lists the standard properties of the Math object.

Property Description
E Returns Euler's number, the base of natural logarithms, e, approximately 2.718
LN2 Returns the natural logarithm of 2, approximately 0.693
LN10 Returns the natural logarithm of 10, approximately 2.302
LOG2E Returns the base 2 logarithm of e, approximately 1.442
LOG10E Returns the base 10 logarithm of e, approximately 0.434
PI Returns the ratio of the circumference of a circle to its diameter (i.e. π). The approximate value of PI
is 3.14159
SQRT1_2 Returns the square root of 1/2, approximately 0.707
SQRT2 Returns the square root of 2, approximately 1.414
Note: The Math object is just a collection of static functions and constants. The
Math object is different from other built-in objects (e.g. Date, Array, String, etc.),
because it has no constructor, so there is no way to create an instance of Math.

Math Methods
The following table lists the standard methods of the Math object.

Method Description

abs() Returns the absolute value of a number.

acos() Returns the arccosine of a number, in radians.


acosh() Returns the hyperbolic arccosine of a number.
asin() Returns the arcsine of a number, in radians
asinh() Returns the hyperbolic arcsine of a number.
atan() Returns the arctangent of a number, in radians.
atan2(y, x) Returns the arctangent of the quotient of its arguments.
atanh() Returns the hyperbolic arctangent of a number.
cbrt() Returns the cube root of a number.
ceil() Returns the next integer greater than or equal to a given number (rounding up).
cos() Returns the cosine of the specified angle. The angle must be specified in radians.
cosh() Returns the hyperbolic cosine of a number.
exp(x) Returns ex, where x is the argument, and e is Euler's number (also known as Napier's constant), the
base of the natural logarithms.

floor() Returns the next integer less than or equal to a given number (rounding down).

log() Returns the natural logarithm (base e) of a number.

max(x, Returns the highest-valued number in a list of numbers.


y, ...)

min(x, Returns the lowest-valued number in a list of numbers.


y, ...)

pow(x, y) Returns the base to the exponent power, that is, xy.

random() Returns a random number between 0 and 1 (including 0, but not 1).

round() Returns the value of a number rounded to the nearest integer.

sin() Returns the sign of a number (given in radians).


sinh() Returns the hyperbolic sine of a number.

sqrt() Returns the square root of a number.

tan() Returns the tangent of a number.


tanh() Returns the hyperbolic tangent of a number.

trunc(x) Returns the integer part of a number by removing any fractional digits.

You might also like