Two Laptop Bag*
The moose likes Beginning Java and the fly likes *** HOW is the memory allocated for a floating point literal..??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "*** HOW is the memory allocated for a floating point literal..???" Watch "*** HOW is the memory allocated for a floating point literal..???" New topic
Author

*** HOW is the memory allocated for a floating point literal..???

Ramalingam Vijayakumar
Greenhorn

Joined: Aug 26, 2001
Posts: 19
Hi all,
I have a big problem..
can anybody explain me how is the memory allocated for a floating point literal......
thanx in advance,
bye
ram.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Memory allocation is an operating system specific thing. Why do you NEED to know?


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Of course we know that it is 32 bits.
basic
boolean
byte
SCrunched = 16
short
char
IFfy = 32
integer
float
Loaded = 64
long
double

[This message has been edited by Cindy Glass (edited September 04, 2001).]
Jack Wiesenthaler
Ranch Hand

Joined: Jul 26, 2001
Posts: 75
Here are the lines from jni.h -->
typedef float jfloat;
So, I would imagine the memory representation is that the most significant bit is the sign bit followed by the 31 bits for the number.
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
I am still confused as to WHY you need to know the details of the implementation.
I still do not understand what problem that you are having.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: *** HOW is the memory allocated for a floating point literal..???
 
Similar Threads
Pool of Interns Memory(String literals)
Representing floating point literals in hexidecimal format
Surprising output,can't understood.
Double literal
Basic Question