Home | History | Annotate | Download | only in dfp

Lines Matching defs:RADIX

27  *  <p>Another floating point class.  This one is built using radix 10000
53 * n = sign &times; mant &times; (radix)<sup>exp</sup>;</p>
61 * <p>IEEE 854 requires the radix to be either 2 or 10. The radix here is
63 * subclassed can be made to make it behave as a radix 10
64 * number. It is my opinion that if it looks and behaves as a radix
67 * <p>The radix of 10000 was chosen because it should be faster to operate
68 * on 4 decimal digits at once instead of one at a time. Radix 10 behavior
73 * so it is reasonable to conclude that such a subclass of this radix
74 * 10000 system is merely an encoding of a radix 10 system.</p>
77 * class does not contain any such entities. The most significant radix
85 * <p>IEEE 854 defines that the implied radix point lies just to the right
87 * This implementation puts the implied radix point to the left of all
89 * here is the one just to the right of the radix point. This is a fine
98 /** The radix, or base of this system. Set to 10000 */
99 public static final int RADIX = 10000;
235 mant[mant.length - 1] = (int) (x % RADIX);
236 x /= RADIX;
340 final int rsize = 4; // size of radix in decimal digits
635 /** Get the number of radix digits of the instance.
636 * @return number of radix digits
1062 result = result * RADIX + rounded.mant[i];
1144 extra = RADIX-extra;
1146 mant[i] = RADIX-mant[i]-1;
1149 int rh = extra / RADIX;
1150 extra = extra - rh * RADIX;
1153 rh = r / RADIX;
1154 mant[i] = r - rh * RADIX;
1258 rh = r / RADIX;
1259 result.mant[i] = r - rh * RADIX;
1372 rh = r / RADIX;
1373 mant[i] = r - rh * RADIX;
1467 rh = r / RADIX;
1468 product[i+j] = r - rh * RADIX;
1511 /** Multiply this by a single digit 0&lt;=x&lt;radix.
1540 if (x < 0 || x >= RADIX) {
1551 rh = r / RADIX;
1552 result.mant[i] = r - rh * RADIX;
1667 final int divMsb = dividend[mant.length]*RADIX+dividend[mant.length-1];
1681 rh = r / RADIX;
1682 remainder[i] = r - rh * RADIX;
1688 final int r = ((RADIX-1) - remainder[i]) + dividend[i] + rh;
1689 rh = r / RADIX;
1690 remainder[i] = r - rh * RADIX;
1701 minadj = (remainder[mant.length] * RADIX)+remainder[mant.length-1];
1788 /** Divide by a single digit less than radix.
1789 * Special case, so there are speed advantages. 0 &lt;= divisor &lt; radix
1817 if (divisor < 0 || divisor >= RADIX) {
1829 final int r = rl*RADIX + result.mant[i];
1838 final int r = rl * RADIX; // compute the next digit and put it in
1844 final int excp = result.round(rl * RADIX / divisor); // do the rounding
2098 // Ensure we have a radix point!