 |
AppletTalk.com Java discussions newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
My full name Guest
|
Posted: Thu Nov 06, 2003 10:20 pm Post subject: Limits of float and double ? |
|
|
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.
|
|
| Back to top |
|
 |
Roedy Green Guest
|
Posted: Fri Nov 07, 2003 3:01 am Post subject: Re: Limits of float and double ? |
|
|
On Thu, 6 Nov 2003 22:20:36 +0000 (UTC), My full name <none (AT) email (DOT) com>
wrote or quoted :
| Quote: | 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.
|
|
| Back to top |
|
 |
Michael Amling Guest
|
Posted: Fri Nov 07, 2003 4:03 pm Post subject: Re: Limits of float and double ? |
|
|
My full name wrote:
| Quote: | 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
|
|
| Back to top |
|
 |
My full name Guest
|
Posted: Sat Nov 08, 2003 12:04 am Post subject: Re: Limits of float and double ? |
|
|
Thanks to both of you
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|