Ad
  • Custom User Avatar

    Inexact floating point representations can result in different outcomes for different expressions/evaluation order.

  • Custom User Avatar

    Floating-point rounding errors.

    w/(h*h) first multiplies h and then divides w.
    w/h/h first divides w and then divides it again.

    The different setup of the operations can introduce little discrepancies that mess with direct floating-point comparisons.

  • Custom User Avatar

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