+0  
 
0
444
1
avatar

In Java, math does weird things.... When I have the number 1.488113760197957E109 (pretty large one) it converts it to 2147483647 when I cast it to an integer. Any help?

 Dec 22, 2014

Best Answer 

 #1
avatar+23246 
+5

My guess -- emphasis upon 'guess' -- is that you are attempting to place a number that is way too large for the integer location and so the process used to change from a floating point to an integer results into a nonsensical answer.

 Dec 22, 2014
 #1
avatar+23246 
+5
Best Answer

My guess -- emphasis upon 'guess' -- is that you are attempting to place a number that is way too large for the integer location and so the process used to change from a floating point to an integer results into a nonsensical answer.

geno3141 Dec 22, 2014

3 Online Users

avatar
avatar
avatar