/** * Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). * The resulting transformed object is easily converted to a 64 bit IEEE double: * <ul> * <li>bits 2-53 of the {@link #getSignificand()} become the 52 bit 'fraction'.</li> * <li>{@link #getBinaryExponent()} is biased by 1023 to give the 'exponent'.</li> * </ul> * The sign bit must be obtained from somewhere else. * @return a new {@link NormalisedDecimal} normalised to base 2 representation. */ public ExpandedDouble normaliseBaseTwo() { MutableFPNumber cc = new MutableFPNumber(composeFrac(), 39); cc.multiplyByPowerOfTen(_relativeDecimalExponent); cc.normalise64bit(); return cc.createExpandedDouble(); }
/** * Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). * The resulting transformed object is easily converted to a 64 bit IEEE double: * <ul> * <li>bits 2-53 of the {@link #getSignificand()} become the 52 bit 'fraction'.</li> * <li>{@link #getBinaryExponent()} is biased by 1023 to give the 'exponent'.</li> * </ul> * The sign bit must be obtained from somewhere else. * @return a new {@link NormalisedDecimal} normalised to base 2 representation. */ public ExpandedDouble normaliseBaseTwo() { MutableFPNumber cc = new MutableFPNumber(composeFrac(), 39); cc.multiplyByPowerOfTen(_relativeDecimalExponent); cc.normalise64bit(); return cc.createExpandedDouble(); }
/** * Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). * The resulting transformed object is easily converted to a 64 bit IEEE double: * <ul> * <li>bits 2-53 of the {@link #getSignificand()} become the 52 bit 'fraction'.</li> * <li>{@link #getBinaryExponent()} is biased by 1023 to give the 'exponent'.</li> * </ul> * The sign bit must be obtained from somewhere else. * @return a new {@link NormalisedDecimal} normalised to base 2 representation. */ public ExpandedDouble normaliseBaseTwo() { MutableFPNumber cc = new MutableFPNumber(composeFrac(), 39); cc.multiplyByPowerOfTen(_relativeDecimalExponent); cc.normalise64bit(); return cc.createExpandedDouble(); }
/** * Convert to an equivalent {@link ExpandedDouble} representation (binary frac and exponent). * The resulting transformed object is easily converted to a 64 bit IEEE double: * <ul> * <li>bits 2-53 of the {@link #getSignificand()} become the 52 bit 'fraction'.</li> * <li>{@link #getBinaryExponent()} is biased by 1023 to give the 'exponent'.</li> * </ul> * The sign bit must be obtained from somewhere else. * @return a new {@link NormalisedDecimal} normalised to base 2 representation. */ public ExpandedDouble normaliseBaseTwo() { MutableFPNumber cc = new MutableFPNumber(composeFrac(), 39); cc.multiplyByPowerOfTen(_relativeDecimalExponent); cc.normalise64bit(); return cc.createExpandedDouble(); }