Documentation of 'org.jquantlib.math.Closeness' Java class
Closeness
org.jquantlib.math

Class Closeness



  • public final class Closeness
    extends java.lang.Object
    Follows 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 boolean isClose(double x, double y) 
      static boolean isClose(double x, double y, int n) 
      static boolean isCloseEnough(double x, double y) 
      static boolean isCloseEnough(double x, double y, int n) 
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Closeness

        public Closeness()
    • 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

Ads help maintain this website.