Ad
  • Default User Avatar

    This is a big deal: without negative numbers (or unary minus), one can use a much, much simpler parser.

  • Default User Avatar

    The tests reject correct derivative forms such as (- 0 (sin x)) for the derivative of (cos x), or (^ (cos x) -2) for the derivative of (tan x). Similar problems arise from a choice of ordering of terms in the product when taking the derivatives of exp, sin, cos etc.

    The expected forms should be stated explicitly, or there should be a set of canonical simplifications that the solutions and tests can both apply in order to validate the results. Generally, this is going to be 'hard', especially for
    trigonometric identities.

  • Default User Avatar

    Made a new solution based on this one which fixed up the untidy std::string reference/initialization on solve_state - which of course I only noticed after submitting.

  • Default User Avatar

    Doesn't this have a problem with e.g. v = {3, 4}; s = {5, 0}?