import static java.lang.System.out;

public class DoubleFloatPrecision
{
  public static void main( String[] args )
  {
    double x = 123456.789;
    float  y = 123456.789f;

    out.printf( "%x%n" , Double.doubleToLongBits(x) ); // 40fe240c9fbe76c9
    out.printf( "%x%n" , Float.floatToIntBits(y) );    // 47f12065

    out.println( Long.toBinaryString(Double.doubleToLongBits(x)) );
    out.println( Integer.toBinaryString(Float.floatToIntBits(y)) );
  }
}
