jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes What are the possible value for Integers in IEEE? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "What are the possible value for Integers in IEEE?" Watch "What are the possible value for Integers in IEEE?" New topic
Author

What are the possible value for Integers in IEEE?

sabari nath
Greenhorn

Joined: Aug 31, 2009
Posts: 3


Hi to all,
what are the possible value for integers in IEEE?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41108
    
  45
What do you mean by "in IEEE"? I don't think the IEEE ever defined a format for integer numbers; IEEE-754 covers floating-point numbers only.

For integers represented in 2's complement format (the format commonly used today), the maximum values are

-2^31 to 2^32-1 (for 32 bit numbers)

-2^63 to 2^63-1 (for 64 bit numbers)


Ping & DNS - my free Android networking tools app
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Integers (byte, short, int, long, char) are stored in [url=http://en.wikipedia.org/wiki/Two's_complement]two's complement[/url] format.

Floating-point numbers (float, double) are stored in IEEE-754 format, float is a single precision and double is a double precision number.

Click the links for details.

Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
Consider Paul's rocket mass heater.
 
subject: What are the possible value for Integers in IEEE?
 
Similar Threads
Struts 2 property tag
web service low response
Clear Forms
What Is RowSet Explain With Example.
strictfp