Average Error: 35.8 → 31.8
Time: 30.2s
Precision: 64
Internal Precision: 576
\[\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)}\]
\[\sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g}{2}} + \frac{\sqrt[3]{\frac{-1}{2} \cdot \left(g + \sqrt{\left(g - h\right) \cdot \left(h + g\right)}\right)}}{\sqrt[3]{a}}\]

Error

Bits error versus g

Bits error versus h

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 35.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)}\]
  2. Initial simplification35.8

    \[\leadsto \sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{a \cdot 2}} + \sqrt[3]{\frac{\frac{-1}{2}}{a} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity35.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{\frac{-1}{2}}{a} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}\]
  5. Applied times-frac35.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{\frac{-1}{2}}{a} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}\]
  6. Applied cbrt-prod33.8

    \[\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{\frac{-1}{2}}{a} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}\]
  7. Using strategy rm
  8. Applied associate-*l/33.8

    \[\leadsto \sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{2}} + \sqrt[3]{\color{blue}{\frac{\frac{-1}{2} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}{a}}}\]
  9. Applied cbrt-div31.8

    \[\leadsto \sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\sqrt{\left(g + h\right) \cdot \left(g - h\right)} - g}{2}} + \color{blue}{\frac{\sqrt[3]{\frac{-1}{2} \cdot \left(g + \sqrt{\left(g + h\right) \cdot \left(g - h\right)}\right)}}{\sqrt[3]{a}}}\]
  10. Final simplification31.8

    \[\leadsto \sqrt[3]{\frac{1}{a}} \cdot \sqrt[3]{\frac{\sqrt{\left(g - h\right) \cdot \left(h + g\right)} - g}{2}} + \frac{\sqrt[3]{\frac{-1}{2} \cdot \left(g + \sqrt{\left(g - h\right) \cdot \left(h + g\right)}\right)}}{\sqrt[3]{a}}\]

Runtime

Time bar (total: 30.2s)Debug logProfile

BaselineHerbieOracleSpan%
Regimes31.831.830.11.70%
herbie shell --seed 2018295 
(FPCore (g h a)
  :name "2-ancestry mixing, positive discriminant"
  (+ (cbrt (* (/ 1 (* 2 a)) (+ (- g) (sqrt (- (* g g) (* h h)))))) (cbrt (* (/ 1 (* 2 a)) (- (- g) (sqrt (- (* g g) (* h h))))))))