What's the point of putting this task in JS Checkio? In Python it is possible to solve, but JS doesn't provide precise enough calculations to solve this task, f.e. in one of the tests I have 1/17. Right result is:
0.(0588235294117647)
But when I divide it in JS, I get:
0.05882352941176470506601248189326724968851...
Precise calculator from internet gives me:
0.05882352941176470588235294117647058823529411764705882352941176470588235294117647...
So I think JavaScript is a problem because it doesn't support any more precise calculations than those standard ones on IEEE-754 as far as I know...
Created at: Sept. 14, 2018, 2:34 a.m.; Updated at: Sept. 14, 2018, 3 p.m.
The question is resolved.