Class DoubleUtils


  • @GwtIncompatible
    final class DoubleUtils
    extends java.lang.Object
    Utilities for double primitives.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static int EXPONENT_BIAS  
      (package private) static long EXPONENT_MASK  
      (package private) static long IMPLICIT_BIT
      The implicit 1 bit that is omitted in significands of normal doubles.
      (package private) static long ONE_BITS  
      (package private) static long SIGN_MASK  
      (package private) static int SIGNIFICAND_BITS  
      (package private) static long SIGNIFICAND_MASK  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private DoubleUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static double bigToDouble​(java.math.BigInteger x)  
      (package private) static double ensureNonNegative​(double value)
      Returns its argument if it is non-negative, zero if it is negative.
      (package private) static long getSignificand​(double d)  
      (package private) static boolean isFinite​(double d)  
      (package private) static boolean isNormal​(double d)  
      (package private) static double nextDown​(double d)  
      (package private) static double scaleNormalize​(double x)  
      • Methods inherited from class java.lang.Object

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

      • DoubleUtils

        private DoubleUtils()
    • Method Detail

      • nextDown

        static double nextDown​(double d)
      • getSignificand

        static long getSignificand​(double d)
      • isFinite

        static boolean isFinite​(double d)
      • isNormal

        static boolean isNormal​(double d)
      • scaleNormalize

        static double scaleNormalize​(double x)
      • bigToDouble

        static double bigToDouble​(java.math.BigInteger x)
      • ensureNonNegative

        static double ensureNonNegative​(double value)
        Returns its argument if it is non-negative, zero if it is negative.