com.bc.jexp.impl
Class ExtMath

java.lang.Object
  extended by com.bc.jexp.impl.ExtMath

public class ExtMath
extends Object

An extension the the class.


Constructor Summary
ExtMath()
           
 
Method Summary
static boolean feq(double x1, double x2, double eps)
          Performs a fuzzy equal operation for the two given arguments.
static boolean fneq(double x1, double x2, double eps)
          Performs a fuzzy not-equal operation for the two given arguments.
static double log10(double x)
          Deprecated. Use Java Math class
static double sign(double a)
          Computes the signum of a given number.
static float sign(float a)
          Computes the signum of a given number.
static int sign(int a)
          Computes the signum of a given integer.
static long sign(long a)
          Computes the signum of a given long integer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtMath

public ExtMath()
Method Detail

log10

@Deprecated
public static double log10(double x)
Deprecated. Use Java Math class

Returns the common logarithm, the logarithm with base 10 of a double value. Special cases:
  • If the argument is NaN or less than zero, then the result is NaN.
  • If the argument is positive infinity, then the result is positive infinity.
  • If the argument is positive zero or negative zero, then the result is negative infinity.
  • Parameters:
    x - number greater than 0.0.
    Returns:
    the natural logarithm of a.

    feq

    public static boolean feq(double x1,
                              double x2,
                              double eps)
    Performs a fuzzy equal operation for the two given arguments.

    Parameters:
    x1 - the first value
    x2 - the second value
    eps - the maximum deviation
    Returns:
    true, if x1 and x2 are equal

    fneq

    public static boolean fneq(double x1,
                               double x2,
                               double eps)
    Performs a fuzzy not-equal operation for the two given arguments.

    Parameters:
    x1 - the first value
    x2 - the second value
    eps - the maximum deviation
    Returns:
    true, if x1 and x2 are not equal

    sign

    public static int sign(int a)
    Computes the signum of a given integer. The method returns
  • -1, if a is negative
  • +1, if a is positive
  • 0, if a is zero.
  • Parameters:
    a - the number
    Returns:
    the signum of a

    sign

    public static long sign(long a)
    Computes the signum of a given long integer. The method returns
  • -1, if a is negative
  • +1, if a is positive
  • 0, if a is zero.
  • Parameters:
    a - the number
    Returns:
    the signum of a

    sign

    public static float sign(float a)
    Computes the signum of a given number. The method returns
  • -1, if a is negative
  • +1, if a is positive
  • 0, if a is zero
  • NaN, if a is NaN.
  • Parameters:
    a - the number
    Returns:
    the signum of a

    sign

    public static double sign(double a)
    Computes the signum of a given number. The method returns
  • -1, if a is negative
  • +1, if a is positive
  • 0, if a is zero
  • NaN, if a is NaN.
  • Parameters:
    a - the number
    Returns:
    the signum of a


    Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.