rational numbers and deal with the numerical precision errors in some way

Rational numbers need not have numerical imprecision.

This does require arbitrary precision integers though, which JS did not have at the time, and Rational is not a native JS datatype even now - though it can be constructed quite easily. But e.g. Haskell has exact Rationals natively.

Good points. I have included links for interpolation methods (although the Bernstein Form might not be relevant for this kata, I'll review that some more) and reworked my examples. What do you think of these updates?

This kata does combine two concepts, and perhaps it would be better to separate them into individual katas; namely, "interpolation" over an integer-valued polynomial, and "representation" of an integer-valued polynomial. In this case, the two concepts are closely tied, since (as described) a standard-form polynomial (like 0.5 x^{2} + 0.5 x) can be integer-valued without having integer coefficients, while a Binomial form polynomial is integer-valued if and only if it has integer coefficients.

I might be too late again in my day, but I totally miss how I could get the lowest degree curve passing for all the given points.

Not an iron rule, but most katas are assumed to teach people something (or to improve a certain knowledge) and in case are generously ranked for that purpose; but here the gap seems a tad too wide to jump, looking like a kata that is ok if and only if you are already pretty familiar with the subject, leaving new-comers with few tools to overcome the challenge.

Again, a few more links or a step-by-step example may enlighten the mass about it.

Thanks for the constant feed and improvement: kata definitely upvoted and, while at it, also translated into both Python and Ruby, if you want to approve them :)

Let me know (also posting down below here, but no problem in giving you my personal email) if you are going to produce more than one such kata :)!

Done.

Python 3 should be enabled.

Thank you

It's already explained just below.

This is an excellent solution. How did you come up with this logic? I don't understand the formula. Can you please explain me?

Where did you get this formula from please?

Rational numbers need not have numerical imprecision.

This does require arbitrary precision integers though, which JS did not have at the time, and

`Rational`

is not a native JS datatype even now - though it can be constructed quite easily. But e.g. Haskell has exact`Rational`

s natively.Haskell translation

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

Good points. I have included links for interpolation methods (although the Bernstein Form might not be relevant for this kata, I'll review that some more) and reworked my examples. What do you think of these updates?

This kata does combine two concepts, and perhaps it would be better to separate them into individual katas; namely, "interpolation" over an integer-valued polynomial, and "representation" of an integer-valued polynomial. In this case, the two concepts are closely tied, since (as described) a standard-form polynomial (like 0.5 x

^{2}+ 0.5 x) can be integer-valued without having integer coefficients, while a Binomial form polynomial is integer-valued if and only if it has integer coefficients.Ok, first feed, then :)

I might be too late again in my day, but I totally miss how I could get the lowest degree curve passing for all the given points.

Not an iron rule, but most katas are assumed to teach people something (or to improve a certain knowledge) and in case are generously ranked for that purpose; but here the gap seems a tad too wide to jump, looking like a kata that is ok if and only if you are already pretty familiar with the subject, leaving new-comers with few tools to overcome the challenge.

Again, a few more links or a step-by-step example may enlighten the mass about it.

[I like the style of your descriptions, though]

My pleasure and, if you wish, also consider increasing the number of tests, particularly the random ones :)

Slight modifications and approved.

The only other kata I have authored so far is here: http://www.codewars.com/kata/5674788cadb5889b69000045 and it uses the same math to create the polynomial representation that this kata uses for evaluation.

Thank you for your help in improving this one!

Thanks for the constant feed and improvement: kata definitely upvoted and, while at it, also translated into both Python and Ruby, if you want to approve them :)

Let me know (also posting down below here, but no problem in giving you my personal email) if you are going to produce more than one such kata :)!

## Loading more items...