IEEE 754 in Java


References

IEEE 754-1985

float

0 10000000 01011011111100001010100 2.718282e+00    E
0 10000000 10010010000111111011011 3.141593e+00    PI
0 00000000 00000000000000000000000 0.000000e+00    +.0f
1 00000000 00000000000000000000000 -0.000000e+00   -.0f
0 00000000 00000000000000000000001 1.401298e-45    Float.MIN_VALUE
0 00000001 00000000000000000000000 1.175494e-38    Float.MIN_NORMAL
0 11111110 11111111111111111111111 3.402823e+38    Float.MAX_VALUE
0 11111111 10000000000000000000000 NaN             Float.NaN
1 11111111 00000000000000000000000 -Infinity       Float.NEGATIVE_INFINITY
0 11111111 00000000000000000000000 Infinity        Float.POSITIVE_INFINITY

double

0 10000000000 0101101111110000101010001011000101000101011101101001 2.718282e+00    E
0 10000000000 1001001000011111101101010100010001000010110100011000 3.141593e+00    PI
0 00000000000 0000000000000000000000000000000000000000000000000000 0.000000e+00    +.0d
1 00000000000 0000000000000000000000000000000000000000000000000000 -0.000000e+00   -.0d
0 00000000000 0000000000000000000000000000000000000000000000000001 4.900000e-324   Double.MIN_VALUE
0 00000000001 0000000000000000000000000000000000000000000000000000 2.225074e-308   Double.MIN_NORMAL
0 11111111110 1111111111111111111111111111111111111111111111111111 1.797693e+308   Double.MAX_VALUE
0 11111111111 1000000000000000000000000000000000000000000000000000 NaN             Double.NaN
1 11111111111 0000000000000000000000000000000000000000000000000000 -Infinity       Double.NEGATIVE_INFINITY
0 11111111111 0000000000000000000000000000000000000000000000000000 Infinity        Double.POSITIVE_INFINITY
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s