Nice! Good find. I adapted the font tools version. It's maybe 20% slower than my translation from the analytical formula, and it seems to properly handle degenerate cases. The general form of the Font Tools version makes me 30% more confident about not having weird singularities or numerical instabilities.