式_格_字_数

        System.out.println("90度正弦值:" + Math.sin(Math.PI / 2));
        System.out.println("0度余弦值:" + Math.cos(0));
        System.out.println("60度正切值:" + Math.tan(Math.PI / 3));
        System.out.println("2的平方根与2商的正弦值:" + Math.asin(Math.sqrt(2) / 2));
        System.out.println("2的平方根与2商的反余弦值:" + Math.acos(Math.sqrt(2) / 2));
        System.out.println("1的反正切值:" + Math.atan(1));
        System.out.println("120度的弧度值:" + Math.toRadians(120.0));
        System.out.println("90度正弦值:" + Math.sin(Math.PI / 2));
       
        System.out.println("e的平方值:" + Math.exp(2));
        System.out.println("以e为底的对数值:" + Math.log(2));
        System.out.println("以10为底的对数值:" + Math.log10(2));
        System.out.println("4的平方根值:" + Math.sqrt(4));
        System.out.println("8的立方根值:" + Math.cbrt(8));
        System.out.println("2的2次方值:" + Math.pow(2, 2));
       
        System.out.println("取整数:" + Math.ceil(1.2));
        System.out.println("取整数:" + Math.floor(2.5));
        System.out.println("取整数:" + Math.rint(2.5));
        System.out.println("取整数:" + Math.rint(2.7));
        System.out.println("取整数:" + Math.round(3.4f));
        System.out.println("取整数:" + Math.rint(2.5));
       
        System.out.println("取大:" + Math.max(2, 7));
        System.out.println("取小:" + Math.min(2.1, 2));
        System.out.println("-7的绝对值:" + Math.abs(-7));

你可能感兴趣的:(式_格_字_数)