package com.ydlclass.math;

public class MathTest {
    public static void main(String[] args) {
        double ceil = Math.ceil(11.9);
        double sin = Math.sin(Math.PI / 6);//浮点数存在精度丢失
        double sin1 = Math.sin(Math.toRadians(30));//这些问题都很常见
        double exp = Math.exp(2);
        double v = Math.log10(10);
        double sqrt = Math.sqrt(4);

        double pow = Math.pow(2, 1);
        System.out.println(pow);

        double floor = Math.floor(2.33);
        System.out.println("floor = " + floor);
        System.out.println("Math.ceil(2.33) = " + Math.ceil(2.33));

        long round = Math.round(2.33);
        System.out.println("round = " + round);
        System.out.println("Math.random() = " + Math.random());
        


        System.out.println(sqrt);
        System.out.println(v);
        System.out.println(exp);

        System.out.println(sin1);
        System.out.println(sin);
        System.out.println(ceil);

    }
}