6 kyu

Expressive Objects

Description
Loading description...
Fundamentals
  • Please sign in or sign up to leave a comment.
  • behan Avatar

    For those who will try) dont forget about the order!

  • ejini战神 Avatar
    • The fixed tests should provide examples where the order of four operations are shuffled

    • The example test should be explained further by listing out each operations step-wise

    • Node 12 should be enabled (Refer this and this for more info)

  • gabbek Avatar

    Very interesting kata, thank you! :)

  • wthit56 Avatar

    I can't get past the rounding errors in the randomised tests. Could you add some tolerance for those? (I pass all the hand-coded tests, by the way.)

    • joh_pot Avatar

      There shouldnt be any rounding errors. My solution doesnt do any rounding. Could you post your code?

    • joh_pot Avatar

      Enough users have passed this kata to show that there is no rounding problem. Have a look at the order that you evaluate the final operation using the root key. The random tests left and right operands don't start with add first, so maybe that is your issue.

      Issue marked resolved by joh_pot 10 years ago
    • wthit56 Avatar

      I mean slight variations in the way a solution is implemented could cause tiny differences in the resulting number, because of rounding errors inherent in any operation involving big/small numbers. My solution is of by maybe 0.01%, that kind of thing, simply because I chose to implement it in a different way to the author's solution. This can be "fixed" by allowing for that in the tests themselves.

      What do you mean by "the order that you evaluate the final operation using the root key"? I am evaluating left and right, then doing left op right, and returning that result.

      Code to follow...

    • wthit56 Avatar

      This comment has been hidden.

    • joh_pot Avatar

      This comment has been hidden.

    • user5504489 Avatar

      Let me see,I have same problem.

    • ejini战神 Avatar

      This comment has been hidden.