// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class ULong2 {
    public static boolean GT1(long v1, long v2) {
        if(v1 > 0) {
            if(v2 > 0) {
                return (v1 > v2);
            } else {
                return false;
            }
        } else {
            if(v2 > 0) {
                return true;
            } else {
                return (v1 > v2);
            }
        }
    }
    public static boolean GT2(long l1, long l2) {
        if ((l1 >>> 1) != (l2 >>> 1))
            return (l1 >>> 1) > (l2 >>> 1);
        return (l1 & 1) > (l2 & 1);
    }
    private static final int N = 20000;
    public static void main(String[] args) {
        int n;
        long t1 = System.currentTimeMillis();
        n = 0;
        for(int i = -N; i < N; i++) {
            for(int j = -N; j < N; j++) {
                if(GT1(i,j)) n++;
            }
        }
        long t2 = System.currentTimeMillis();
        System.out.println(n + " : " + (t2-t1));
        long t3 = System.currentTimeMillis();
        n = 0;
        for(int i = -N; i < N; i++) {
            for(int j = -N; j < N; j++) {
                if(GT2(i,j)) n++;
            }
        }
        long t4 = System.currentTimeMillis();
        System.out.println(n + " : " + (t4 - t3));
    }
}
