Esempio n. 1
0
        /**
         * assumes both this and other are normalised
         */
        public int CompareNormalised(NormalisedDecimal other)
        {
            int cmp = _relativeDecimalExponent - other._relativeDecimalExponent;

            if (cmp != 0)
            {
                return(cmp);
            }
            if (_wholePart > other._wholePart)
            {
                return(1);
            }
            if (_wholePart < other._wholePart)
            {
                return(-1);
            }
            return(_fractionalPart - other._fractionalPart);
        }
Esempio n. 2
0
 /**
  * Convert to an equivalent {@link NormalisedDecimal} representation having 15 decimal digits of precision in the
  * non-fractional bits of the significand.
  */
 public NormalisedDecimal NormaliseBaseTen()
 {
     return(NormalisedDecimal.Create(_significand, _binaryExponent));
 }