Ad
  • Default User Avatar

    What are ways to address floating point issue? I believe I'm having a similar issue where my function passes the three initial tests but does not pass the overall round of testing in the attempt. At the moment i'm using round() in my function. Is there a more precise method to use? I tried using decimal but that seems to make my results further off from the desired results.

  • Custom User Avatar

    The 16 inch box is not evenly divisible by feet, so converting it from inches to feet will convert it from an integer to a float. That might give rise to floating point issues. It's also possible your logic and the floor division was wrong depending on how you implemented it even though it passed the initial tests.

    As for metric, I'm trying to be a pain with conversion here!