
Results
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 99.5%
distribute-lft-out99.5%
associate-*l/99.6%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
div-inv99.5%
add-sqr-sqrt99.5%
pow299.5%
fma-def99.5%
hypot-def99.5%
pow1/299.5%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Final simplification99.6%
if a1 < -6.1999999999999996e247Initial program 100.0%
distribute-lft-out100.0%
associate-*l/100.0%
associate-*r/100.0%
fma-def100.0%
Simplified100.0%
div-inv100.0%
add-sqr-sqrt100.0%
pow2100.0%
fma-def100.0%
hypot-def100.0%
pow1/2100.0%
pow-flip100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in a1 around inf 100.0%
unpow2100.0%
Simplified100.0%
Taylor expanded in th around 0 100.0%
unpow2100.0%
Simplified100.0%
if -6.1999999999999996e247 < a1 < -5.3e-135Initial program 99.5%
distribute-lft-out99.5%
Simplified99.5%
Taylor expanded in th around 0 72.3%
expm1-log1p-u72.3%
expm1-udef72.3%
add-sqr-sqrt72.3%
sqrt-unprod72.3%
frac-times72.3%
metadata-eval72.3%
add-sqr-sqrt72.0%
metadata-eval72.0%
Applied egg-rr72.0%
expm1-def72.0%
expm1-log1p72.4%
Simplified72.4%
if -5.3e-135 < a1 Initial program 99.5%
distribute-lft-out99.5%
associate-*l/99.6%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in a1 around 0 64.1%
unpow264.1%
associate-*l*64.1%
associate-*r/64.1%
Simplified64.1%
Final simplification68.3%
Initial program 99.5%
distribute-lft-out99.5%
Simplified99.5%
clear-num99.5%
associate-/r/99.5%
pow1/299.5%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in th around inf 99.6%
Final simplification99.6%
if a2 < 5.20000000000000005e-104Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
div-inv99.6%
add-sqr-sqrt99.6%
pow299.6%
fma-def99.6%
hypot-def99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
Simplified70.7%
if 5.20000000000000005e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in a1 around 0 71.2%
unpow271.2%
associate-*l*71.3%
associate-*r/71.3%
Simplified71.3%
Final simplification70.8%
if a2 < 5.20000000000000005e-104Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
div-inv99.6%
add-sqr-sqrt99.6%
pow299.6%
fma-def99.6%
hypot-def99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
Simplified70.7%
if 5.20000000000000005e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
Taylor expanded in a1 around 0 71.3%
unpow271.3%
associate-/l*71.3%
Simplified71.3%
Final simplification70.9%
if a2 < 4.3000000000000001e-104Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
div-inv99.6%
add-sqr-sqrt99.6%
pow299.6%
fma-def99.6%
hypot-def99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
Simplified70.7%
if 4.3000000000000001e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
div-inv99.4%
add-sqr-sqrt99.4%
pow299.4%
fma-def99.4%
hypot-def99.4%
pow1/299.4%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a1 around 0 71.4%
unpow271.4%
Simplified71.4%
Final simplification70.9%
if a2 < 4.8000000000000001e-104Initial program 99.6%
distribute-lft-out99.6%
Simplified99.6%
clear-num99.6%
associate-/r/99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in th around inf 99.6%
Taylor expanded in a1 around inf 70.7%
unpow253.0%
Simplified70.7%
if 4.8000000000000001e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
div-inv99.4%
add-sqr-sqrt99.4%
pow299.4%
fma-def99.4%
hypot-def99.4%
pow1/299.4%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a1 around 0 71.4%
unpow271.4%
Simplified71.4%
Final simplification70.9%
if a2 < 8.59999999999999928e-105Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
*-commutative70.7%
associate-*l/70.7%
Simplified70.7%
if 8.59999999999999928e-105 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
div-inv99.4%
add-sqr-sqrt99.4%
pow299.4%
fma-def99.4%
hypot-def99.4%
pow1/299.4%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a1 around 0 71.4%
unpow271.4%
Simplified71.4%
Final simplification70.9%
if a2 < 5.20000000000000005e-104Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
*-commutative70.7%
Simplified70.7%
if 5.20000000000000005e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
associate-*l/99.5%
associate-*r/99.5%
fma-def99.5%
Simplified99.5%
div-inv99.4%
add-sqr-sqrt99.4%
pow299.4%
fma-def99.4%
hypot-def99.4%
pow1/299.4%
pow-flip99.7%
metadata-eval99.7%
Applied egg-rr99.7%
Taylor expanded in a1 around 0 71.4%
unpow271.4%
Simplified71.4%
Final simplification70.9%
if a2 < 3.19999999999999989e-104Initial program 99.6%
distribute-lft-out99.6%
Simplified99.6%
Taylor expanded in th around 0 73.4%
Taylor expanded in a1 around inf 53.0%
unpow253.0%
Simplified53.0%
Taylor expanded in a1 around 0 53.1%
unpow253.1%
Simplified53.1%
if 3.19999999999999989e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
Simplified99.4%
Taylor expanded in th around 0 65.4%
Taylor expanded in a1 around 0 47.7%
unpow247.7%
associate-*r/47.8%
Simplified47.8%
add-sqr-sqrt47.7%
sqrt-unprod47.8%
div-inv47.8%
div-inv47.7%
swap-sqr47.7%
frac-times47.7%
metadata-eval47.7%
add-sqr-sqrt48.0%
metadata-eval48.0%
Applied egg-rr48.0%
Final simplification51.4%
Initial program 99.5%
distribute-lft-out99.5%
Simplified99.5%
Taylor expanded in th around 0 70.8%
expm1-log1p-u70.8%
expm1-udef70.8%
add-sqr-sqrt70.8%
sqrt-unprod70.8%
frac-times70.8%
metadata-eval70.8%
add-sqr-sqrt70.5%
metadata-eval70.5%
Applied egg-rr70.5%
expm1-def70.5%
expm1-log1p70.8%
Simplified70.8%
Final simplification70.8%
if a2 < 4.9000000000000003e-104Initial program 99.6%
distribute-lft-out99.6%
associate-*l/99.7%
associate-*r/99.6%
fma-def99.6%
Simplified99.6%
div-inv99.6%
add-sqr-sqrt99.6%
pow299.6%
fma-def99.6%
hypot-def99.6%
pow1/299.6%
pow-flip99.6%
metadata-eval99.6%
Applied egg-rr99.6%
Taylor expanded in a1 around inf 70.7%
unpow270.7%
Simplified70.7%
Taylor expanded in th around 0 53.0%
unpow253.0%
Simplified53.0%
if 4.9000000000000003e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
Simplified99.4%
Taylor expanded in th around 0 65.4%
Taylor expanded in a1 around 0 47.7%
unpow247.7%
associate-*r/47.8%
Simplified47.8%
expm1-log1p-u46.7%
expm1-udef39.8%
div-inv39.8%
add-sqr-sqrt39.8%
sqrt-unprod39.8%
frac-times39.8%
metadata-eval39.8%
add-sqr-sqrt39.8%
metadata-eval39.8%
Applied egg-rr39.8%
expm1-def46.7%
expm1-log1p47.9%
*-commutative47.9%
Simplified47.9%
Final simplification51.3%
if a2 < 5.20000000000000005e-104Initial program 99.6%
distribute-lft-out99.6%
Simplified99.6%
Taylor expanded in th around 0 73.4%
Taylor expanded in a1 around inf 53.1%
unpow253.1%
associate-/l*53.0%
Simplified53.0%
if 5.20000000000000005e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
Simplified99.4%
Taylor expanded in th around 0 65.4%
Taylor expanded in a1 around 0 47.7%
unpow247.7%
associate-*r/47.8%
Simplified47.8%
expm1-log1p-u46.7%
expm1-udef39.8%
div-inv39.8%
add-sqr-sqrt39.8%
sqrt-unprod39.8%
frac-times39.8%
metadata-eval39.8%
add-sqr-sqrt39.8%
metadata-eval39.8%
Applied egg-rr39.8%
expm1-def46.7%
expm1-log1p47.9%
*-commutative47.9%
Simplified47.9%
Final simplification51.3%
if a2 < 5.20000000000000005e-104Initial program 99.6%
distribute-lft-out99.6%
Simplified99.6%
Taylor expanded in th around 0 73.4%
Taylor expanded in a1 around inf 53.0%
unpow253.0%
Simplified53.0%
Taylor expanded in a1 around 0 53.1%
unpow253.1%
Simplified53.1%
if 5.20000000000000005e-104 < a2 Initial program 99.4%
distribute-lft-out99.4%
Simplified99.4%
Taylor expanded in th around 0 65.4%
Taylor expanded in a1 around 0 47.7%
unpow247.7%
associate-*r/47.8%
Simplified47.8%
expm1-log1p-u46.7%
expm1-udef39.8%
div-inv39.8%
add-sqr-sqrt39.8%
sqrt-unprod39.8%
frac-times39.8%
metadata-eval39.8%
add-sqr-sqrt39.8%
metadata-eval39.8%
Applied egg-rr39.8%
expm1-def46.7%
expm1-log1p47.9%
*-commutative47.9%
Simplified47.9%
Final simplification51.4%
Initial program 99.5%
distribute-lft-out99.5%
Simplified99.5%
Taylor expanded in th around 0 70.8%
Taylor expanded in a1 around 0 40.6%
unpow240.6%
associate-*r/40.6%
Simplified40.6%
expm1-log1p-u26.5%
expm1-udef22.0%
div-inv22.0%
add-sqr-sqrt22.0%
sqrt-unprod22.0%
frac-times22.0%
metadata-eval22.0%
add-sqr-sqrt22.0%
metadata-eval22.0%
Applied egg-rr22.0%
expm1-def26.5%
expm1-log1p40.6%
*-commutative40.6%
Simplified40.6%
Final simplification40.6%
herbie shell --seed 2023166
(FPCore (a1 a2 th)
:name "Migdal et al, Equation (64)"
:precision binary64
(+ (* (/ (cos th) (sqrt 2.0)) (* a1 a1)) (* (/ (cos th) (sqrt 2.0)) (* a2 a2))))