
Results
Herbie found 5 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 70.0% |
|---|---|
| Target | 74.3% |
| Herbie | 76.6% |
Initial program 70.7%
Taylor expanded in z around 0 79.6%
Final simplification79.6%
if (/.f64 a (*.f64 b 3)) < -9.9999999999999996e-95 or 1.9999999999999998e-96 < (/.f64 a (*.f64 b 3)) Initial program 79.6%
Taylor expanded in z around 0 92.9%
Taylor expanded in y around 0 88.5%
if -9.9999999999999996e-95 < (/.f64 a (*.f64 b 3)) < 1.9999999999999998e-96Initial program 55.7%
Taylor expanded in z around 0 57.2%
*-un-lft-identity57.2%
times-frac57.2%
inv-pow57.2%
Applied egg-rr57.2%
Taylor expanded in b around inf 56.9%
associate-*r*56.9%
*-commutative56.9%
Simplified56.9%
Final simplification76.8%
Initial program 70.7%
Taylor expanded in z around 0 79.6%
Taylor expanded in y around 0 69.5%
Final simplification69.5%
Initial program 70.7%
Taylor expanded in z around 0 79.6%
Taylor expanded in x around 0 53.3%
Final simplification53.3%
Initial program 70.7%
Taylor expanded in z around 0 79.6%
Taylor expanded in x around 0 53.3%
associate-*r/53.3%
Applied egg-rr53.3%
Final simplification53.3%
herbie shell --seed 2023166
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, K"
:precision binary64
:herbie-target
(if (< z -1.3793337487235141e+129) (- (* (* 2.0 (sqrt x)) (cos (- (/ 1.0 y) (/ (/ 0.3333333333333333 z) t)))) (/ (/ a 3.0) b)) (if (< z 3.516290613555987e+106) (- (* (* (sqrt x) 2.0) (cos (- y (* (/ t 3.0) z)))) (/ (/ a 3.0) b)) (- (* (cos (- y (/ (/ 0.3333333333333333 z) t))) (* 2.0 (sqrt x))) (/ (/ a b) 3.0))))
(- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))