1.1 --- a/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Mon Feb 04 09:41:33 2013 +0100
1.2 +++ b/vm/src/test/java/org/apidesign/vm4brwsr/Numbers.java Tue Feb 05 16:40:01 2013 +0100
1.3 @@ -102,12 +102,20 @@
1.4 return (disX.readLong() * disY.readLong());
1.5 }
1.6
1.7 - public static long divL(long x, long y) {
1.8 - return (x / y);
1.9 + public static long divL(byte[] arrX, byte[] arrY) throws IOException {
1.10 + ByteArrayInputStream isX = new ByteArrayInputStream(arrX);
1.11 + DataInputStream disX = new DataInputStream(isX);
1.12 + ByteArrayInputStream isY = new ByteArrayInputStream(arrY);
1.13 + DataInputStream disY = new DataInputStream(isY);
1.14 + return (disX.readLong() / disY.readLong());
1.15 }
1.16
1.17 - public static long modL(long x, long y) {
1.18 - return (x % y);
1.19 + public static long modL(byte[] arrX, byte[] arrY) throws IOException {
1.20 + ByteArrayInputStream isX = new ByteArrayInputStream(arrX);
1.21 + DataInputStream disX = new DataInputStream(isX);
1.22 + ByteArrayInputStream isY = new ByteArrayInputStream(arrY);
1.23 + DataInputStream disY = new DataInputStream(isY);
1.24 + return (disX.readLong() % disY.readLong());
1.25 }
1.26
1.27 public static long shlL(byte[] arrValue, int nBits) throws IOException {