Help for this page

Select Code to Download


  1. or download this
    printf "%.3f => %.2f\n", 1.023, 1.023;
    printf "%.3f => %.2f\n", 1.026, 1.026;
    
    #prints
    1.023 => 1.02
    1.026 => 1.03
    
  2. or download this
    printf "%.5f => %.2f\n", 1.025, 1.025;
    
    # prints instead of the correct 1.03
    1.025 => 1.02
    
  3. or download this
    printf "%.5f => %.2f\n", 1.025+1e-10, 1.025+1e-10;