Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Virtual Machine / November 2003

Tip: Looking for answers? Try searching our database.

Limits of float and double ?

Thread view: 
My full name - 06 Nov 2003 22:20 GMT
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
Thanks to both of you :)


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.