Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.encog.mathutil
Class BoundMath

    java.lang.Object
      org.encog.mathutil.BoundMath

    public final class BoundMath

extends Object

Java 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.

Author:
  jheaton

Method Summary
`static double` | `cos(double a)` Calculate the cos.
`static double` | `exp(double a)` Calculate the exp.
`static double` | `log(double a)` Calculate the log.
`static double` | `pow(double a, double b)` Calculate the power of a number.
`static double` | `sin(double a)` Calculate the sin.
`static double` | `sqrt(double a)` Calculate the square root.
`static double` | `tanh(double d)` Calculate TANH, within bounds.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

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.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.