Ad
  • Default User Avatar

    Thanks for pointing out truncate vs rounding, g964!

    bkaes, I'm going to think about what you said...

  • Custom User Avatar

    I'm going to repeat myself, but those questions wouldn't have arised if you

    • either used a relative error check instead of an equality check or
    • truncated the solution in the tests yourself.

    (By the way truncating a floating point number to a certain number of decimal places doesn't make sense for large floating point numbers, e.g. 12345678912345e-5, something you should keep in mind.)

  • Default User Avatar

    The description says:

    going(n) will return "result" truncated to 6 decimal places.

    It's said truncated, not rounded...

  • Custom User Avatar

    Hi guys, I have a problem trying to solve this for the submission cases in Python.

    For the third test case,after rounding, this is the response I get:
    1.146652 should equal 1.146651

    However, when I print out the float prior to rounding, I see that it is 1.14665178571, which, to my understanding, means that the answer should be 1.146652 instead of 1.146651...

    Where am I going wrong??