Ad
  • Custom User Avatar

    Haskell fork

    • Fixed the issue of checking lists for approximate equality.
  • Custom User Avatar

    Updated TypeScript version and fixed merge conflicts of TypeScript translation by deleted user.

  • Custom User Avatar

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

  • Custom User Avatar

    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?

  • Custom User Avatar

    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:

    Falsifiable (after 11 tests and 1 shrink): 
    expected: [89.63306372438379,179.26612744876758,268.8991911731514,358.53225489753515]
    but got:  [89.63306372438379,179.26612744876758,268.8991911731514,358.5322548975352]
    
  • Custom User Avatar

    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.

  • Default User Avatar

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

  • Default User Avatar

    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.

  • Default User Avatar

    n is int in Java, while it's floting point in other languages, which makes possible some solution that would be incorrect otherwise.

  • Custom User Avatar

    CoffeeScript, Crystal, Dart, Julia, and TypeScript translations kumited. Please review and approve :smile: