Great! Thank you.
Fixed the description merge.
Thank you. There was some merge issue with the description so I had to fork it.
Solution is more-or-less translation from Coffee, so it's non-Go way.
Coffeescript translation ᕦò_óˇᕤ
Really? It's just chaining, and that should already be in every solution.
Wait .. it's not, and it's not. Well, different.
OK, y x = f x ^ g x => y' x = ( g' x * ln f x + g x * f' x * ln f x / f x ) * f x ^ g x. ( function application associative to the right, as not usual. )
y x = f x ^ g x => y' x = ( g' x * ln f x + g x * f' x * ln f x / f x ) * f x ^ g x
It's not simple, but I think it would simplify for cases like f x = C, f x = x, g x = C, g x = x. Takes some handling in the optimiser. OK, 1 kyu.
f x = C
f x = x
g x = C
g x = x
( There's a bug in there somewhere. And it takes quite some handling in the optimiser. :)
Didn't see your message before, sorry. Could you show me an example, please? I'm not following.
Great! Thank you for the C++ translation !
C++ translation published
The commutativity issue still persists. Either the description needs to be updated to specify the form of the result or all cases accepted.
"Just" the string message that wasn't updated with the actual value of the tets, sorry for this. ;)
Hi there I'm still failing on some random tests even tough the code should work. The proposed "correct" result can't be correct.
Example: diff (cos (* 52 x)) --> Expected: (* 3 (* 2 x)) or (* 6 x) which is incorrect
Edit: commutativity of multiplication is also still a problem
Edit2: Otherwise a really great Kata
I agree that the specification needs to be more explicit about what kind of simplifications are required minimally to pass the tests.
Thank you both.