| Author |
float binary makeup
|
jay vas
Ranch Hand
Joined: Aug 30, 2005
Posts: 407
|
|
Hi guys , Im trying to figure out how java floats are stored in binary.
The floatToRawIntBits method is supposed to yield an integer that can be masked
to reveal the underlying float representation in terms of (1) exponent and a (2) significand...
However, when i run the following code (to print exponent and significand for numbers 1 through 10) ....
I get some very strange looking binary numbers ... the output is below
Can somebody explain this ?
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12907
|
|
|
The format that Java uses is the single-precision (binary32) format of the IEEE-754 standard.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: float binary makeup
|
|
|