Ad
  • Custom User Avatar

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

  • Custom User Avatar

    Puzzling out leading-0 edge cases was interesting.

  • Custom User Avatar

    Cool concept, tests are annoying though.
    I don't like that certain simplifications are required,
    such as tan(x)' equaling 1 + tan^2(x) rather than sec^2(x).
    Also (* x x) is rejected because of (^ x 2).

    More nitpicky:
    f(x)^g(x) => (g'(x)ln(f(x))+g(x)f'(x)/f(x))(f(x)^g(x)) is the general form (which works for monomials as well)
    but I needed to hardcode in the specific monomial form to pass some tests.

    That may be an interesting problem on its own:
    Check if two functions that only use: constants 'x' + - * / ^ cos sin tan exp ln
    are equal.
    Though idk if that's even possible/decidable.