You are viewing a single comment's thread. Return to all comments →
why is
if(x>=-32768 && x<=32768)
Different from:
if(x >= -Math.pow(2, 15) && x <= Math.pow(2, 15) - 1)
I tried the first one since its the value given by java documentation but it doesn't work on the last two test cases. can anyone please tell me..
Seems like cookies are disabled on this browser, please enable them to open this website
Java Datatypes
You are viewing a single comment's thread. Return to all comments →
why is
Different from:
I tried the first one since its the value given by java documentation but it doesn't work on the last two test cases. can anyone please tell me..