The equation of hyperbola H is WHICH_NEG === 1 ? expr(["-", Y2T, X2T]) : expr(["-", X2T, Y2T]) = 1.
What are the asymptotes?
y = \pm B/A
(x + -H) + K
We want to rewrite the equation in terms of y, so start off by moving the y terms to one side:
Y2T = Y_MINUS 1 X_MINUS X2T
Multiply both sides of the equation by B2.
Y = {Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}
Take the square root of both sides.
\sqrt{Y} = \sqrt{Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}
plus("y", -K) = \pm \sqrt{Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}
As x approaches positive or negative infinity, the constant term in the square root matters less and less, so we can just ignore it.
plus("y", -K) \approx \pm \sqrt{\dfrac{X \cdot B2}{A2}}
plus("y", -K) \approx \pm \left(\dfrac{B \cdot (plus("x", -H))}{A}\right)
Add K to both sides and rewrite
Subtract -K from both sides and rewrite
Rewrite
as an equality in terms of y to get the equation of the asymptotes:
y = \pm fractionReduce(B, A)(plus( "x", -H ))K >= 0 ? "+" : "" K