Class BigIntConverter

    • Constructor Detail

      • BigIntConverter

        public BigIntConverter()
    • Method Detail

      • fromDouble

        public static BigInteger fromDouble​(double d)
        Create a BigInteger from double, with minimal precision loss.
        Parameters:
        d -
        Returns:
        BigInteger
      • fromDoubleMulPow2

        public static BigInteger fromDoubleMulPow2​(double d,
                                                   int e2)
        Compute BigInteger from double multiplied with a power of 2, i.e. result ~ d * 2^e2, with minimal precision loss.
        Parameters:
        d -
        e2 -
        Returns:
        a BigInteger with approximate value d * 2^e2
      • main

        public static void main​(String[] args)