Ad
  • Custom User Avatar

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

  • Default User Avatar
  • Default User Avatar

    I have the same issue with python. I am guessing there has to be a way to not run into precision issues.

  • Custom User Avatar

    I'm a bit confused about some precision issues I'm having (using the Ruby version).

    I've implemented a solution, but when I run the Sample Test I get an extra value which causes the test to fail. For n=0.66

    Expected: ["1/2", "1/7", "1/59", "1/5163", "1/53307975"],
    instead got: ["1/2", "1/7", "1/59", "1/5163", "1/53307975", "1/6004799503160662"]

    If I put an artificial limit on denominator depth e.g. 6004799503160662-1, I can pass the Sample test to run the full Test Suite; but it will fail due to insufficient precision.

    Expected: ["1/2", "1/5", "1/61", "1/9090", "1/105529529", "1/30625323994615534", "1/3751641879100695842954773901805090"],
    instead got: ["1/2", "1/5", "1/61", "1/9090", "1/105529528"]

    Is my/the kata's sample test answers wrong?

    Any help would be appreciated!