well, i guess at least they bothered to make -0 = 0 :P
Type: Posts; User: helloworld922
well, i guess at least they bothered to make -0 = 0 :P
I was testing my parser with fairly random expressions to see if it was correct. When this spit out -0, i did a few tests in java itself to see what java did.
I expected it to be positive 0.
Don't know if anyone's tried this, but:
System.out.println((0*3*Math.sin(4)));
output:
even if you set it to a double variable: