diff options
| author | Aaron M. Renn <arenn@urbanophile.com> | 1999-02-01 03:31:40 +0000 |
|---|---|---|
| committer | Aaron M. Renn <arenn@urbanophile.com> | 1999-02-01 03:31:40 +0000 |
| commit | e68b7b1d94c0b742f99c44cd9b01a9cba031abd5 (patch) | |
| tree | 6d6ec41ae198e3a3556d2d68bdc608bd88f27de9 /java/math/BigInteger.java | |
| parent | 0d65125fdba822c894dce271e7b7e68f728c7c52 (diff) | |
| download | classpath-e68b7b1d94c0b742f99c44cd9b01a9cba031abd5.tar.gz | |
Add substract method
Diffstat (limited to 'java/math/BigInteger.java')
| -rw-r--r-- | java/math/BigInteger.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/java/math/BigInteger.java b/java/math/BigInteger.java index 3833cb59d..8103ee135 100644 --- a/java/math/BigInteger.java +++ b/java/math/BigInteger.java @@ -39,8 +39,8 @@ public class BigInteger implements Comparable { while (i < buf.length) if ((buf[i++] = Character.forDigit(Character.digit(str.charAt(i), radix), radix)) - == \u0000) - throw new NumberFormatException(str " not valid in radix " + radix); + == '\u0000') + throw new NumberFormatException(str + " not valid in radix " + radix); return new String(buf); } @@ -156,6 +156,7 @@ public class BigInteger implements Comparable { native public boolean isProbablePrime(int certainty); native public BigInteger negate(); + native public BigInteger subtract(BigInteger val); native public int compareTo(BigInteger val); public int compareTo(Object o) throws ClassCastException { return compareTo((BigInteger)o); |
