Ad
  • Default User Avatar

    The random tests for C++ seem to be broken in a major way, as they do not seem to be taking precision issues into account at all. I tried solving it by converting the input to double and then calculating everything using doubles - works for the public tests, the random tests fail randomly. I also tried solving it by converting intermediate results back to string, that seems to be nearer to the results which are expected, but will still fail randomly. That's too bad, since it's actually quite an interesting kata.

  • Custom User Avatar

    It is not mandatory to handle negative numbers using a specific unary operator, there is a variety of ways to do it. And that numbers in the expression can be negative is clearly implied by Number may be both whole numbers and/or decimal numbers. The same goes for the returned result. Whole or decimal means they can be either positive, negative or zero. Handling properly - as a binary operator or as a sign of negative number is obviously part of the task. Moreover, I've just checked several languages and they all include fixed examples with negative numbers, I don't understand your last affirmation. Not a kata issue.

  • Custom User Avatar

    The "Operators" section only mentions 4 binary operators to implement (addition, subtraction, multiplication, division) but doesn't mention a unary operator (negation). It is only casually implied in the "whitespace" section when it talks about "negating parentheses".

    The public tests also don't contain any case that uses this unary operator.

  • Custom User Avatar

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

  • Custom User Avatar

    If the function is not gonna be tested against decimal numbers,
    it should be explicitely stated in the kata's description.

    Also, I don't find it correct to divide tests in these stages.
    It gives too much information, especially when you add in
    OverZealous' tests (which would fall into a "special" stage).

    IMO you should divide them into "present fits" and "present doesn't fit".

  • Custom User Avatar

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

  • Custom User Avatar

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