java tanh(ハイパーボリックタンジェント)値を取得する
javaで、tanh(ハイパーボリックタンジェント)値を取得する手順を記述してます。「Math.tanh」にラジアン値を指定することで可能です。
環境
- OS windows11 home
- java 19.0.1
手順
tanh(ハイパーボリックタンジェント)値を取得するには、「Math.tanh」で可能です。
Math.tanh(ラジアン値)
実際に、使用してみます。
public class App {
public static void main(String[] args) throws Exception {
System.out.println(Math.tanh(Math.toRadians(45))); // 0.6557942026326724
System.out.println(Math.tanh(Math.toRadians(-45))); // -0.6557942026326724
}
}
取得されていることが確認できます。
-
前の記事
PostgreSQL 少数末尾にある0を削除する 2023.01.19
-
次の記事
python selenium使用時にselectboxのoptionの数を取得する 2023.01.19
コメントを書く