• ###### FArekkusucommented on "One-Semicolon Stream Zipping" kata

Added a test like you suggested.

• ###### monadiuscommented on "One-Semicolon Stream Zipping" kata

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

• ###### monadiuscommented on "One-Semicolon Stream Zipping" kata

I think it is possible to test if a solution is lazy enough.

• ###### monadiuscreated a suggestion for "Finding Derivatives" kata

The exponent computation in the function `prec` in Preloaded relies on a non-standard compiler extension:

"It's undefined behavior to read from the member of the union that wasn't most recently written. Many compilers implement, as a non-standard language extension, the ability to read inactive members of a union." (https://en.cppreference.com/w/cpp/language/union).

I recommend to compute the exponent with the `frexp` function.

• ###### monadiuscommented on "Finding Derivatives" kata

This happens because of floating-point underflow. Specifically, the derivative of `(18*57.2^x-x^x+81.9*x^5.2*x^62)^x` is a very small number which is computed as `0 + 0i` by the reference solution and as `-6.09095e-315 + 8.56785e-314i` by my solution. In general, both results are unreliable. Overflow and underflow should be avoided in all randomly generated subexpressions.

• ###### FArekkusucommented on "One-Semicolon Stream Zipping" kata

I've increased the number of iterations in the tests. Do you know some way to prevent such solutions from passing? I think it's impossible to restrict this since there will always be some upper bound of how many values can be consumed/tested before hitting the time limit.

• ###### monadiuscommented on "Positive Feedback Rating Codewars" kata

@Schulzkafer: it is up to you to decide whether to use the approximate equality or not. My position is that it should not be used. On the other hand, I am almost certain that you get more positive votes if you do use the approximate equality.

• ###### monadiuscommented on "Positive Feedback Rating Codewars" kata

It is possible to make tests stronger. But it is not a big issue if some solutions are not perfect for low level kata.

• ###### monadiuscommented on "Positive Feedback Rating Codewars" kata

There are no precision problems in this kata. All inputs and the output are integers (I assume that the kata models the real Codewars satisfaction rating which is displayed as an integer number). The specification is given in terms of real numbers. The floor function is well-defined for real numbers. An incorrect usage of floating-point arithmetic to approximate real-valued computations is not a kata issue. That's why the result should be compared without any error tolerance.

• ###### monadiusresolved an issue on "Positive Feedback Rating Codewars" kata

Inputs are integer numbers. Output is another integer. No floating-point operations are required so the output should not be compared with an error margin.

• ###### SunMastercommented on "Presents" c solution

You'll get a compiler warning when comparing the "int i" to "size_t arr_size".

Default int is signed, while size_t is unsigned. In practice it won't matter until the arrays get very large (not tried in this kata)

• ###### matthewmoppettcommented on "Escape!" python solution

I wonder if you're aware of the issue that Blind4Basics has raised for this kata?

rank suggestions need to be cleaned up before approval.

I'm not sure what it's about -- perhaps not everyone has given a suggested rank for this kata. Anyway, I thought that you might like to look into it if you want to get the kata out of beta.

• ###### DIST_12commented on "Presents" c solution

why are we using "size_t i" in for loop? can't we use "int i"?

• ###### vrprcommented on "Gravity Flip" python solution

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