Hi,
I know that the limits of
- byte goes from -2^7 to 2^7-1
- char goes from 0 to 2^16
- int goes from -2^31 to 2^31-1
But what about float and double ?
Thanks in advance.
Roedy Green - 07 Nov 2003 03:01 GMT
>I know that the limits of
>- byte goes from -2^7 to 2^7-1
>- char goes from 0 to 2^16
>- int goes from -2^31 to 2^31-1
>
>But what about float and double ?
SEE http://mindprod.com/jgloss/primitive.html
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
Michael Amling - 07 Nov 2003 16:03 GMT
> I know that the limits of
> - byte goes from -2^7 to 2^7-1
> - char goes from 0 to 2^16
> - int goes from -2^31 to 2^31-1
>
> But what about float and double ?
Pretty much -Double.MAX_VALUE to Double.MAX_VALUE and
-Float.MAX_VALUE to Float.MAX_VALUE, but no closer to zero than
approximately Double.MIN_VALUE and Float.MIN_VALUE.
Double.MAX_VALUE is 1.7976931348623157E308
Float.MAX_VALUE is 3.4028235E38
Double.MIN_VALUE is 4.9E-324
Float.MIN_VALUE is 1.4E-45
--Mike Amling
My full name - 08 Nov 2003 00:04 GMT