Package pal.math

Class MachineAccuracy


  • public class MachineAccuracy
    extends java.lang.Object
    determines machine accuracy
    Version:
    $Id: MachineAccuracy.java,v 1.4 2001/09/09 22:17:11 alexi Exp $
    Author:
    Korbinian Strimmer, Alexei Drummond
    • Constructor Summary

      Constructors 
      Constructor Description
      MachineAccuracy()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.