Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Python translation
You don't say how the sum of descents is actually supposed to be caluculated.
Also, no random tests.
The initial solution is a mess. And the decision to pass an object to the function instead of plain values makes no sense.
Duplicate of all the other "convert a math function into a programming function" katas.
expected NaN to be close to NaN +/- 0.01