Package edu.sc.seis.TauP
Class Sfun
java.lang.Object
edu.sc.seis.TauP.Sfun
Collection of special functions.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleThe largest relative spacing for doubles.static final doubleThe smallest relative spacing for doubles. -
Method Summary
Modifier and TypeMethodDescriptionstatic doubleacosh(double x) Returns the inverse (arc) hyperbolic cosine of a double.static doubleasinh(double x) Returns the inverse (arc) hyperbolic sine of a double.static doubleatanh(double x) Returns the inverse (arc) hyperbolic tangent of a double.static doublecosh(double x) Returns the hyperbolic cosine of a double.static doublecot(double x) Returns the cotangent of a double.static doubleerf(double x) Returns the error function of a double.static doubleerfc(double x) Returns the complementary error function of a double.static doublefact(int n) Returns the factorial of an integer.static doublegamma(double x) Returns the Gamma function of a double.static doublelog10(double x) Returns the common (base 10) logarithm of a double.static doublelogBeta(double a, double b) Returns the logarithm of the Beta function.static doublelogGamma(double x) Returns the logarithm of the Gamma function of a double.static doublesinh(double x) Returns the inverse (arc) hyperbolic sine of a double.static doubletanh(double x) Returns the hyperbolic tangent of a double.
-
Field Details
-
EPSILON_SMALL
public static final double EPSILON_SMALLThe smallest relative spacing for doubles.- See Also:
-
EPSILON_LARGE
public static final double EPSILON_LARGEThe largest relative spacing for doubles.- See Also:
-
-
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.
-