Lines Matching defs:magnitude

111      * The magnitude of this BigInteger, in <i>big-endian</i> order: the
113 * magnitude. The magnitude must be "minimal" in that the most-significant
161 * Two plus the index of the lowest-order int in the magnitude of this
221 * Translates the sign-magnitude representation of a BigInteger into a
223 * negative, 0 for zero, or 1 for positive. The magnitude is a byte array
225 * zeroth element. A zero-length magnitude array is permissible, and will
230 * @param magnitude big-endian binary representation of the magnitude of
234 * {@code magnitude} contains one or more non-zero bytes.
236 public BigInteger(int signum, byte[] magnitude) {
237 this.mag = stripLeadingZeroBytes(magnitude);
246 throw(new NumberFormatException("signum-magnitude mismatch"));
252 * A constructor for internal use that translates the sign-magnitude
254 * arguments and copies the magnitude so this constructor would be
257 private BigInteger(int signum, int[] magnitude) {
258 this.mag = stripLeadingZeroInts(magnitude);
267 throw(new NumberFormatException("signum-magnitude mismatch"));
314 // Skip leading zeros and compute number of digits in magnitude
331 int[] magnitude = new int[numWords];
338 magnitude[numWords - 1] = Integer.parseInt(group, radix);
339 if (magnitude[numWords - 1] < 0)
350 destructiveMulAdd(magnitude, superRadix, groupVal);
353 mag = trustedStripLeadingZeroInts(magnitude);
374 // Skip leading zeros and compute number of digits in magnitude
394 int[] magnitude = new int[numWords];
400 magnitude[numWords - 1] = parseInt(val, cursor, cursor += firstGroupLen);
405 destructiveMulAdd(magnitude, intRadix[10], groupVal);
407 mag = trustedStripLeadingZeroInts(magnitude);
921 * arguments are correct, and it doesn't copy the magnitude array.
923 BigInteger(int[] magnitude, int signum) {
924 this.signum = (magnitude.length==0 ? 0 : signum);
925 this.mag = magnitude;
932 private BigInteger(byte[] magnitude, int signum) {
933 this.signum = (magnitude.length==0 ? 0 : signum);
934 this.mag = stripLeadingZeroBytes(magnitude);
1001 int[] magnitude = new int[1];
1002 magnitude[0] = i;
1003 posConst[i] = new BigInteger(magnitude, 1);
1004 negConst[i] = new BigInteger(magnitude, -1);
2403 // Calculate the bit length of the magnitude
2406 // Check if magnitude is a power of two
2433 // Count the bits in the magnitude
2437 // Count the trailing zeros in the magnitude
2507 * Compares the magnitude array of this BigInteger with the specified
2510 * @param val BigInteger whose magnitude array to be compared.
2511 * @return -1, 0 or 1 as this magnitude array is less than, equal to or
2512 * greater than the magnitude aray for the specified BigInteger's.
2729 * overall magnitude of the BigInteger value as well as return a
2749 * overall magnitude of the BigInteger value as well as return a
2768 * if this BigInteger has too great a magnitude
2788 * if this BigInteger has too great a magnitude
3027 * little-endian binary representation of the magnitude (int 0 is the
3028 * least significant). If the magnitude is zero, return value is undefined.
3054 * @serialField magnitude int[]
3055 * magnitude array of this BigInteger.
3066 new ObjectStreamField("magnitude", byte[].class),
3075 * deserialize it). The magnitude is read in as an array of bytes
3089 * the magnitude of a BigInteger is serialized as an array of bytes.
3090 * The magnitude field is used as a temporary store for the byte array
3100 byte[] magnitude = (byte[])fields.get("magnitude", null);
3109 if ((magnitude.length == 0) != (sign == 0)) {
3110 String message = "BigInteger: signum-magnitude mismatch";
3111 if (fields.defaulted("magnitude"))
3119 // Calculate mag field from magnitude and discard magnitude
3121 stripLeadingZeroBytes(magnitude));
3141 * The magnitude of a BigInteger is serialized as a byte array for
3151 fields.put("magnitude", magSerializedForm());