user2468's solution ends up requiring quite a lot of operations -- three reciprocals to get $A^2$, then the same to get $B^2$, then another three to get $A^2+B^2+2AB-A-B$. Then to get rid of that pesky factor of 2 you need another three reciprocals, for a total of 12 reciprocal operations (and 31 binary operations).
It's possible to do better by employing some tricks:
- Instead of $(A+B)^2 - A^2 - B^2$, which involves three terms, use $(A+B)^2 - (A-B)^2$, which involves only two terms.
- Instead of needing to divide by a constant near the end of the process, which involves a lot more reciprocals, identify where in the formula you actually introduced the constant, and scale your other constants to match.
Using those tricks, I was able to reduce this down to 6 reciprocal operations and 11 binary operations:
$ \frac{1}{\frac{1}{A+B-2} - \frac{1}{A+B+2}}-\frac{1}{\frac{1}{A-B-2} - \frac{1}{A-B+2}} = AB $
I suspect this is probably the most beautiful solution to this challenge.