Top Inners Fields Constructors Methods
org.apache.poi.ss.util

pack-priv final Class MutableFPNumber

extends Object
Class Inheritance
Imports
java.math.BigInteger

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
MutableFPNumber.TenPower

Holds values for quick multiplication and division by 10

Field Summary

Modifier and TypeField and Description
private int
private BigInteger
private static final BigInteger
BI_MAX_BASE

For 'Base-10 normalised form' The maximum _significand value when _binaryExponent == 49 (10^15-0.5) * 2^14

private static final BigInteger
BI_MIN_BASE

The minimum value in 'Base-10 normalised form'.

private static final int
C_64

Width of a long

private static final int
MIN_PRECISION

Minimum precision after discarding whole 32-bit words from the significand

Constructor Summary

AccessConstructor and Description
public
MutableFPNumber(BigInteger frac, int binaryExponent)

Method Summary

Modifier and TypeMethod and Description
public MutableFPNumber
copy()

public ExpandedDouble
public NormalisedDecimal
public int
public boolean
public boolean
private void
mulShift(BigInteger multiplicand, int multiplierShift)

public void
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_binaryExponentback to summary
private int _binaryExponent
_significandback to summary
private BigInteger _significand
BI_MAX_BASEback to summary
private static final BigInteger BI_MAX_BASE

For 'Base-10 normalised form'
The maximum _significand value when _binaryExponent == 49 (10^15-0.5) * 2^14

BI_MIN_BASEback to summary
private static final BigInteger BI_MIN_BASE

The minimum value in 'Base-10 normalised form'.
When _binaryExponent == 46 this is the minimum _significand value (1014-0.05) * 2^17
Values between (1014-0.05) and 1014 will be represented as '1' followed by 14 zeros. Values less than (1014-0.05) will get shifted by one more power of 10 This frac value rounds to '1' followed by fourteen zeros with an incremented decimal exponent

C_64back to summary
private static final int C_64

Width of a long

MIN_PRECISIONback to summary
private static final int MIN_PRECISION

Minimum precision after discarding whole 32-bit words from the significand

Constructor Detail

MutableFPNumberback to summary
public MutableFPNumber(BigInteger frac, int binaryExponent)

Method Detail

copyback to summary
public MutableFPNumber copy()
createExpandedDoubleback to summary
public ExpandedDouble createExpandedDouble()
createNormalisedDecimalback to summary
public NormalisedDecimal createNormalisedDecimal(int pow10)
get64BitNormalisedExponentback to summary
public int get64BitNormalisedExponent()
isAboveMinRepback to summary
public boolean isAboveMinRep()
isBelowMaxRepback to summary
public boolean isBelowMaxRep()
mulShiftback to summary
private void mulShift(BigInteger multiplicand, int multiplierShift)
multiplyByPowerOfTenback to summary
public void multiplyByPowerOfTen(int pow10)
normalise64bitback to summary
public void normalise64bit()
org.apache.poi.ss.util back to summary

private final Class MutableFPNumber.Rounder

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private static final BigInteger[]

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static BigInteger
round(BigInteger bi, int
number of bits to shift right
nBits
)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

HALF_BITSback to summary
private static final BigInteger[] HALF_BITS

Constructor Detail

Rounderback to summary
private Rounder()

Method Detail

roundback to summary
public static BigInteger round(BigInteger bi, int nBits)
Parameters
nBits:int

number of bits to shift right

org.apache.poi.ss.util back to summary

private final Class MutableFPNumber.TenPower

extends Object
Class Inheritance

Holds values for quick multiplication and division by 10

Field Summary

Modifier and TypeField and Description
private static final MutableFPNumber.TenPower[]
public final BigInteger
public final int
public final BigInteger
public final int
private static final BigInteger

Constructor Summary

AccessConstructor and Description
private
TenPower(int index)

Method Summary

Modifier and TypeMethod and Description
pack-priv static MutableFPNumber.TenPower
getInstance(int index)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_cacheback to summary
private static final MutableFPNumber.TenPower[] _cache
_divisorback to summary
public final BigInteger _divisor
_divisorShiftback to summary
public final int _divisorShift
_multiplicandback to summary
public final BigInteger _multiplicand
_multiplierShiftback to summary
public final int _multiplierShift
FIVEback to summary
private static final BigInteger FIVE

Constructor Detail

TenPowerback to summary
private TenPower(int index)

Method Detail

getInstanceback to summary
pack-priv static MutableFPNumber.TenPower getInstance(int index)