
Results
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
| Original | 86.1% |
|---|---|
| Target | 86.5% |
| Herbie | 96.8% |
if (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -inf.0 or -9.9999999999847e-313 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < 1.99999999999999992e-291Initial program 80.2%
times-frac96.6%
Simplified96.6%
frac-times80.2%
*-commutative80.2%
frac-times94.3%
clear-num93.2%
un-div-inv93.2%
Applied egg-rr93.2%
if -inf.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -9.9999999999847e-313 or 1.99999999999999992e-291 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < 1e308Initial program 99.3%
if 1e308 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) Initial program 68.5%
times-frac96.8%
Simplified96.8%
associate-*r/99.8%
Applied egg-rr99.8%
Final simplification96.8%
if (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -inf.0Initial program 84.8%
associate-/l*92.4%
*-commutative92.4%
associate-/l*97.3%
Simplified97.3%
associate-/r/97.3%
Applied egg-rr97.3%
if -inf.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -2e-276 or -0.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < 1e308Initial program 99.3%
if -2e-276 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -0.0Initial program 77.7%
times-frac95.2%
Simplified95.2%
clear-num95.2%
frac-times93.8%
*-un-lft-identity93.8%
Applied egg-rr93.8%
if 1e308 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) Initial program 68.5%
times-frac96.8%
Simplified96.8%
Final simplification97.2%
if (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -inf.0Initial program 84.8%
associate-/l*92.4%
*-commutative92.4%
associate-/l*97.3%
Simplified97.3%
associate-/r/97.3%
Applied egg-rr97.3%
if -inf.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -2e-276 or -0.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < 1e308Initial program 99.3%
if -2e-276 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -0.0Initial program 77.7%
times-frac95.2%
Simplified95.2%
clear-num95.2%
frac-times93.8%
*-un-lft-identity93.8%
Applied egg-rr93.8%
if 1e308 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) Initial program 68.5%
associate-/l*75.2%
*-commutative75.2%
associate-/l*91.6%
Simplified91.6%
add-sqr-sqrt48.2%
div-inv48.2%
times-frac48.2%
clear-num48.2%
Applied egg-rr48.2%
associate-*l/48.3%
div-inv48.3%
clear-num48.3%
associate-*r*48.3%
add-sqr-sqrt99.8%
Applied egg-rr99.8%
Final simplification97.6%
if (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -inf.0Initial program 84.8%
associate-/l*92.4%
*-commutative92.4%
associate-/l*97.3%
Simplified97.3%
associate-/r/97.3%
Applied egg-rr97.3%
if -inf.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -2e-276 or -0.0 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < 1e308Initial program 99.3%
if -2e-276 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) < -0.0Initial program 77.7%
times-frac95.2%
Simplified95.2%
clear-num95.2%
frac-times93.8%
*-un-lft-identity93.8%
Applied egg-rr93.8%
if 1e308 < (/.f64 (*.f64 a1 a2) (*.f64 b1 b2)) Initial program 68.5%
times-frac96.8%
Simplified96.8%
associate-*r/99.8%
Applied egg-rr99.8%
Final simplification97.6%
if b1 < -3.0000000000000001e-27Initial program 90.4%
associate-/l*93.2%
*-commutative93.2%
associate-/l*89.2%
Simplified89.2%
associate-/r/90.6%
Applied egg-rr90.6%
if -3.0000000000000001e-27 < b1 Initial program 86.4%
times-frac86.5%
Simplified86.5%
Final simplification87.7%
Initial program 87.5%
times-frac88.5%
Simplified88.5%
Final simplification88.5%
Initial program 87.5%
times-frac88.5%
Simplified88.5%
clear-num88.4%
frac-times88.3%
*-un-lft-identity88.3%
Applied egg-rr88.3%
Final simplification88.3%
herbie shell --seed 2023166
(FPCore (a1 a2 b1 b2)
:name "Quotient of products"
:precision binary64
:herbie-target
(* (/ a1 b1) (/ a2 b2))
(/ (* a1 a2) (* b1 b2)))