- Split input into 3 regimes
if (+ (pow (/ (- (sqrt (* (+ g h) (- g h))) g) (* a 2)) 1/3) (cbrt (/ (- (- g) (sqrt (* (+ g h) (- g h)))) (* a 2)))) < -9.054064503893522e-96
Initial program 6.4
\[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}\]
Applied simplify6.4
\[\leadsto \color{blue}{\sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}}\]
- Using strategy
rm Applied sqrt-prod6.3
\[\leadsto \sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \color{blue}{\sqrt{g + h} \cdot \sqrt{g - h}}}{a \cdot 2}}\]
if -9.054064503893522e-96 < (+ (pow (/ (- (sqrt (* (+ g h) (- g h))) g) (* a 2)) 1/3) (cbrt (/ (- (- g) (sqrt (* (+ g h) (- g h)))) (* a 2)))) < 1.037035254181292e-104
Initial program 56.8
\[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}\]
Applied simplify56.8
\[\leadsto \color{blue}{\sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}}\]
- Using strategy
rm Applied *-un-lft-identity56.8
\[\leadsto \sqrt[3]{\frac{\color{blue}{1 \cdot \left(\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g\right)}}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
Applied times-frac56.8
\[\leadsto \sqrt[3]{\color{blue}{\frac{1}{a} \cdot \frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{2}}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
Applied cbrt-prod37.9
\[\leadsto \color{blue}{\sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{2}}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
Taylor expanded around -inf 10.5
\[\leadsto \sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\color{blue}{-1 \cdot g} - g}{2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
if 1.037035254181292e-104 < (+ (pow (/ (- (sqrt (* (+ g h) (- g h))) g) (* a 2)) 1/3) (cbrt (/ (- (- g) (sqrt (* (+ g h) (- g h)))) (* a 2))))
Initial program 37.8
\[\sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) + \sqrt{g \cdot g - h \cdot h}\right)} + \sqrt[3]{\frac{1}{2 \cdot a} \cdot \left(\left(-g\right) - \sqrt{g \cdot g - h \cdot h}\right)}\]
Applied simplify37.8
\[\leadsto \color{blue}{\sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}}\]
- Using strategy
rm Applied add-cube-cbrt37.8
\[\leadsto \sqrt[3]{\frac{\color{blue}{\left(\sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}\right) \cdot \sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}}}{a \cdot 2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
Applied times-frac37.8
\[\leadsto \sqrt[3]{\color{blue}{\frac{\sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}}{a} \cdot \frac{\sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}}{2}}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
Applied cbrt-prod37.3
\[\leadsto \color{blue}{\sqrt[3]{\frac{\sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}}{a}} \cdot \sqrt[3]{\frac{\sqrt[3]{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}}{2}}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(g + h\right) \cdot \left(g - h\right)}}{a \cdot 2}}\]
- Recombined 3 regimes into one program.
Applied simplify32.8
\[\leadsto \color{blue}{\begin{array}{l}
\mathbf{if}\;{\left(\frac{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}{2 \cdot a}\right)}^{\frac{1}{3}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}{2 \cdot a}} \le -9.054064503893522 \cdot 10^{-96}:\\
\;\;\;\;\sqrt[3]{\frac{\left(-g\right) - \sqrt{h + g} \cdot \sqrt{g - h}}{2 \cdot a}} + \sqrt[3]{\frac{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}{2 \cdot a}}\\
\mathbf{if}\;{\left(\frac{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}{2 \cdot a}\right)}^{\frac{1}{3}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}{2 \cdot a}} \le 1.037035254181292 \cdot 10^{-104}:\\
\;\;\;\;\sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\left(-g\right) - g}{2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}{2 \cdot a}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt[3]{\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g} \cdot \sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{a}} \cdot \sqrt[3]{\frac{\sqrt[3]{\sqrt{\left(h + g\right) \cdot \left(g - h\right)} - g}}{2}} + \sqrt[3]{\frac{\left(-g\right) - \sqrt{\left(h + g\right) \cdot \left(g - h\right)}}{2 \cdot a}}\\
\end{array}}\]