Ad
  • Custom User Avatar

    changed that test. i ran the full tests a bunch of time with the reference solution and the user solution using different order of operations, and tests passed consistently, so these problematic cases should be exceedingly rare.

  • Custom User Avatar

    Still got the same issue here in cpp

  • Custom User Avatar

    I think it also makes a difference if you calculate as w/(h*h) or w/h/h

    The test cases should not sit on floating point boundary.

  • Custom User Avatar

    Almost a year later, still the same issue.

  • Custom User Avatar

    And actually, the test is not even an edge-case which causes weird floating point rounding in typical implementations. The test-case is actually simply wrong:

    w = 86.7000000000000028421709430404007434844970703125
    h = 1.6999999999999999555910790149937383830547332763671875

    so w>86.7, h<1.7, so w/(h* h) > 86.7/(1.7^2) = 30. So Obese is actually correct, given the input.