Using the algebra from the other answer, it seems like a better approximation would be: $$ c^2 = (a - b)^2 + 4ab\sin^2(\gamma/2) $$ You'll still get some subtractive cancellation when computing $a-b$, but it's not as bad as the original formula.
Also, when $\gamma$ is small, calculating $\sin\gamma$ accurately is easier than calculating $\cos\gamma$.