org.encog.mathutil
Class BoundMath
- java.lang.Object
-
- org.encog.mathutil.BoundMath
-
public final class BoundMath extends java.lang.ObjectJava will sometimes return Math.NaN or Math.Infinity when numbers get to large or too small. This can have undesirable effects. This class provides some basic math functions that may be in danger of returning such a value. This class imposes a very large and small ceiling and floor to keep the numbers within range.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublecos(double a)Calculate the cos.static doubleexp(double a)Calculate the exp.static doublelog(double a)Calculate the log.static doublepow(double a, double b)Calculate the power of a number.static doublesin(double a)Calculate the sin.static doublesqrt(double a)Calculate the square root.static doubletanh(double d)Calculate TANH, within bounds.
-
-
-
Method Detail
-
cos
public static double cos(double a)
Calculate the cos.- Parameters:
a- The value passed to the function.- Returns:
- The result of the function.
-
exp
public static double exp(double a)
Calculate the exp.- Parameters:
a- The value passed to the function.- Returns:
- The result of the function.
-
log
public static double log(double a)
Calculate the log.- Parameters:
a- The value passed to the function.- Returns:
- The result of the function.
-
pow
public static double pow(double a, double b)Calculate the power of a number.- Parameters:
a- The base.b- The exponent.- Returns:
- The result of the function.
-
sin
public static double sin(double a)
Calculate the sin.- Parameters:
a- The value passed to the function.- Returns:
- The result of the function.
-
sqrt
public static double sqrt(double a)
Calculate the square root.- Parameters:
a- The value passed to the function.- Returns:
- The result of the function.
-
tanh
public static double tanh(double d)
Calculate TANH, within bounds.- Parameters:
d- The value to calculate for.- Returns:
- The result.
-
-
DMelt 3.0 © DataMelt by jWork.ORG