TrigonometricFunctionUtils { public static double atanh(final double x) { return 0.5 * Math.log((1 + x) / (1 - x)); }  static double acos(final double x); static ComplexNumber acos(final ComplexNumber z); static double acosh(final double x); static ComplexNumber acosh(final ComplexNumber z); static double asin(final double x); static ComplexNumber asin(final ComplexNumber z); static double asinh(final double x); static ComplexNumber asinh(final ComplexNumber z); static double atan(final double x); static ComplexNumber atan(final ComplexNumber z); static double atanh(final double x); static ComplexNumber atanh(final ComplexNumber z); static double cos(final double x); static ComplexNumber cos(final ComplexNumber z); static double cosh(final double x); static ComplexNumber cosh(final ComplexNumber z); static double sin(final double x); static ComplexNumber sin(final ComplexNumber z); static double sinh(final double x); static ComplexNumber sinh(final ComplexNumber z); static double tan(final double x); static ComplexNumber tan(final ComplexNumber z); static double tanh(final double x); static ComplexNumber tanh(final ComplexNumber z);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void testNull6() { TrigonometricFunctionUtils.atanh(null); }
@Test public void testAtanh() { double x = 0.76; ComplexNumber z = new ComplexNumber(x); double real = 0.5*Math.log((1+x)/(1-x)); ComplexNumber res = TrigonometricFunctionUtils.atanh(z); assertEquals(real,res.getReal(),1e-15); assertEquals(0.0,res.getImaginary(),0); }