Math some methods

Source: Internet
Author: User

1, carry rounding up. Math.ceiling

For example: math.ceiling (32.2) = 33; Math.ceiling (32.0) = 32;

2. Take down the rounding position. Math.floor

For example: Math.floor (32.6) = 32;

3. Take the decimal of the specified number of digits. Math.Round

For example: Math.Round (36.236,2) = 36.24; Math.Round (36.232,2) = 36.23;

4, take the logarithm of the specified number when using the specified bottom. Math.Log

For example: A book 16 opened, calculated several times off. Math.Log (16,2) = 4;

The name Description E represents the base of the natural logarithm, which is specified by the constant e. PI represents the ratio of the circumference of a circle to its diameter, which is specified by the constant π.
    abs   is overloaded. Returns the absolute value of the specified number.        acos   Returns the angle of the specified number for the cosine value.        asin   Returns the angle of the specified number for the sine value.        atan   Returns the angle of the specified number for the tangent value.        atan2   Returns the angle of the quotient with a tangent value of two specified numbers.       BigMul   generates a complete product of two 32-bit numbers.        ceiling   is overloaded. Returns the smallest integer greater than or equal to the specified number.        cos   Returns the cosine value of the specified angle.        cosh   Returns the hyperbolic cosine of the specified angle.       DivRem   is overloaded. Calculates the quotient of two digits and returns the remainder in the output parameter.       Equals    is overloaded. Determines whether two instances of Object are equal. (Inherit from Object.) )     exp   Returns the specified power of E.        floor   is overloaded. Returns the largest integer less than or equal to the specified number.       GetHashCode    serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures such as hash tables. (Inherit from Object.) )    gettype    gets the Type of the current instance. (Inherit from Object.) )     ieeeremainder   Returns the remainder of a specified number that is divided by another specified number.        log   is overloaded. Returns the logarithm of the specified number.        log10   Returns the logarithm of the specified number with a base of 10.        max   is overloaded. Returns the larger of two specified numbers.        min   is overloaded. Returns the smaller of the two digits.        pow   Returns the specified number of times to the specified power.        referenceequals    Determines whether the specified Object instance is the same instance. (Inherit from Object.) )     round   is overloaded. Rounds a value to the nearest integer or to a specified number of decimal digits.        sign   is overloaded. Returns a value that represents a number sign.        sin   Returns the sinusoidal value of the specified angle.        sinh   Returns the hyperbolic sine value of the specified angle.        sqrt   Returns the square root of the specified number.        tan   Returns the tangent of the specified angle.        tanh   Returns the hyperbolic tangent value of the specified angle.       ToString    BackA String that represents the current Object. (Inherit from Object.) )    Truncate   is overloaded. Computes the integer portion of a number.

Some methods of math

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.