public class Maths
extends java.lang.Object
Modifier and Type | Field | Description |
---|---|---|
static double |
AVOGADRO_L3V1 |
Avogadro's constant of 6.02214179 ⋅ 1023
mol-1.
|
static double |
R |
Universal gas constant of 8.314472 J ⋅ mol-1 ⋅
K-1 according to D.
|
Modifier and Type | Method | Description |
---|---|---|
static double |
arccosh(double n) |
Computes the arccosh of n
|
static double |
arccot(double x) |
Computes the arcus-cotangens of a double value.
|
static double |
arccoth(double n) |
Computes the arccoth of n
|
static double |
arccsc(double x) |
Computes the arccosecant of a double value
|
static double |
arccsch(double n) |
Computes the arccsch of n
|
static double |
arcsec(double x) |
Computes the arcsecant of a double value
|
static double |
arcsech(double n) |
Computes the arcsech of n
|
static double |
arcsinh(double n) |
Computes the arcsinh of n
|
static double |
arctanh(double n) |
Computes the arctanh of n
|
static double |
cot(double n) |
Computes the cot of n
|
static double |
coth(double n) |
Computes the coth of n
|
static double |
csc(double n) |
Computes the csc of n
|
static double |
csch(double n) |
Computes the csch of n
|
static long |
factorial(int n) |
Computes the factorial!
|
static double |
getAvogadro(int level,
int version) |
Returns the avogadro value corresponding to the given SBML level and version.
|
static boolean |
isInt(double x) |
Checks if the given argument represents an integer number, i.e., if it can
be casted to int without loosing information.
|
static double |
ln(double n) |
Computes the ln of n
|
static double |
log(double n) |
Computes the log of n to the base 10
|
static double |
log(double number,
double base) |
Computes the logarithm of a number to a giving base.
|
static double |
root(double radiant,
double rootExponent) |
Computes the rootExponent-th root of the radiant
This method originally always used
Math.pow(double, double) with 1/root exponent (if root exponent ! |
static double |
sec(double x) |
Computes the secant of a double value.
|
static double |
sech(double n) |
Computes the sech of n
|
public static final double AVOGADRO_L3V1
public static final double R
public static final double arccosh(double n)
n
- a numberpublic static final double arccot(double x)
x
- a numberpublic static final double arccoth(double n)
n
- a numberpublic static final double arccsc(double x)
x
- a numberpublic static final double arccsch(double n)
n
- a numberpublic static final double arcsec(double x)
x
- a numberpublic static final double arcsech(double n)
n
- a numberpublic static final double arcsinh(double n)
n
- a numberpublic static final double arctanh(double n)
n
- a numberpublic static final double cot(double n)
n
- a numberpublic static final double coth(double n)
n
- a numberpublic static final double csc(double n)
n
- a numberpublic static final double csch(double n)
n
- a numberpublic static final long factorial(int n)
n
- a numberpublic static final boolean isInt(double x)
x
- a numbertrue
if the given number represents an integer.public static final double ln(double n)
n
- a numberpublic static final double log(double n)
n
- a numberpublic static final double log(double number, double base)
number
- a numberbase
- the base of the logarithmpublic static final double root(double radiant, double rootExponent)
Math.pow(double, double)
with 1/root exponent (if root exponent != 0)
It was changed mainly to obtain more precise results for root exponents of 2 and 3 with their respective methods
in Math
but it also improved runtime if the rootExponent is either 1, 2 or 3.radiant
- the radiantrootExponent
- the exponentpublic static final double sec(double x)
x
- a numberpublic static final double sech(double n)
n
- a numberpublic static final double getAvogadro(int level, int version)
level
- the SBML levelversion
- the SBML version