Class Sfun

java.lang.Object
edu.sc.seis.TauP.Sfun

public class Sfun
extends java.lang.Object
Collection of special functions.
  • Field Summary

    Fields
    Modifier and Type Field Description
    static double EPSILON_LARGE
    The largest relative spacing for doubles.
    static double EPSILON_SMALL
    The smallest relative spacing for doubles.
  • Method Summary

    Modifier and Type Method Description
    static double acosh​(double x)
    Returns the inverse (arc) hyperbolic cosine of a double.
    static double asinh​(double x)
    Returns the inverse (arc) hyperbolic sine of a double.
    static double atanh​(double x)
    Returns the inverse (arc) hyperbolic tangent of a double.
    static double cosh​(double x)
    Returns the hyperbolic cosine of a double.
    static double cot​(double x)
    Returns the cotangent of a double.
    static double erf​(double x)
    Returns the error function of a double.
    static double erfc​(double x)
    Returns the complementary error function of a double.
    static double fact​(int n)
    Returns the factorial of an integer.
    static double gamma​(double x)
    Returns the Gamma function of a double.
    static double log10​(double x)
    Returns the common (base 10) logarithm of a double.
    static double logBeta​(double a, double b)
    Returns the logarithm of the Beta function.
    static double logGamma​(double x)
    Returns the logarithm of the Gamma function of a double.
    static double sinh​(double x)
    Returns the inverse (arc) hyperbolic sine of a double.
    static double tanh​(double x)
    Returns the hyperbolic tangent of a double.

    Methods inherited from class java.lang.Object

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

    • EPSILON_SMALL

      public static final double EPSILON_SMALL
      The smallest relative spacing for doubles.
      See Also:
      Constant Field Values
    • EPSILON_LARGE

      public static final double EPSILON_LARGE
      The largest relative spacing for doubles.
      See Also:
      Constant Field Values
  • Method Details

    • cot

      public static double cot​(double x)
      Returns the cotangent of a double.
      Parameters:
      x - A double value.
      Returns:
      The cotangent of x. If x is NaN, the result is NaN.
    • log10

      public static double log10​(double x)
      Returns the common (base 10) logarithm of a double.
      Parameters:
      x - A double value.
      Returns:
      The common logarithm of x.
    • sinh

      public static double sinh​(double x)
      Returns the inverse (arc) hyperbolic sine of a double.
      Parameters:
      x - A double value.
      Returns:
      The arc hyperbolic sine of x. If x is NaN or less than one, the result is NaN.
    • cosh

      public static double cosh​(double x)
      Returns the hyperbolic cosine of a double.
      Parameters:
      x - A double value.
      Returns:
      The hyperbolic cosine of x. If x is NaN, the result is NaN.
    • tanh

      public static double tanh​(double x)
      Returns the hyperbolic tangent of a double.
      Parameters:
      x - A double value.
      Returns:
      The hyperbolic tangent of x.
    • asinh

      public static double asinh​(double x)
      Returns the inverse (arc) hyperbolic sine of a double.
      Parameters:
      x - A double value.
      Returns:
      The arc hyperbolic sine of x. If x is NaN, the result is NaN.
    • acosh

      public static double acosh​(double x)
      Returns the inverse (arc) hyperbolic cosine of a double.
      Parameters:
      x - A double value.
      Returns:
      The arc hyperbolic cosine of x. If x is NaN or less than one, the result is NaN.
    • atanh

      public static double atanh​(double x)
      Returns the inverse (arc) hyperbolic tangent of a double.
      Parameters:
      x - A double value.
      Returns:
      The arc hyperbolic tangent of x. If x is NaN or |x|>1, the result is NaN.
    • fact

      public static double fact​(int n)
      Returns the factorial of an integer.
      Parameters:
      n - An integer value.
      Returns:
      The factorial of n, n!. If x is negative, the result is NaN.
    • gamma

      public static double gamma​(double x)
      Returns the Gamma function of a double.
      Parameters:
      x - A double value.
      Returns:
      The Gamma function of x. If x is a negative integer, the result is NaN.
    • logGamma

      public static double logGamma​(double x)
      Returns the logarithm of the Gamma function of a double.
      Parameters:
      x - A double value.
      Returns:
      The natural logarithm of the Gamma function of x. If x is a negative integer, the result is NaN.
    • logBeta

      public static double logBeta​(double a, double b)
      Returns the logarithm of the Beta function.
      Parameters:
      a - A double value.
      b - A double value.
      Returns:
      The natural logarithm of the Beta function.
    • erf

      public static double erf​(double x)
      Returns the error function of a double.
      Parameters:
      x - A double value.
      Returns:
      The error function of x.
    • erfc

      public static double erfc​(double x)
      Returns the complementary error function of a double.
      Parameters:
      x - A double value.
      Returns:
      The complementary error function of x.