Class ExpandedDouble

java.lang.Object
org.xlsx4j.org.apache.poi.ss.util.ExpandedDouble

final class ExpandedDouble extends Object
Represents a 64 bit IEEE double quantity expressed with both decimal and binary exponents Does not handle negative numbers or zero

The value of a ExpandedDouble is given by
a × 2b
where:
a = significand
b = binaryExponent - bitLength(significand) + 1

  • Field Details

    • BI_FRAC_MASK

      private static final BigInteger BI_FRAC_MASK
    • BI_IMPLIED_FRAC_MSB

      private static final BigInteger BI_IMPLIED_FRAC_MSB
    • _significand

      private final BigInteger _significand
      Always 64 bits long (MSB, bit-63 is '1')
    • _binaryExponent

      private final int _binaryExponent
  • Constructor Details

    • ExpandedDouble

      public ExpandedDouble(long rawBits)
    • ExpandedDouble

      ExpandedDouble(BigInteger frac, int binaryExp)
  • Method Details

    • getFrac

      private static BigInteger getFrac(long rawBits)
    • fromRawBitsAndExponent

      public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp)
    • normaliseBaseTen

      public NormalisedDecimal normaliseBaseTen()
      Convert to an equivalent NormalisedDecimal representation having 15 decimal digits of precision in the non-fractional bits of the significand.
    • getBinaryExponent

      public int getBinaryExponent()
      Returns:
      the number of non-fractional bits after the MSB of the significand
    • getSignificand

      public BigInteger getSignificand()