Java math API-based detailed explanation

Source: Internet
Author: User
Tags natural logarithm

The circumference rate of the Math. PI record
Math. E records the constant of e.
Math has some similar constants, which are commonly used in Engineering Mathematics.
Math. abs evaluate absolute value
Math. sin sine function Math. asin arcsin Function
Math. cos cosine function Math. acos arccosine Function
Math. tan tangent function Math. atan arctangent function Math. atan2
Math. toDegrees radians to degrees Math. toRadians to radians
Math. ceil returns the maximum integer not less than a certain number.
Math. floor returns the maximum integer not greater than a certain number.
Math. IEEEremainder evaluate the remainder
Math. max: calculate the maximum of two numbers.
Math. min: Calculate the minimum of two numbers.
Math. sqrt
Math. pow calculates the arbitrary power of a number and throws an ArithmeticException to handle an overflow exception.
Math. exp: Evaluate the arbitrary power of e
Math. log10 base-10 logarithm
Math. log natural logarithm
Math. rint: Calculate the integer closest to a certain number (which may be larger or smaller than a certain number)
Math. round is the same as above. int or long type is returned (double type is returned for the previous function)
Math. random returns a random number between 0 and 1.

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.