The output of the following code:
System.out.println( Long.toBinaryString( Double.doubleToRawLongBits( 1 ) ) ); System.out.println( Long.toBinaryString( Double.doubleToRawLongBits( 1024 ) ) );
There is:
11111111110000000000000000000000000000000000000000000000000000 100000010010000000000000000000000000000000000000000000000000000
Why does this code print another bit for the value 1024?
source share