Ad
  • Custom User Avatar

    The behavior of round () for floats can be surprising : for example , round ( 2.675 , 2 ) gives 2.67 instead of the expected 2.68 . This is not a bug : it ' sa result of the fact that most decimal fractions can ' t be represented exactly as a float . See Floating Point Arithmetic : Issues and Limitations for more information .

  • Custom User Avatar

    Well, round() can round the number down, e.g. round(1231.232) = 1231, however, ceil() returns always bigger number: ceil(1231.232) = 1232.

  • Default User Avatar

    This comment is hidden because it contains spoiler information about the solution