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.
Haskell fork
Updated TypeScript version and fixed merge conflicts of TypeScript translation by deleted user.
This comment is hidden because it contains spoiler information about the solution
For me it shows the following.
result:[16.46672722167495, 32.9334544433499, 49.400181665024846, 65.8669088866998, 82.33363610837475, 98.80036333004969, 115.26709055172464, 131.73381777339958, 148.20054499507452, 164.66727221674947, 181.1339994384244, 197.60072666009935, 214.06745388177433, 230.53418110344927, 247.00090832512421, 263.46763554679916, 279.9343627684741, 296.40108999014905, 312.867817211824, 329.33454443349893, 345.8012716551739, 362.2679988768488, 378.73472609852377, 395.2014533201987, 411.6681805418737, 428.13490776354865, 444.6016349852236, 461.06836220689854, 477.5350894285735, 494.00181665024843, 510.4685438719234, 526.9352710935983, 543.4019983152733, 559.8687255369483]
expected:[16.46672722167495, 32.9334544433499, 49.40018166502485, 65.8669088866998, 82.33363610837475, 98.8003633300497, 115.26709055172466, 131.7338177733996, 148.20054499507455, 164.6672722167495, 181.13399943842447, 197.6007266600994, 214.06745388177436, 230.53418110344933, 247.00090832512427, 263.4676355467992, 279.93436276847416, 296.4010899901491, 312.86781721182405, 329.334544433499, 345.801271655174, 362.26799887684894, 378.7347260985239, 395.2014533201988, 411.66818054187377, 428.1349077635487, 444.60163498522365, 461.06836220689866, 477.5350894285736, 494.00181665024854, 510.4685438719235, 526.9352710935984, 543.4019983152734, 559.8687255369483]
Why does this not pass?
Haskell
The tests fail because of precision problems.
Please add a tolerance for the last decimals or specify how we should round it.
Illustration of the issue:
PHP :
'Expected' and 'Actual' values in testRandom() differ by 1 * 10^(-12).
For example,
Expected:
5 => -2397.3454670639853
Actual:
5 => -2397.3454670639858
3 and 8 at the end.
So improper testing it invalidates valid kata solutions.
This comment is hidden because it contains spoiler information about the solution
At least Ruby: missing tests like
(100, 0.01)
to make sure that solutions don't accumulate error. If these check weren't intended in the first place, the allowed error should be specified in the description.n
isint
in Java, while it's floting point in other languages, which makes possible some solution that would be incorrect otherwise.CoffeeScript, Crystal, Dart, Julia, and TypeScript translations kumited. Please review and approve