opale.mathtools
Class SpecialFunction

java.lang.Object
  |
  +--opale.mathtools.SpecialFunction

public final class SpecialFunction
extends java.lang.Object

This class contains physical constants and special functions not found in the java.lang.Math class. Like the java.lang.Math class this class is final and cannot be subclassed. All physical constants are in cgs units.

NOTE: These special functions do not necessarily use the fastest or most accurate algorithms.

Version:
$Revision: 1.7 $, $Date: 1996/08/19 06:04:15 $
Author:
Leigh Brookshaw

Field Summary
static double AU
          Astronomical Unit (radius of the Earth's orbit).
static double AVOGADRO
          Avogadro Number.
static double BOLTZMAN
          Boltzman Constant.
static double ECHARGE
          Elementary Charge.
static double EMASS
          Electron Mass.
static double GASCONSTANT
          Gas Constant.
static double GRAV
          Gravitational Constant.
static double GRAVACC
          Gravitational Acceleration at the Earths surface.
static double LIGHTSPEED
          Speed of Light in a Vacuum.
static double PLANCK
          Planck constant.
static double PMASS
          Proton Mass.
static double SOLARFLUX
          Solar Flux.
static double SOLARLUM
          Solar Luminosity.
static double SOLARMASS
          Solar Mass.
static double SOLARRADIUS
          Solar Radius.
static double STEFANBOLTZ
          Stefan-Boltzman Constant.
 
Method Summary
static double acosh(double x)
           
static double asinh(double xx)
           
static double atanh(double x)
           
static double chisq(double df, double x)
          Returns the area under the left hand tail (from 0 to x) of the Chi square probability density function with v degrees of freedom.
static double chisqc(double df, double x)
          Returns the area under the right hand tail (from x to infinity) of the Chi square probability density function with v degrees of freedom:
static double cosh(double x)
           
static double erf(double x)
           
static double erfc(double a)
           
static double fac(double x)
           
static int fac(int j)
           
static double gamma(double x)
           
static double ibeta(double aa, double bb, double xx)
           
static double igam(double a, double x)
           
static double igamc(double a, double x)
           
static double j0(double x)
           
static double j1(double x)
           
static double jn(int n, double x)
           
static double log10(double x)
           
static double normal(double a)
           
static double poisson(int k, double x)
          Returns the sum of the first k terms of the Poisson distribution.
static double poissonc(int k, double x)
          Returns the sum of the terms k+1 to infinity of the Poisson distribution.
static double sinh(double x)
           
static double tanh(double x)
           
static double y0(double x)
           
static double y1(double x)
           
static double yn(int n, double x)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BOLTZMAN

public static final double BOLTZMAN
Boltzman Constant. Units erg/deg(K)

ECHARGE

public static final double ECHARGE
Elementary Charge. Units statcoulomb

EMASS

public static final double EMASS
Electron Mass. Units g

PMASS

public static final double PMASS
Proton Mass. Units g

GRAV

public static final double GRAV
Gravitational Constant. Units dyne-cm^2/g^2

PLANCK

public static final double PLANCK
Planck constant. Units erg-sec

LIGHTSPEED

public static final double LIGHTSPEED
Speed of Light in a Vacuum. Units cm/sec

STEFANBOLTZ

public static final double STEFANBOLTZ
Stefan-Boltzman Constant. Units erg/cm^2-sec-deg^4

AVOGADRO

public static final double AVOGADRO
Avogadro Number. Units 1/mol

GASCONSTANT

public static final double GASCONSTANT
Gas Constant. Units erg/deg-mol

GRAVACC

public static final double GRAVACC
Gravitational Acceleration at the Earths surface. Units cm/sec^2

SOLARMASS

public static final double SOLARMASS
Solar Mass. Units g

SOLARRADIUS

public static final double SOLARRADIUS
Solar Radius. Units cm

SOLARLUM

public static final double SOLARLUM
Solar Luminosity. Units erg/sec

SOLARFLUX

public static final double SOLARFLUX
Solar Flux. Units erg/cm^2-sec

AU

public static final double AU
Astronomical Unit (radius of the Earth's orbit). Units cm
Method Detail

log10

public static double log10(double x)
                    throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
The log10

cosh

public static double cosh(double x)
                   throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic cosine of the argument

sinh

public static double sinh(double x)
                   throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic sine of the argument

tanh

public static double tanh(double x)
                   throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic tangent of the argument

acosh

public static double acosh(double x)
                    throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic arc cosine of the argument

asinh

public static double asinh(double xx)
                    throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic arc sine of the argument

atanh

public static double atanh(double x)
                    throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the hyperbolic arc tangent of the argument

j0

public static double j0(double x)
                 throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the Bessel function of order 0 of the argument.

j1

public static double j1(double x)
                 throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the Bessel function of order 1 of the argument.

jn

public static double jn(int n,
                        double x)
                 throws java.lang.ArithmeticException
Parameters:
n - integer order
x - a double value
Returns:
the Bessel function of order n of the argument.

y0

public static double y0(double x)
                 throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the Bessel function of the second kind, of order 0 of the argument.

y1

public static double y1(double x)
                 throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the Bessel function of the second kind, of order 1 of the argument.

yn

public static double yn(int n,
                        double x)
                 throws java.lang.ArithmeticException
Parameters:
n - integer order
x - a double value
Returns:
the Bessel function of the second kind, of order n of the argument.

fac

public static double fac(double x)
                  throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the factorial of the argument

fac

public static int fac(int j)
               throws java.lang.ArithmeticException
Parameters:
x - an integer value
Returns:
the factorial of the argument

gamma

public static double gamma(double x)
                    throws java.lang.ArithmeticException
Parameters:
x - a double value
Returns:
the Gamma function of the value.

Converted to Java from
Cephes Math Library Release 2.2: July, 1992
Copyright 1984, 1987, 1989, 1992 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140


igamc

public static double igamc(double a,
                           double x)
                    throws java.lang.ArithmeticException
Parameters:
a - double value
x - double value
Returns:
the Complemented Incomplete Gamma function.

Converted to Java from
Cephes Math Library Release 2.2: July, 1992
Copyright 1984, 1987, 1989, 1992 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140


igam

public static double igam(double a,
                          double x)
                   throws java.lang.ArithmeticException
Parameters:
a - double value
x - double value
Returns:
the Incomplete Gamma function.

Converted to Java from
Cephes Math Library Release 2.2: July, 1992
Copyright 1984, 1987, 1989, 1992 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140


chisq

public static double chisq(double df,
                           double x)
                    throws java.lang.ArithmeticException
Returns the area under the left hand tail (from 0 to x) of the Chi square probability density function with v degrees of freedom.
Parameters:
df - degrees of freedom
x - double value
Returns:
the Chi-Square function.

chisqc

public static double chisqc(double df,
                            double x)
                     throws java.lang.ArithmeticException
Returns the area under the right hand tail (from x to infinity) of the Chi square probability density function with v degrees of freedom:
Parameters:
df - degrees of freedom
x - double value
Returns:
the Chi-Square function.


poisson

public static double poisson(int k,
                             double x)
                      throws java.lang.ArithmeticException
Returns the sum of the first k terms of the Poisson distribution.
Parameters:
k - number of terms
x - double value

poissonc

public static double poissonc(int k,
                              double x)
                       throws java.lang.ArithmeticException
Returns the sum of the terms k+1 to infinity of the Poisson distribution.
Parameters:
k - start
x - double value

normal

public static double normal(double a)
                     throws java.lang.ArithmeticException
Parameters:
a - double value
Returns:
The area under the Gaussian probability density function, integrated from minus infinity to x:

erfc

public static double erfc(double a)
                   throws java.lang.ArithmeticException
Parameters:
a - double value
Returns:
The complementary Error function

Converted to Java from
Cephes Math Library Release 2.2: July, 1992
Copyright 1984, 1987, 1989, 1992 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140


erf

public static double erf(double x)
                  throws java.lang.ArithmeticException
Parameters:
a - double value
Returns:
The Error function

Converted to Java from
Cephes Math Library Release 2.2: July, 1992
Copyright 1984, 1987, 1989, 1992 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140


ibeta

public static double ibeta(double aa,
                           double bb,
                           double xx)
                    throws java.lang.ArithmeticException
Parameters:
aa - double value
bb - double value
xx - double value
Returns:
The Incomplete Beta Function evaluated from zero to xx.

Converted to Java from
Cephes Math Library Release 2.3: July, 1995
Copyright 1984, 1995 by Stephen L. Moshier
Direct inquiries to 30 Frost Street, Cambridge, MA 02140