How do I write this equation in Python?
<p><a href="https://i.stack.imgur.com/eyfR7.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/eyfR7.gif" alt="Cardano Triplets"></a></p>

<p>I really don't know how to write this correctly. This is how I tried:</p>

<pre><code>def is_cardano_triplet(a, b, c):
    f = lambda x: x ** 1. / 2
    g = lambda x: x ** 1. / 3
    return g(a + b*f(c)) + g(a - b*f(c)) == 1

print is_cardano_triplet(2,1,5) # I should get True
</code></pre>

<p>I should get <code>True</code> for <code>2, 1, 5</code>, but I'm not. What's wrong with my function?</p>