Ad
  • Custom User Avatar

    Comparing floating point by adding an absolute epsilon to one side makes no sense at all.

    If everything always have at most 1 decimal place, either represent it as int 10 times the actual value, or use Decimal. Deal with the floating point errors correctly.

  • Custom User Avatar

    tests are now wrong:

    compound: FW ; energy: 25.0
    needed: 25.0
    expected:<false> but was:<true>
    

    this should ofc be true!

    And your internal solution is wrong too: you have to use >= not > (even if it's unlikely that it does a difference), and the test for negative values will not take into account the EPSILON, so this is not good too.

  • Custom User Avatar

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