Package ptolemy.util

Class DoubleUtilities


  • public final class DoubleUtilities
    extends java.lang.Object
    Utilities for double primitives. This code is used by ptolemy.actor.util.Time to improve performance.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Louis Wasserman, based on https://code.google.com/p/guava-libraries/source/browse/guava/src/com/google/common/math/DoubleUtils.java
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double bigToDouble​(java.math.BigInteger x)
      Convert a BigInteger to a double using a fast implementation.
      • Methods inherited from class java.lang.Object

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

      • bigToDouble

        public static double bigToDouble​(java.math.BigInteger x)
        Convert a BigInteger to a double using a fast implementation.
        Parameters:
        x - The BigInteger to be converted.
        Returns:
        the value of the BigInteger as a double.