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.
Okay, hopefully I finally fixed this issue.
About the overflow thing: the marging of error is quite huge actually, so the rule of thumb is if WolframAlpha returns the expected result which is between 10^-300 and 10^300, your soulution should be able to compute it too. Also, when designing this kata, obviosly, I was using WA's results as the refference, so if tests expected result and WA's result don't match, I'd be very grateful if you tell me.
approved
Approved by someone
Do you have a progress with approving?
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 as0 + 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.Brilliant news! My first approved
Okay, hopefully I finally fixed this issue.
About the overflow thing: the marging of error is quite huge actually, so the rule of thumb is if WolframAlpha returns the expected result which is between
10^-300
and10^300
, your soulution should be able to compute it too. Also, when designing this kata, obviosly, I was using WA's results as the refference, so if tests expected result and WA's result don't match, I'd be very grateful if you tell me.Can't give clues, but probably?..
This particular test case shouldn't even appear, seems like I missed something. I'll fix it soon.
?
Hi, can someone approve this?
Approved
.
@C-V: did you fix the C++ translation? (see issue above)
Loading more items...