Functions and constants __ functions of the Math object in JavaScript

Source: Internet
Author: User
Tags natural logarithm square root

Functions and constants defined by the properties of the Math object:

Math.pow (2,53) 2 of the 53 power
Math.Round (. 6) 1.0: Rounding
Math.ceil (. 6) 1.0: Take the whole up
Math.floor (. 6) 0.0: Rounding Down
Math.Abs (-5) 5: To find absolute value
Math.max (X,y,z) Returns the maximum value
Math.min (X,y,z) Returns the minimum value
Math.random () Generate pseudo-random values for 0~1.0 (excluding 1.0)
Math.PI Pi: Pi
Math.e E: The base of the natural logarithm
MATH.SQRT (3) Square root of 3
MATH.PW (3,1/3) 3 of Cube root
Math.sin (0) Trigonometric functions: There are math.cos,math.atan and so on
Math.log (10) 10 of the natural logarithm
Math.log (MB)/math.ln10 10 is the logarithm of base 100
Math.log (/MATH.LN2) Logarithm with a base of 2 512
Math.exp (3) Three power of E

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.