summaryrefslogtreecommitdiff
path: root/src/jvm/clojure/lang/Numbers.java
diff options
context:
space:
mode:
authorRich Hickey <richhickey@gmail.com>2010-06-15 23:13:05 -0400
committerRich Hickey <richhickey@gmail.com>2010-06-15 23:13:05 -0400
commit6ab3e4cd672092823a04c944210a23c29142785d (patch)
treef54d634e3fb26e623e21692879f4cd94f261e7fb /src/jvm/clojure/lang/Numbers.java
parent8fbafa92faacb92a9bd49fa1e9b7e2c8c0747c07 (diff)
Unify numeric semantics around longs, with throw on overflow. Allow numeric literals to be primitive initializers. Canonicalize boxing of integers, if it fits in int, is Integer, else Long, thus primitive coercions can't be used to get particular boxed types, use Long/valueOf etc. Ask for BigIntegers if you want arbitrary precision, new literal number format - append 'N' for BigInteger. BigIntegers do not reduce automatically, are contagious. New particular names for unchecked ops - unchecked-xxx-int or unchecked-xxx-long. You should need far fewer hints for primitive perf, and avoid int casts and any casting of numeric literals, see:
http://gist.github.com/440102
Diffstat (limited to 'src/jvm/clojure/lang/Numbers.java')
-rw-r--r--src/jvm/clojure/lang/Numbers.java1258
1 files changed, 643 insertions, 615 deletions
diff --git a/src/jvm/clojure/lang/Numbers.java b/src/jvm/clojure/lang/Numbers.java
index bdbe1612..722791fd 100644
--- a/src/jvm/clojure/lang/Numbers.java
+++ b/src/jvm/clojure/lang/Numbers.java
@@ -151,7 +151,7 @@ static Number quotient(double n, double d){
double q = n / d;
if(q <= Long.MAX_VALUE && q >= Long.MIN_VALUE)
{
- return (long) q;
+ return box((long) q);
}
else
{ //bigint quotient
@@ -163,12 +163,12 @@ static Number remainder(double n, double d){
double q = n / d;
if(q <= Long.MAX_VALUE && q >= Long.MIN_VALUE)
{
- return (n - ((int) q) * d);
+ return Double.valueOf((n - ((int) q) * d));
}
else
{ //bigint quotient
Number bq = new BigDecimal(q).toBigInteger();
- return (n - bq.doubleValue() * d);
+ return Double.valueOf((n - bq.doubleValue() * d));
}
}
@@ -253,13 +253,32 @@ static public Number rationalize(Number x){
return x;
}
+static Number box(int val){
+ return Integer.valueOf(val);
+}
+
+static Number box(long val){
+ if(val >= Integer.MIN_VALUE && val <= Integer.MAX_VALUE)
+ return Integer.valueOf((int) val);
+ else
+ return Long.valueOf(val);
+}
+
+static Double box(double val){
+ return Double.valueOf(val);
+}
+
+static Double box(float val){
+ return Double.valueOf((double) val);
+}
+
static public Number reduceBigInteger(BigInteger val){
int bitLength = val.bitLength();
- if(bitLength < 32)
- return val.intValue();
- else
+// if(bitLength < 32)
+// return val.intValue();
+// else
if(bitLength < 64)
- return val.longValue();
+ return box(val.longValue());
else
return val;
}
@@ -269,7 +288,7 @@ static public Number divide(BigInteger n, BigInteger d){
throw new ArithmeticException("Divide by zero");
BigInteger gcd = n.gcd(d);
if(gcd.equals(BigInteger.ZERO))
- return 0;
+ return BigInteger.ZERO;
n = n.divide(gcd);
d = d.divide(gcd);
if(d.equals(BigInteger.ONE))
@@ -329,11 +348,13 @@ static public Number shiftLeft(Object x, Object n){
return bitOps(x).shiftLeft((Number)x, ((Number)n).intValue());
}
-static public int shiftLeft(int x, int n){
+static public int shiftLeftInt(int x, int n){
return x << n;
}
static public long shiftLeft(long x, int n){
+ if(n < 0)
+ return shiftRight(x, -n);
return x << n;
}
@@ -341,7 +362,13 @@ static public Number shiftRight(Object x, Object n){
return bitOps(x).shiftRight((Number)x, ((Number)n).intValue());
}
-static public int shiftRight(int x, int n){
+static public int shiftRightInt(int x, int n){
+ return x >> n;
+}
+
+static public long shiftRight(long x, int n){
+ if(n < 0)
+ return shiftLeft(x, -n);
return x >> n;
}
@@ -383,11 +410,11 @@ final static class LongOps implements Ops{
}
final public Number add(Number x, Number y){
- return Numbers.add(x.longValue(),y.longValue());
+ return box(Numbers.add(x.longValue(),y.longValue()));
}
final public Number multiply(Number x, Number y){
- return Numbers.multiply(x.longValue(),y.longValue());
+ return box(Numbers.multiply(x.longValue(), y.longValue()));
}
static long gcd(long u, long v){
@@ -405,12 +432,12 @@ final static class LongOps implements Ops{
long val = y.longValue();
long gcd = gcd(n, val);
if(gcd == 0)
- return 0;
+ return Integer.valueOf(0);
n = n / gcd;
long d = val / gcd;
if(d == 1)
- return n;
+ return box(n);
if(d < 0)
{
n = -n;
@@ -420,11 +447,11 @@ final static class LongOps implements Ops{
}
public Number quotient(Number x, Number y){
- return x.longValue() / y.longValue();
+ return box(x.longValue() / y.longValue());
}
public Number remainder(Number x, Number y){
- return x.longValue() % y.longValue();
+ return box(x.longValue() % y.longValue());
}
public boolean equiv(Number x, Number y){
@@ -438,17 +465,17 @@ final static class LongOps implements Ops{
//public Number subtract(Number x, Number y);
final public Number negate(Number x){
long val = x.longValue();
- return Numbers.minus(val);
+ return box(Numbers.minus(val));
}
public Number inc(Number x){
long val = x.longValue();
- return Numbers.inc(val);
+ return box(Numbers.inc(val));
}
public Number dec(Number x){
long val = x.longValue();
- return Numbers.dec(val);
+ return box(Numbers.dec(val));
}
}
@@ -490,15 +517,15 @@ final static class DoubleOps implements Ops{
}
final public Number add(Number x, Number y){
- return x.doubleValue() + y.doubleValue();
+ return Double.valueOf(x.doubleValue() + y.doubleValue());
}
final public Number multiply(Number x, Number y){
- return x.doubleValue() * y.doubleValue();
+ return Double.valueOf(x.doubleValue() * y.doubleValue());
}
public Number divide(Number x, Number y){
- return x.doubleValue() / y.doubleValue();
+ return Double.valueOf(x.doubleValue() / y.doubleValue());
}
public Number quotient(Number x, Number y){
@@ -519,15 +546,15 @@ final static class DoubleOps implements Ops{
//public Number subtract(Number x, Number y);
final public Number negate(Number x){
- return -x.doubleValue();
+ return Double.valueOf(-x.doubleValue());
}
public Number inc(Number x){
- return x.doubleValue() + 1;
+ return Double.valueOf(x.doubleValue() + 1);
}
public Number dec(Number x){
- return x.doubleValue() - 1;
+ return Double.valueOf(x.doubleValue() - 1);
}
}
@@ -846,42 +873,42 @@ final static class LongBitOps implements BitOps{
}
public Number not(Number x){
- return ~x.longValue();
+ return box(~x.longValue());
}
public Number and(Number x, Number y){
- return x.longValue() & y.longValue();
+ return box(x.longValue() & y.longValue());
}
public Number or(Number x, Number y){
- return x.longValue() | y.longValue();
+ return box(x.longValue() | y.longValue());
}
public Number xor(Number x, Number y){
- return x.longValue() ^ y.longValue();
+ return box(x.longValue() ^ y.longValue());
}
public Number andNot(Number x, Number y){
- return x.longValue() & ~y.longValue();
+ return box(x.longValue() & ~y.longValue());
}
public Number clearBit(Number x, int n){
if(n < 63)
- return x.longValue() & ~(1L << n);
+ return (box(x.longValue() & ~(1L << n)));
else
return toBigInteger(x).clearBit(n);
}
public Number setBit(Number x, int n){
if(n < 63)
- return x.longValue() | (1L << n);
+ return box(x.longValue() | (1L << n));
else
return toBigInteger(x).setBit(n);
}
public Number flipBit(Number x, int n){
if(n < 63)
- return x.longValue() ^ (1L << n);
+ return box(x.longValue() ^ (1L << n));
else
return toBigInteger(x).flipBit(n);
}
@@ -896,13 +923,13 @@ final static class LongBitOps implements BitOps{
public Number shiftLeft(Number x, int n){
if(n < 0)
return shiftRight(x, -n);
- return Numbers.shiftLeft(x.longValue(),n);
+ return box(Numbers.shiftLeft(x.longValue(), n));
}
public Number shiftRight(Number x, int n){
if(n < 0)
return shiftLeft(x, -n);
- return x.longValue() >> n;
+ return box(x.longValue() >> n);
}
}
@@ -1319,71 +1346,71 @@ static public Number num(Object x){
}
static public Number num(float x){
- return x;
+ return Double.valueOf(x);
}
-static public float add(float x, float y){
- return x + y;
-}
-
-static public float minus(float x, float y){
- return x - y;
-}
+//static public float add(float x, float y){
+// return x + y;
+//}
+//
+//static public float minus(float x, float y){
+// return x - y;
+//}
-static public float minus(float x){
- return -x;
-}
+//static public float minus(float x){
+// return -x;
+//}
-static public float inc(float x){
- return x + 1;
-}
+//static public float inc(float x){
+// return x + 1;
+//}
-static public float dec(float x){
- return x - 1;
-}
+//static public float dec(float x){
+// return x - 1;
+//}
-static public float multiply(float x, float y){
- return x * y;
-}
+//static public float multiply(float x, float y){
+// return x * y;
+//}
-static public float divide(float x, float y){
- return x / y;
-}
+//static public float divide(float x, float y){
+// return x / y;
+//}
-static public boolean equiv(float x, float y){
- return x == y;
-}
+//static public boolean equiv(float x, float y){
+// return x == y;
+//}
-static public boolean lt(float x, float y){
- return x < y;
-}
+//static public boolean lt(float x, float y){
+// return x < y;
+//}
-static public boolean lte(float x, float y){
- return x <= y;
-}
+//static public boolean lte(float x, float y){
+// return x <= y;
+//}
-static public boolean gt(float x, float y){
- return x > y;
-}
+//static public boolean gt(float x, float y){
+// return x > y;
+//}
-static public boolean gte(float x, float y){
- return x >= y;
-}
+//static public boolean gte(float x, float y){
+// return x >= y;
+//}
-static public boolean isPos(float x){
- return x > 0;
-}
+//static public boolean isPos(float x){
+// return x > 0;
+//}
-static public boolean isNeg(float x){
- return x < 0;
-}
+//static public boolean isNeg(float x){
+// return x < 0;
+//}
-static public boolean isZero(float x){
- return x == 0;
-}
+//static public boolean isZero(float x){
+// return x == 0;
+//}
static public Number num(double x){
- return x;
+ return Double.valueOf(x);
}
static public double add(double x, double y){
@@ -1451,168 +1478,168 @@ static int throwIntOverflow(){
}
static public Number num(int x){
- return x;
+ return Integer.valueOf(x);
}
-static public int unchecked_add(int x, int y){
+static public int unchecked_int_add(int x, int y){
return x + y;
}
-static public int unchecked_subtract(int x, int y){
+static public int unchecked_int_subtract(int x, int y){
return x - y;
}
-static public int unchecked_negate(int x){
+static public int unchecked_int_negate(int x){
return -x;
}
-static public int unchecked_inc(int x){
+static public int unchecked_int_inc(int x){
return x + 1;
}
-static public int unchecked_dec(int x){
+static public int unchecked_int_dec(int x){
return x - 1;
}
-static public int unchecked_multiply(int x, int y){
+static public int unchecked_int_multiply(int x, int y){
return x * y;
}
-static public int add(int x, int y){
- int ret = x + y;
- if ((ret ^ x) < 0 && (ret ^ y) < 0)
- return throwIntOverflow();
- return ret;
-}
+//static public int add(int x, int y){
+// int ret = x + y;
+// if ((ret ^ x) < 0 && (ret ^ y) < 0)
+// return throwIntOverflow();
+// return ret;
+//}
-static public int not(int x){
- return ~x;
-}
+//static public int not(int x){
+// return ~x;
+//}
static public long not(long x){
return ~x;
}
-static public int and(int x, int y){
- return x & y;
-}
+//static public int and(int x, int y){
+// return x & y;
+//}
static public long and(long x, long y){
return x & y;
}
-static public int or(int x, int y){
- return x | y;
-}
+//static public int or(int x, int y){
+// return x | y;
+//}
static public long or(long x, long y){
return x | y;
}
-static public int xor(int x, int y){
- return x ^ y;
-}
+//static public int xor(int x, int y){
+// return x ^ y;
+//}
static public long xor(long x, long y){
return x ^ y;
}
-static public int minus(int x, int y){
- int ret = x - y;
- if (((ret ^ x) < 0 && (ret ^ ~y) < 0))
- return throwIntOverflow();
- return ret;
-}
+//static public int minus(int x, int y){
+// int ret = x - y;
+// if (((ret ^ x) < 0 && (ret ^ ~y) < 0))
+// return throwIntOverflow();
+// return ret;
+//}
-static public int minus(int x){
- if(x == Integer.MIN_VALUE)
- return throwIntOverflow();
- return -x;
-}
+//static public int minus(int x){
+// if(x == Integer.MIN_VALUE)
+// return throwIntOverflow();
+// return -x;
+//}
-static public int inc(int x){
- if(x == Integer.MAX_VALUE)
- return throwIntOverflow();
- return x + 1;
-}
+//static public int inc(int x){
+// if(x == Integer.MAX_VALUE)
+// return throwIntOverflow();
+// return x + 1;
+//}
-static public int dec(int x){
- if(x == Integer.MIN_VALUE)
- return throwIntOverflow();
- return x - 1;
-}
+//static public int dec(int x){
+// if(x == Integer.MIN_VALUE)
+// return throwIntOverflow();
+// return x - 1;
+//}
-static public int multiply(int x, int y){
- int ret = x * y;
- if (y != 0 && ret/y != x)
- return throwIntOverflow();
- return ret;
-}
+//static public int multiply(int x, int y){
+// int ret = x * y;
+// if (y != 0 && ret/y != x)
+// return throwIntOverflow();
+// return ret;
+//}
-static public int unchecked_divide(int x, int y){
+static public int unchecked_int_divide(int x, int y){
return x / y;
}
-static public int unchecked_remainder(int x, int y){
+static public int unchecked_int_remainder(int x, int y){
return x % y;
}
-static public boolean equiv(int x, int y){
- return x == y;
-}
+//static public boolean equiv(int x, int y){
+// return x == y;
+//}
-static public boolean lt(int x, int y){
- return x < y;
-}
+//static public boolean lt(int x, int y){
+// return x < y;
+//}
-static public boolean lte(int x, int y){
- return x <= y;
-}
+//static public boolean lte(int x, int y){
+// return x <= y;
+//}
-static public boolean gt(int x, int y){
- return x > y;
-}
+//static public boolean gt(int x, int y){
+// return x > y;
+//}
-static public boolean gte(int x, int y){
- return x >= y;
-}
+//static public boolean gte(int x, int y){
+// return x >= y;
+//}
-static public boolean isPos(int x){
- return x > 0;
-}
+//static public boolean isPos(int x){
+// return x > 0;
+//}
-static public boolean isNeg(int x){
- return x < 0;
-}
+//static public boolean isNeg(int x){
+// return x < 0;
+//}
-static public boolean isZero(int x){
- return x == 0;
-}
+//static public boolean isZero(int x){
+// return x == 0;
+//}
static public Number num(long x){
- return x;
+ return box(x);
}
-static public long unchecked_add(long x, long y){
+static public long unchecked_long_add(long x, long y){
return x + y;
}
-static public long unchecked_subtract(long x, long y){
+static public long unchecked_long_subtract(long x, long y){
return x - y;
}
-static public long unchecked_negate(long x){
+static public long unchecked_long_negate(long x){
return -x;
}
-static public long unchecked_inc(long x){
+static public long unchecked_long_inc(long x){
return x + 1;
}
-static public long unchecked_dec(long x){
+static public long unchecked_long_dec(long x){
return x - 1;
}
-static public long unchecked_multiply(long x, long y){
+static public long unchecked_long_multiply(long x, long y){
return x * y;
}
@@ -1655,11 +1682,11 @@ static public long multiply(long x, long y){
return ret;
}
-static public long unchecked_divide(long x, long y){
+static public long unchecked_long_divide(long x, long y){
return x / y;
}
-static public long unchecked_remainder(long x, long y){
+static public long unchecked_long_remainder(long x, long y){
return x % y;
}
@@ -3412,46 +3439,46 @@ static public class L{
//overload resolution
+//*
+//static public Number add(int x, Object y){
+// return add((Object)x,y);
+//}
-static public Number add(int x, Object y){
- return add((Object)x,y);
-}
-
-static public Number add(Object x, int y){
- return add(x,(Object)y);
-}
+//static public Number add(Object x, int y){
+// return add(x,(Object)y);
+//}
-static public Number and(int x, Object y){
- return and((Object)x,y);
-}
+//static public Number and(int x, Object y){
+// return and((Object)x,y);
+//}
-static public Number and(Object x, int y){
- return and(x,(Object)y);
-}
+//static public Number and(Object x, int y){
+// return and(x,(Object)y);
+//}
-static public Number or(int x, Object y){
- return or((Object)x,y);
-}
+//static public Number or(int x, Object y){
+// return or((Object)x,y);
+//}
-static public Number or(Object x, int y){
- return or(x,(Object)y);
-}
+//static public Number or(Object x, int y){
+// return or(x,(Object)y);
+//}
-static public Number xor(int x, Object y){
- return xor((Object)x,y);
-}
+//static public Number xor(int x, Object y){
+// return xor((Object)x,y);
+//}
-static public Number xor(Object x, int y){
- return xor(x,(Object)y);
-}
+//static public Number xor(Object x, int y){
+// return xor(x,(Object)y);
+//}
-static public Number add(float x, Object y){
- return add((Object)x,y);
-}
+//static public Number add(float x, Object y){
+// return add((Object)x,y);
+//}
-static public Number add(Object x, float y){
- return add(x,(Object)y);
-}
+//static public Number add(Object x, float y){
+// return add(x,(Object)y);
+//}
static public Number add(long x, Object y){
return add((Object)x,y);
@@ -3469,21 +3496,21 @@ static public Number add(Object x, double y){
return add(x,(Object)y);
}
-static public Number minus(int x, Object y){
- return minus((Object)x,y);
-}
+//static public Number minus(int x, Object y){
+// return minus((Object)x,y);
+//}
-static public Number minus(Object x, int y){
- return minus(x,(Object)y);
-}
+//static public Number minus(Object x, int y){
+// return minus(x,(Object)y);
+//}
-static public Number minus(float x, Object y){
- return minus((Object)x,y);
-}
+//static public Number minus(float x, Object y){
+// return minus((Object)x,y);
+//}
-static public Number minus(Object x, float y){
- return minus(x,(Object)y);
-}
+//static public Number minus(Object x, float y){
+// return minus(x,(Object)y);
+//}
static public Number minus(long x, Object y){
return minus((Object)x,y);
@@ -3501,21 +3528,21 @@ static public Number minus(Object x, double y){
return minus(x,(Object)y);
}
-static public Number multiply(int x, Object y){
- return multiply((Object)x,y);
-}
+//static public Number multiply(int x, Object y){
+// return multiply((Object)x,y);
+//}
-static public Number multiply(Object x, int y){
- return multiply(x,(Object)y);
-}
+//static public Number multiply(Object x, int y){
+// return multiply(x,(Object)y);
+//}
-static public Number multiply(float x, Object y){
- return multiply((Object)x,y);
-}
+//static public Number multiply(float x, Object y){
+// return multiply((Object)x,y);
+//}
-static public Number multiply(Object x, float y){
- return multiply(x,(Object)y);
-}
+//static public Number multiply(Object x, float y){
+// return multiply(x,(Object)y);
+//}
static public Number multiply(long x, Object y){
return multiply((Object)x,y);
@@ -3533,21 +3560,21 @@ static public Number multiply(Object x, double y){
return multiply(x,(Object)y);
}
-static public Number divide(int x, Object y){
- return divide((Object)x,y);
-}
+//static public Number divide(int x, Object y){
+// return divide((Object)x,y);
+//}
-static public Number divide(Object x, int y){
- return divide(x,(Object)y);
-}
+//static public Number divide(Object x, int y){
+// return divide(x,(Object)y);
+//}
-static public Number divide(float x, Object y){
- return divide((Object)x,y);
-}
+//static public Number divide(float x, Object y){
+// return divide((Object)x,y);
+//}
-static public Number divide(Object x, float y){
- return divide(x,(Object)y);
-}
+//static public Number divide(Object x, float y){
+// return divide(x,(Object)y);
+//}
static public Number divide(long x, Object y){
return divide((Object)x,y);
@@ -3565,21 +3592,21 @@ static public Number divide(Object x, double y){
return divide(x,(Object)y);
}
-static public boolean lt(int x, Object y){
- return lt((Object)x,y);
-}
+//static public boolean lt(int x, Object y){
+// return lt((Object)x,y);
+//}
-static public boolean lt(Object x, int y){
- return lt(x,(Object)y);
-}
+//static public boolean lt(Object x, int y){
+// return lt(x,(Object)y);
+//}
-static public boolean lt(float x, Object y){
- return lt((Object)x,y);
-}
+//static public boolean lt(float x, Object y){
+// return lt((Object)x,y);
+//}
-static public boolean lt(Object x, float y){
- return lt(x,(Object)y);
-}
+//static public boolean lt(Object x, float y){
+// return lt(x,(Object)y);
+//}
static public boolean lt(long x, Object y){
return lt((Object)x,y);
@@ -3597,21 +3624,21 @@ static public boolean lt(Object x, double y){
return lt(x,(Object)y);
}
-static public boolean lte(int x, Object y){
- return lte((Object)x,y);
-}
+//static public boolean lte(int x, Object y){
+// return lte((Object)x,y);
+//}
-static public boolean lte(Object x, int y){
- return lte(x,(Object)y);
-}
+//static public boolean lte(Object x, int y){
+// return lte(x,(Object)y);
+//}
-static public boolean lte(float x, Object y){
- return lte((Object)x,y);
-}
+//static public boolean lte(float x, Object y){
+// return lte((Object)x,y);
+//}
-static public boolean lte(Object x, float y){
- return lte(x,(Object)y);
-}
+//static public boolean lte(Object x, float y){
+// return lte(x,(Object)y);
+//}
static public boolean lte(long x, Object y){
return lte((Object)x,y);
@@ -3629,21 +3656,21 @@ static public boolean lte(Object x, double y){
return lte(x,(Object)y);
}
-static public boolean gt(int x, Object y){
- return gt((Object)x,y);
-}
+//static public boolean gt(int x, Object y){
+// return gt((Object)x,y);
+//}
-static public boolean gt(Object x, int y){
- return gt(x,(Object)y);
-}
+//static public boolean gt(Object x, int y){
+// return gt(x,(Object)y);
+//}
-static public boolean gt(float x, Object y){
- return gt((Object)x,y);
-}
+//static public boolean gt(float x, Object y){
+// return gt((Object)x,y);
+//}
-static public boolean gt(Object x, float y){
- return gt(x,(Object)y);
-}
+//static public boolean gt(Object x, float y){
+// return gt(x,(Object)y);
+//}
static public boolean gt(long x, Object y){
return gt((Object)x,y);
@@ -3661,21 +3688,21 @@ static public boolean gt(Object x, double y){
return gt(x,(Object)y);
}
-static public boolean gte(int x, Object y){
- return gte((Object)x,y);
-}
+//static public boolean gte(int x, Object y){
+// return gte((Object)x,y);
+//}
-static public boolean gte(Object x, int y){
- return gte(x,(Object)y);
-}
+//static public boolean gte(Object x, int y){
+// return gte(x,(Object)y);
+//}
-static public boolean gte(float x, Object y){
- return gte((Object)x,y);
-}
+//static public boolean gte(float x, Object y){
+// return gte((Object)x,y);
+//}
-static public boolean gte(Object x, float y){
- return gte(x,(Object)y);
-}
+//static public boolean gte(Object x, float y){
+// return gte(x,(Object)y);
+//}
static public boolean gte(long x, Object y){
return gte((Object)x,y);
@@ -3694,21 +3721,21 @@ static public boolean gte(Object x, double y){
}
-static public boolean equiv(int x, Object y){
- return equiv((Object)x,y);
-}
+//static public boolean equiv(int x, Object y){
+// return equiv((Object)x,y);
+//}
-static public boolean equiv(Object x, int y){
- return equiv(x,(Object)y);
-}
+//static public boolean equiv(Object x, int y){
+// return equiv(x,(Object)y);
+//}
-static public boolean equiv(float x, Object y){
- return equiv((Object)x,y);
-}
+//static public boolean equiv(float x, Object y){
+// return equiv((Object)x,y);
+//}
-static public boolean equiv(Object x, float y){
- return equiv(x,(Object)y);
-}
+//static public boolean equiv(Object x, float y){
+// return equiv(x,(Object)y);
+//}
static public boolean equiv(long x, Object y){
return equiv((Object)x,y);
@@ -3726,430 +3753,431 @@ static public boolean equiv(Object x, double y){
return equiv(x,(Object)y);
}
+//*/
-static public float add(int x, float y){
- return add((float)x,y);
-}
+//static public float add(int x, float y){
+// return add((float)x,y);
+//}
-static public float add(float x, int y){
- return add(x,(float)y);
-}
+//static public float add(float x, int y){
+// return add(x,(float)y);
+//}
-static public double add(int x, double y){
- return add((double)x,y);
-}
+//static public double add(int x, double y){
+// return add((double)x,y);
+//}
-static public double add(double x, int y){
- return add(x,(double)y);
-}
+//static public double add(double x, int y){
+// return add(x,(double)y);
+//}
-static public long add(int x, long y){
- return add((long)x,y);
-}
+//static public long add(int x, long y){
+// return add((long)x,y);
+//}
-static public long add(long x, int y){
- return add(x,(long)y);
-}
+//static public long add(long x, int y){
+// return add(x,(long)y);
+//}
-static public float add(long x, float y){
- return add((float)x,y);
-}
+//static public float add(long x, float y){
+// return add((float)x,y);
+//}
-static public float add(float x, long y){
- return add(x,(float)y);
-}
+//static public float add(float x, long y){
+// return add(x,(float)y);
+//}
-static public double add(long x, double y){
- return add((double)x,y);
-}
+//static public double add(long x, double y){
+// return add((double)x,y);
+//}
-static public double add(double x, long y){
- return add(x,(double)y);
-}
+//static public double add(double x, long y){
+// return add(x,(double)y);
+//}
-static public double add(float x, double y){
- return add((double)x,y);
-}
+//static public double add(float x, double y){
+// return add((double)x,y);
+//}
-static public double add(double x, float y){
- return add(x,(double)y);
-}
+//static public double add(double x, float y){
+// return add(x,(double)y);
+//}
-static public float minus(int x, float y){
- return minus((float)x,y);
-}
+//static public float minus(int x, float y){
+// return minus((float)x,y);
+//}
-static public float minus(float x, int y){
- return minus(x,(float)y);
-}
+//static public float minus(float x, int y){
+// return minus(x,(float)y);
+//}
-static public double minus(int x, double y){
- return minus((double)x,y);
-}
+//static public double minus(int x, double y){
+// return minus((double)x,y);
+//}
-static public double minus(double x, int y){
- return minus(x,(double)y);
-}
+//static public double minus(double x, int y){
+// return minus(x,(double)y);
+//}
-static public long minus(int x, long y){
- return minus((long)x,y);
-}
+//static public long minus(int x, long y){
+// return minus((long)x,y);
+//}
-static public long minus(long x, int y){
- return minus(x,(long)y);
-}
+//static public long minus(long x, int y){
+// return minus(x,(long)y);
+//}
-static public float minus(long x, float y){
- return minus((float)x,y);
-}
+//static public float minus(long x, float y){
+// return minus((float)x,y);
+//}
-static public float minus(float x, long y){
- return minus(x,(float)y);
-}
+//static public float minus(float x, long y){
+// return minus(x,(float)y);
+//}
-static public double minus(long x, double y){
- return minus((double)x,y);
-}
+//static public double minus(long x, double y){
+// return minus((double)x,y);
+//}
-static public double minus(double x, long y){
- return minus(x,(double)y);
-}
+//static public double minus(double x, long y){
+// return minus(x,(double)y);
+//}
-static public double minus(float x, double y){
- return minus((double)x,y);
-}
+//static public double minus(float x, double y){
+// return minus((double)x,y);
+//}
-static public double minus(double x, float y){
- return minus(x,(double)y);
-}
+//static public double minus(double x, float y){
+// return minus(x,(double)y);
+//}
-static public float multiply(int x, float y){
- return multiply((float)x,y);
-}
+//static public float multiply(int x, float y){
+// return multiply((float)x,y);
+//}
-static public float multiply(float x, int y){
- return multiply(x,(float)y);
-}
+//static public float multiply(float x, int y){
+// return multiply(x,(float)y);
+//}
-static public double multiply(int x, double y){
- return multiply((double)x,y);
-}
+//static public double multiply(int x, double y){
+// return multiply((double)x,y);
+//}
-static public double multiply(double x, int y){
- return multiply(x,(double)y);
-}
+//static public double multiply(double x, int y){
+// return multiply(x,(double)y);
+//}
-static public long multiply(int x, long y){
- return multiply((long)x,y);
-}
+//static public long multiply(int x, long y){
+// return multiply((long)x,y);
+//}
-static public long multiply(long x, int y){
- return multiply(x,(long)y);
-}
+//static public long multiply(long x, int y){
+// return multiply(x,(long)y);
+//}
-static public float multiply(long x, float y){
- return multiply((float)x,y);
-}
+//static public float multiply(long x, float y){
+// return multiply((float)x,y);
+//}
-static public float multiply(float x, long y){
- return multiply(x,(float)y);
-}
+//static public float multiply(float x, long y){
+// return multiply(x,(float)y);
+//}
-static public double multiply(long x, double y){
- return multiply((double)x,y);
-}
+//static public double multiply(long x, double y){
+// return multiply((double)x,y);
+//}
-static public double multiply(double x, long y){
- return multiply(x,(double)y);
-}
+//static public double multiply(double x, long y){
+// return multiply(x,(double)y);
+//}
-static public double multiply(float x, double y){
- return multiply((double)x,y);
-}
+//static public double multiply(float x, double y){
+// return multiply((double)x,y);
+//}
-static public double multiply(double x, float y){
- return multiply(x,(double)y);
-}
+//static public double multiply(double x, float y){
+// return multiply(x,(double)y);
+//}