jebl.math
Class MachineAccuracy
java.lang.Object
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
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 |
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
MachineAccuracy
public MachineAccuracy()
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/