org.jquantlib.math
Class Closeness
- java.lang.Object
-
- org.jquantlib.math.Closeness
-
public final class Closeness extends java.lang.ObjectFollows somewhat the advice of Knuth on checking for floating-point equality. The closeness relationship is:where is times the machine accuracy;
equals 42 if not given.
-
-
Constructor Summary
Constructors Constructor and Description Closeness()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static booleanisClose(double x, double y)static booleanisClose(double x, double y, int n)static booleanisCloseEnough(double x, double y)static booleanisCloseEnough(double x, double y, int n)
-
-
-
Method Detail
-
isClose
public static final boolean isClose(double x, double y)
-
isClose
public static final boolean isClose(double x, double y, int n)
-
isCloseEnough
public static final boolean isCloseEnough(double x, double y)
-
isCloseEnough
public static final boolean isCloseEnough(double x, double y, int n)
-
-
DataMelt 3.0 © DataMelt by jWork.ORG