Hi everyone, The byte data type represents 8 bit integers that range from -128 to 127. The double precision floating point data type has 64 bits. The first is the sign bit.The next 8 bits hold the exponent and the final 55 bits hold the mantissa. If the exponent is only 8 bits does this mean that the number before the decimal place can only be between -128 and 127. Im sure it can be larger but i dont understand why?? Thanks, john
Michael Fitzmaurice
Ranch Hand
Joined: Aug 22, 2001
Posts: 168
posted
0
Hi John You seem to be confusing the way that the number is held in memory with the way that it appears on the screen. The mantissa and exponent are not the portions of the number before and after the decimal point. The following article should shed some light on this: http://www.javaworld.com/javaworld/jw-10-1996/jw-10-hood.html Hope this helps Michael ------------------ "One good thing about music - when it hits, you feel no pain" Bob Marley
"One good thing about music - when it hits, you feel no pain" <P>Bob Marley
Dave Vick
Ranch Hand
Joined: May 10, 2001
Posts: 3244
posted
0
John Actually your pretty close to the actual values it can be. For the whole ugly description check out the JLS Section 4.2.3 . For the normal 64 bit float it looks like the exponent can be in the range -149 to +104. My interpretation may be off though hope that helps
------------------ Dave Sun Certified Programmer for the Java� 2 Platform