Java cosh(ハイパーボリックコサイン)値を取得するサンプル

環境
Windows11 pro 64bit
java 19.0.1

構文
Math.cosh(ラジアン値)
cosh(ハイパーボリックコサイン)値を取得するには、「Math.cosh」関数を使います。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
public class Main {
public static void main(String[] args) throws Exception {
System.out.println(Math.cosh(Math.toRadians(45)));
System.out.println(Math.cosh(Math.toRadians(-45)));
}
}
public class Main { public static void main(String[] args) throws Exception { System.out.println(Math.cosh(Math.toRadians(45))); System.out.println(Math.cosh(Math.toRadians(-45))); } }
public class Main {
    public static void main(String[] args) throws Exception {

        System.out.println(Math.cosh(Math.toRadians(45)));  
        System.out.println(Math.cosh(Math.toRadians(-45))); 

    }
}

実行結果
1.3246090892520057
1.3246090892520057

IT

Posted by arkgame