Ad
  • Custom User Avatar

    Oh, thank you for noticing! I didn't think about it in this way

  • Custom User Avatar

    I try to solve the problem using C++ and keep getting results like that (in Random_tests):

    Expected: equal to -116.36 (+/- 1e-06)
    Actual: -116.183
    

    And I keep thinking this is because of my misunderstading of %-operator. What it supposed to do in case of floating-point numbers? E.g. what is the value of 9.7 % 2.3? Is it like 10 % 2 or 9 % 2. And what is value of 7.5 % -3?