return isNegative ? "-0" : "0"; ExpandedDouble ed = new ExpandedDouble(rawBits); if (ed.getBinaryExponent() < -1022) { if (ed.getBinaryExponent() == 1024) { NormalisedDecimal nd = ed.normaliseBaseTen(); StringBuilder sb = new StringBuilder(MAX_TEXT_LEN+1); if (isNegative) {
ExpandedDouble edA = ExpandedDouble.fromRawBitsAndExponent(rawBitsA, biasedExponentA - EXPONENT_BIAS); ExpandedDouble edB = ExpandedDouble.fromRawBitsAndExponent(rawBitsB, biasedExponentB - EXPONENT_BIAS); NormalisedDecimal ndA = edA.normaliseBaseTen().roundUnits(); NormalisedDecimal ndB = edB.normaliseBaseTen().roundUnits(); cmp = ndA.compareNormalised(ndB); if (aIsNegative) {
public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp) { return new ExpandedDouble(getFrac(rawBits), exp); }
public ExpandedDouble createExpandedDouble() { return new ExpandedDouble(_significand, _binaryExponent); } }
public ExpandedDouble(long rawBits) { int biasedExp = (int) (rawBits >> 52); if (biasedExp == 0) { // sub-normal numbers BigInteger frac = BigInteger.valueOf(rawBits).and(BI_FRAC_MASK); int expAdj = 64 - frac.bitLength(); _significand = frac.shiftLeft(expAdj); _binaryExponent = (biasedExp & 0x07FF) - 1023 - expAdj; } else { _significand = getFrac(rawBits); _binaryExponent = (biasedExp & 0x07FF) - 1023; } }
public ExpandedDouble createExpandedDouble() { return new ExpandedDouble(_significand, _binaryExponent); } }
public ExpandedDouble(long rawBits) { int biasedExp = (int) (rawBits >> 52); if (biasedExp == 0) { // sub-normal numbers BigInteger frac = BigInteger.valueOf(rawBits).and(BI_FRAC_MASK); int expAdj = 64 - frac.bitLength(); _significand = frac.shiftLeft(expAdj); _binaryExponent = (biasedExp & 0x07FF) - 1023 - expAdj; } else { _significand = getFrac(rawBits); _binaryExponent = (biasedExp & 0x07FF) - 1023; } }
return isNegative ? "-0" : "0"; ExpandedDouble ed = new ExpandedDouble(rawBits); if (ed.getBinaryExponent() < -1022) { if (ed.getBinaryExponent() == 1024) { NormalisedDecimal nd = ed.normaliseBaseTen(); StringBuilder sb = new StringBuilder(MAX_TEXT_LEN+1); if (isNegative) {
public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp) { return new ExpandedDouble(getFrac(rawBits), exp); }
ExpandedDouble edA = ExpandedDouble.fromRawBitsAndExponent(rawBitsA, biasedExponentA - EXPONENT_BIAS); ExpandedDouble edB = ExpandedDouble.fromRawBitsAndExponent(rawBitsB, biasedExponentB - EXPONENT_BIAS); NormalisedDecimal ndA = edA.normaliseBaseTen().roundUnits(); NormalisedDecimal ndB = edB.normaliseBaseTen().roundUnits(); cmp = ndA.compareNormalised(ndB); if (aIsNegative) {
public ExpandedDouble createExpandedDouble() { return new ExpandedDouble(_significand, _binaryExponent); } }
public ExpandedDouble(long rawBits) { int biasedExp = (int) (rawBits >> 52); if (biasedExp == 0) { // sub-normal numbers BigInteger frac = BigInteger.valueOf(rawBits).and(BI_FRAC_MASK); int expAdj = 64 - frac.bitLength(); _significand = frac.shiftLeft(expAdj); _binaryExponent = (biasedExp & 0x07FF) - 1023 - expAdj; } else { BigInteger frac = getFrac(rawBits); _significand = frac; _binaryExponent = (biasedExp & 0x07FF) - 1023; } }
return isNegative ? "-0" : "0"; ExpandedDouble ed = new ExpandedDouble(rawBits); if (ed.getBinaryExponent() < -1022) { if (ed.getBinaryExponent() == 1024) { NormalisedDecimal nd = ed.normaliseBaseTen(); StringBuilder sb = new StringBuilder(MAX_TEXT_LEN+1); if (isNegative) {
public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp) { return new ExpandedDouble(getFrac(rawBits), exp); }
ExpandedDouble edA = ExpandedDouble.fromRawBitsAndExponent(rawBitsA, biasedExponentA - EXPONENT_BIAS); ExpandedDouble edB = ExpandedDouble.fromRawBitsAndExponent(rawBitsB, biasedExponentB - EXPONENT_BIAS); NormalisedDecimal ndA = edA.normaliseBaseTen().roundUnits(); NormalisedDecimal ndB = edB.normaliseBaseTen().roundUnits(); cmp = ndA.compareNormalised(ndB); if (aIsNegative) {
public ExpandedDouble createExpandedDouble() { return new ExpandedDouble(_significand, _binaryExponent); } }
public ExpandedDouble(long rawBits) { int biasedExp = (int) (rawBits >> 52); if (biasedExp == 0) { // sub-normal numbers BigInteger frac = BigInteger.valueOf(rawBits).and(BI_FRAC_MASK); int expAdj = 64 - frac.bitLength(); _significand = frac.shiftLeft(expAdj); _binaryExponent = (biasedExp & 0x07FF) - 1023 - expAdj; } else { BigInteger frac = getFrac(rawBits); _significand = frac; _binaryExponent = (biasedExp & 0x07FF) - 1023; } }
return isNegative ? "-0" : "0"; ExpandedDouble ed = new ExpandedDouble(rawBits); if (ed.getBinaryExponent() < -1022) { if (ed.getBinaryExponent() == 1024) { NormalisedDecimal nd = ed.normaliseBaseTen(); StringBuilder sb = new StringBuilder(MAX_TEXT_LEN+1); if (isNegative) {
public static ExpandedDouble fromRawBitsAndExponent(long rawBits, int exp) { return new ExpandedDouble(getFrac(rawBits), exp); }
ExpandedDouble edA = ExpandedDouble.fromRawBitsAndExponent(rawBitsA, biasedExponentA - EXPONENT_BIAS); ExpandedDouble edB = ExpandedDouble.fromRawBitsAndExponent(rawBitsB, biasedExponentB - EXPONENT_BIAS); NormalisedDecimal ndA = edA.normaliseBaseTen().roundUnits(); NormalisedDecimal ndB = edB.normaliseBaseTen().roundUnits(); cmp = ndA.compareNormalised(ndB); if (aIsNegative) {