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.
I refactored the test code a little and now it should work a tad better; you can still print partial solutions, but regrettably assert_equals on Ruby does not work that well with objects; try again and if you find it still to messy, I may change the check routines.
Yes expand(1, 5) is the same as expand(1, 6) (within the method that is used); same for other values. In so far Codewariors use the Taylor expansion there is no problem and nevertheless there you are right: I'll precise in the kata description and give a few references about Taylor expansion of exponential.
I thought Taylor expansion gives a reasonable good approximation, continued fractions are certainly better but less easy to manipulate, as already Taylor expansion has not a big success! Maybe you could write a kata with continued fractions.
I based the solution on the number of digits, another choice could have been to ask for a given epsilon approximation.
Anyway thanks for your feedback, I'll take it into good account.
Why that?