Ad
  • Custom User Avatar

    At first I thought this is about adding binary digits, it is the literal sum of 3 values

  • Default User Avatar

    ('3y36^2+2y36', 2.6); // is 10296 and not '25.48'
    ('-2000+0.5x2^3', 5.5); // is -1978 and not '-1916.81'
    If you have yo proove that YOUR answer is right so your description is, gently speaking, bad.

  • Default User Avatar

    Thanks!

  • Custom User Avatar

    At first I didn't understand either. You need to sum all the arguments (they are in decimal) and convert the result to a binary as an array.

  • Custom User Avatar

    better to return empty list in case of incorrect input, avoiding multiple output types

  • Default User Avatar

    So, what are we supposed to do?

  • Custom User Avatar
  • Custom User Avatar

    Well no, I think I got it... We are supposed to remove all numbers trailing the variable... What the point of that??? And not a word in the description about that weirdness?

  • Custom User Avatar

    Many tests are wrong:
    solvePolynomial('-y198854887455565', 1) should return '-1.00'

    solvePolynomial('-y 19 885488 74 555 65', 1) should return '-1.00'

    etc.

  • Default User Avatar

    There are hundreds of katas where half of the work is distinguish True/False from 0/1.
    Why fight against language (in python True == 1) in every little kata?

  • Custom User Avatar

    In js how this:
    -2000+0.5x2^3', 5.5 => '-1916.81'
    If I try to calculate all I'm getting is -1978. In order to get -1916.81 the x = 20.7975.

  • Default User Avatar

    Fixed.

    This killed almost all of the solutions.

  • Custom User Avatar

    Javascript defines both 0 and -0 values, but we do not distinguish these two. (see Examples)

    It seems that tests do distinguish between -0.00 and 0.00:

    solvePolynomial('-0.00003', 0) should return '0.00': expected '-0.00' to equal '0.00'
    

    For simplicity, the results must be formated using fixed-point notation of 2 digits.

    For simplicity of what, exactly? Do we really need all this rounding-based comparison in so many katas? Why, oh why?

  • Custom User Avatar

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

  • Custom User Avatar

    Resolved.

  • Loading more items...