Package com.imsl.math

Class Hyperbolic

java.lang.Object
com.imsl.math.Hyperbolic

public class Hyperbolic extends Object
Pure Java implementation of the hyperbolic functions and their inverses.

This Java code is based on C code in the package fdlibm, which can be obtained from www.netlib.org. The original fdlibm C code contains the following notice.

Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.

Developed at SunSoft, a Sun Microsystems, Inc. business. Permission to use, copy, modify, and distribute this software is freely granted, provided that this notice is preserved.

Author:
Sun Microsystems (original C code in fdlibm), John F. Brophy (translated from C to Java)
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    acosh(double x)
    Returns the inverse hyperbolic cosine of its argument.
    static double
    asinh(double x)
    Returns the inverse hyperbolic sine of its argument.
    static double
    atanh(double x)
    Returns the inverse hyperbolic tangent of its argument.
    static double
    cosh(double x)
    Returns the hyperbolic cosine of its argument.
    static double
    expm1(double x)
    Returns exp(x)-1, the exponential of x minus 1.
    static double
    log1p(double x)
    Returns log(1+x), the logarithm of (x plus 1).
    static double
    sinh(double x)
    Returns the hyperbolic sine of its argument.
    static double
    tanh(double x)
    Returns the hyperbolic tangent of its argument.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • expm1

      public static double expm1(double x)
      Returns exp(x)-1, the exponential of x minus 1. Specifically,
      \({\rm expm1}(\pm 0)\) returns \(\pm 0\)
      \({\rm expm1}(+\infty)\) returns \(\pm \infty\)
      \({\rm expm1}(-\infty)\) returns -1.
      Parameters:
      x - a double specifying the argument.
      Returns:
      a double value representing exp(x)-1.
    • log1p

      public static double log1p(double x)
      Returns log(1+x), the logarithm of (x plus 1). Specifically,
      \({\rm log1p}(\pm 0)\) returns \(\pm 0\)
      \({\rm log1p}(-1)\) returns \(-\infty\)
      \({\rm log1p}(x)\) returns NaN, if \(x \lt -1\).
      \({\rm log1p}(\pm \infty)\) returns \(\pm \infty\)
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing log(1+x).
    • sinh

      public static double sinh(double x)
      Returns the hyperbolic sine of its argument. Specifically,
      \({\rm sinh}(\pm 0)\) returns \(\pm 0\)
      \({\rm sinh}(\pm \infty)\) returns \(\pm \infty\)
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the hyperbolic sine of x.
    • cosh

      public static double cosh(double x)
      Returns the hyperbolic cosine of its argument. Specifically,
      \({\rm cosh}(\pm 0)\) returns 1.
      \({\rm cosh}(\pm \infty)\) returns \(+\infty\)
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the hyperbolic cosine of x.
    • tanh

      public static double tanh(double x)
      Returns the hyperbolic tangent of its argument. Specifically,
      \({\rm tanh}(\pm 0)\) returns \(\pm 0\)
      \({\rm tanh}(\pm \infty)\) returns \(\pm 1\).
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the hyperbolic tangent of x.
    • asinh

      public static double asinh(double x)
      Returns the inverse hyperbolic sine of its argument. Specifically,
      \({\rm asinh}(\pm 0)\) returns \(\pm \infty\)
      \({\rm asinh}(\pm \infty)\) returns \(\pm \infty\)
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the number whose hyperbolic sine is x.
    • acosh

      public static double acosh(double x)
      Returns the inverse hyperbolic cosine of its argument. Specifically,
      acosh(1) returns +0
      \({\rm acosh}(\pm \infty)\) returns \(+\infty\)
      \({\rm acosh}(x)\) returns NaN, if \(|x| \lt 1\).
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the number whose hyperbolic cosine is x.
    • atanh

      public static double atanh(double x)
      Returns the inverse hyperbolic tangent of its argument. Specifically,
      \({\rm atanh}(\pm 0)\) returns \(\pm 0\)
      \({\rm atanh}(\pm 1)\) returns \(+\infty\)
      atanh(x) returns NaN, if \(|x| \gt 1\).
      Parameters:
      x - a double value representing the argument.
      Returns:
      a double value representing the number whose hyperbolic tangent is x.