jebl.math
Class MachineAccuracy

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

public class MachineAccuracy
extends Object

determines machine accuracy

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 double computeEpsilon()
          compute EPSILON from scratch
static boolean same(double a, double b)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EPSILON

public static double EPSILON
machine accuracy constant


SQRT_EPSILON

public static double SQRT_EPSILON

SQRT_SQRT_EPSILON

public static double SQRT_SQRT_EPSILON
Constructor Detail

MachineAccuracy

public MachineAccuracy()
Method Detail

computeEpsilon

public static double computeEpsilon()
compute EPSILON from scratch


same

public static boolean same(double a,
                           double b)
Returns:
true if the relative difference between the two parameters is smaller than SQRT_EPSILON.