Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar