Lines Matching defs:and

2  * Copyright (c) 1996, 2007, Oracle and/or its affiliates. All rights reserved.
5 * This code is free software; you can redistribute it and/or modify it
39 * primitive integer operators, and all relevant methods from java.lang.Math.
42 * and a few other miscellaneous operations.
46 * For example, division by zero throws an {@code ArithmeticException}, and
54 * shift distance results in a left shift, and vice-versa. The unsigned
60 * bitwise integer operators. The binary operators ({@code and},
65 * those performed by Java's relational and equality operators.
68 * exponentiation, and compute multiplicative inverses. These methods always
69 * return a non-negative result, between {@code 0} and {@code (modulus - 1)},
76 * BigInteger being operated on, as they affect only a single bit, and the
80 * <p>For the sake of brevity and clarity, pseudo-code is used throughout the
85 * "{@code true} if and only if the BigInteger {@code i} represents the same
89 * <p>All methods and constructors in this class throw
122 // values, and cached the first time they are needed (or never, if they
131 * value and correction factor is applied in accessor method.
143 * value and correction factor is applied in accessor method.
155 * value and correction factor is applied in accessor method.
164 * increasing significance has int-number 1, and so forth.
166 * value and correction factor is applied in accessor method.
225 * zeroth element. A zero-length magnitude array is permissible, and will
233 * legal values (-1, 0, and 1), or {@code signum} is 0 and
254 * arguments and copies the magnitude so this constructor would be
314 // Skip leading zeros and compute number of digits in magnitude
374 // Skip leading zeros and compute number of digits in magnitude
436 // Multiply x array times word y in place, and add word z
502 // Generate random bytes and mask out any excess bits
604 // All candidates of bitLength 2 and 3 are prime by this point
685 // All candidates of bitLength 2 and 3 are prime by this point
732 // The relationship between the certainty and the number of rounds
789 // Algorithm and comments adapted from Colin Plumb's C library.
828 // Now both u and p are odd, so use quadratic reciprocity
890 // Find a and m such that m is odd and this == 1 + 2**a * m
921 * arguments are correct, and it doesn't copy the magnitude array.
929 * This private constructor is for internal use and assumes that its
1061 * Adds the contents of the int arrays x and y. This method allocates
1062 * a new int array to hold the answer and returns a reference to that
1218 * Multiplies int arrays x and y to the specified lengths and places
1298 * divided by two, the off-diagonal added, and multiplied by two
1323 // Shift back up and set low bit
1350 * @param val value by which this BigInteger is to be divided, and the
1353 * is the initial element, and the remainder {@code (this % val)}
1371 * @param val value by which this BigInteger is to be divided, and the
1420 * {@code abs(this)} and {@code abs(val)}. Returns 0 if
1570 * negative and this BigInteger is not <i>relatively
1602 * Even modulus. Tear it into an "odd part" (m1) and power of two
1603 * (m2), exponentiate mod m1, manually exponentiate mod m2, and
1607 // Tear m apart into odd part (m1) and power of 2 (m2)
1648 * and then keep appending exponent bits to it. The following patterns
1661 * We precompute a table of odd powers of n, up to 2^k, and can then
1674 * by, and when to do it. We decide, remember to do it in future
1678 * squaring), clear the buffer, and continue.
1684 * and then starting to square it, we have already computed n^2
1686 * the buffer and save a squaring.
1696 * and you'll see that a k-bit window saves k-2 squarings
1855 // Convert result out of Montgomery form and return
1870 * Montgomery reduce n, modulo mod. This reduces modulo mod and divides
1927 * Multiply an array by one word k and add to result, return the carry
1996 * Assumes that this {@code BigInteger >= 0} and {@code p > 0}.
2184 * method returns a negative BigInteger if and only if this and val are
2190 public BigInteger and(BigInteger val) {
2201 * returns a negative BigInteger if and only if either this or val is
2218 * returns a negative BigInteger if and only if exactly one of this and
2235 * returns a negative value if and only if this BigInteger is
2250 * method, which is equivalent to {@code and(val.not())}, is provided as
2252 * BigInteger if and only if {@code this} is negative and {@code val} is
2255 * @param val value to be complemented and AND'ed with this BigInteger.
2271 * Returns {@code true} if and only if the designated bit is set.
2275 * @return {@code true} if and only if the designated bit is set.
2536 * @return {@code true} if and only if the specified Object is a
2565 * Returns the minimum of this BigInteger and {@code val}.
2568 * @return the BigInteger whose value is the lesser of this BigInteger and
2576 * Returns the maximum of this BigInteger and {@code val}.
2579 * @return the BigInteger whose value is the greater of this and
2609 * provided by {@code Character.forDigit} is used, and a minus
2626 // Compute upper bound on number of digit groups and allocate space
2647 // Put sign (if any) and first digit group into result buffer
2676 * {@code Character.forDigit} is used, and a minus sign is
2678 * with the {@link #BigInteger(String) (String)} constructor, and
2840 // Allocate new array and copy relevant part of input array
2855 * Takes an array a representing a negative 2's-complement number and
2903 * Takes an array a representing a negative 2's-complement number and
2940 * nonsense values in their 0 and 1 elements, as radixes 0 and 1 are not
3077 * and the byte array is discarded.
3080 * bitLength and lowestSetBit, to 0 rather than some other marker value.
3119 // Calculate mag field from magnitude and discard magnitude