jebl.math
Class MachineAccuracy

java.lang.Object
  extended by jebl.math.MachineAccuracy

public class MachineAccuracy
extends java.lang.Object

determines machine accuracy

Version:
$Id: MachineAccuracy.java 914 2008-05-22 05:14:44Z twobeers $
Author:
Korbinian Strimmer, Alexei Drummond

Field Summary
static double EPSILON
          machine accuracy constant
static double SQRT_EPSILON
           
static double SQRT_SQRT_EPSILON
           
 
Constructor Summary
MachineAccuracy()
           
 
Method Summary
static boolean same(double a, double b)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPSILON

public static final double EPSILON
machine accuracy constant

See Also:
Constant Field Values

SQRT_EPSILON

public static final double SQRT_EPSILON
See Also:
Constant Field Values

SQRT_SQRT_EPSILON

public static final double SQRT_SQRT_EPSILON
See Also:
Constant Field Values
Constructor Detail

MachineAccuracy

public MachineAccuracy()
Method Detail

same

public static boolean same(double a,
                           double b)
Returns:
true if the relative difference between the two parameters is no larger than SQRT_EPSILON. (TT: I think this means (b / (1+SQRT_EPSILON)) <= a <= b * (1+SQRT_EPSILON) )


http://code.google.com/p/jebl2/