fork(1) download
  1. importPackage(java.io);
  2. importPackage(java.lang);
  3.  
  4. var x = NaN
  5. System.out.println("______________x:"+x)
  6. System.out.println("kegdan code:"+ (x === 0 ? 0 : x / Math.abs(x)));
  7. System.out.println("bormand code:"+ (x < 0 ? -1 : x > 0 ? 1 : 0) );
  8. System.out.println("tangled code:"+ (x!=x ? x : (x>0)-(x<0)));
  9. System.out.println("another tangled code:"+ (((x>0)-(x<0))/(x==x)) );
  10. var x = 10000
  11. System.out.println("______________x:"+x)
  12. System.out.println("kegdan code:"+ (x === 0 ? 0 : x / Math.abs(x)));
  13. System.out.println("bormand code:"+ (x < 0 ? -1 : x > 0 ? 1 : 0) );
  14. System.out.println("tangled code:"+ (x!=x ? x : (x>0)-(x<0)));
  15. System.out.println("another tangled code:"+ (((x>0)-(x<0))/(x==x)) );
Success #stdin #stdout 0.43s 381952KB
stdin
Standard input is empty
stdout
______________x:NaN
kegdan code:NaN
bormand code:0
tangled code:NaN
another tangled code:NaN
______________x:10000
kegdan code:1
bormand code:1
tangled code:1
another tangled code:1