Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {

    public static void main(String[] args) {

        double d1 = (90 * Math.PI) / 180, d2 = 0.0;
        double d3 = (1.0) / (0.0), d4 = -(1.0) / (0.0);

        System.out.println("hyperbolic tangent of d1 = " + StrictMath.tanh(d1));

        System.out.println("hyperbolic tangent of d2 = " + StrictMath.tanh(d2));

        System.out.println("hyperbolic tangent of d3 = " + StrictMath.tanh(d3));

        System.out.println("hyperbolic tangent of d4 = " + StrictMath.tanh(d4));
    }
}