Java tan tanh(double x)

Here you can find the source of tanh(double x)

Description

tanh

License

Open Source License

Declaration

public static double tanh(double x) 

Method Source Code

//package com.java2s;

public class Main {
    public static double tanh(double x) {
        return sinh(x) / cosh(x);
    }//from  w  ww.  j av a  2 s. c o  m

    public static double sinh(double x) {
        return 0.5 * (Math.exp(x) - Math.exp(-x));
    }

    public static double cosh(double x) {
        return 0.5 * (Math.exp(x) + Math.exp(-x));
    }
}

Related

  1. tan(Short a)
  2. tanD(double arg)
  3. tand(double x)
  4. tanf(float f)
  5. tanh(double x)