Adds code to get the Scala REPL working

This commit is contained in:
Simon Ochsenreither
2013-01-30 04:21:11 +01:00
parent 0c5471d25e
commit b1eb4b9718
7 changed files with 213 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (c) 2008-2010, Avian Contributors
/* Copyright (c) 2008-2013, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
@ -126,6 +126,12 @@ public final class Long extends Number implements Comparable<Long> {
return (double) value;
}
public static int signum(long v) {
if (v == 0) return 0;
else if (v > 0) return 1;
else return -1;
}
private static long pow(long a, long b) {
long c = 1;
for (int i = 0; i < b; ++i) c *= a;