
Results
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
if (*.f64 (PI.f64) l) < -2e22 or 1.00000000000000005e-4 < (*.f64 (PI.f64) l) Initial program 62.8%
associate-*l/62.8%
*-lft-identity62.8%
Simplified62.8%
Taylor expanded in l around 0 46.7%
unpow246.7%
Simplified46.7%
Taylor expanded in F around inf 99.7%
if -2e22 < (*.f64 (PI.f64) l) < 1.00000000000000005e-4Initial program 89.8%
associate-*l/90.8%
*-un-lft-identity90.8%
associate-/r*99.3%
Applied egg-rr99.3%
Final simplification99.5%
if (*.f64 (PI.f64) l) < -4e9 or 1.00000000000000005e-4 < (*.f64 (PI.f64) l) Initial program 63.7%
associate-*l/63.7%
*-lft-identity63.7%
Simplified63.7%
Taylor expanded in l around 0 47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in F around inf 99.5%
if -4e9 < (*.f64 (PI.f64) l) < 1.00000000000000005e-4Initial program 89.6%
associate-*l/90.6%
*-un-lft-identity90.6%
associate-/r*99.3%
Applied egg-rr99.3%
Taylor expanded in l around 0 97.9%
associate-/l*97.9%
Simplified97.9%
Final simplification98.7%
if l < -2.4e5 or 5.8e-5 < l Initial program 63.7%
associate-*l/63.7%
*-lft-identity63.7%
Simplified63.7%
Taylor expanded in l around 0 47.2%
unpow247.2%
Simplified47.2%
Taylor expanded in F around inf 99.5%
if -2.4e5 < l < 5.8e-5Initial program 89.6%
Taylor expanded in l around 0 89.2%
associate-/l*89.1%
associate-/r/89.2%
unpow289.2%
Simplified89.2%
*-commutative89.2%
distribute-lft-out--89.2%
associate-/r*97.9%
Applied egg-rr97.9%
Final simplification98.7%
if F < -3.99999999999999983e-233 or 5.0000000000000001e-188 < F Initial program 82.4%
associate-*l/83.1%
*-lft-identity83.1%
Simplified83.1%
Taylor expanded in l around 0 72.3%
unpow272.3%
Simplified72.3%
Taylor expanded in F around inf 82.1%
if -3.99999999999999983e-233 < F < 5.0000000000000001e-188Initial program 50.1%
associate-*l/50.1%
*-lft-identity50.1%
Simplified50.1%
Taylor expanded in l around 0 46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in F around 0 46.9%
mul-1-neg46.9%
unpow246.9%
associate-/l*46.9%
Simplified46.9%
associate-/l*46.9%
associate-/r/66.6%
Applied egg-rr66.6%
Final simplification79.6%
if F < -1.7999999999999999e-234 or 6e-189 < F Initial program 82.4%
associate-*l/83.1%
*-lft-identity83.1%
Simplified83.1%
Taylor expanded in l around 0 72.3%
unpow272.3%
Simplified72.3%
Taylor expanded in F around inf 82.1%
if -1.7999999999999999e-234 < F < 6e-189Initial program 50.1%
Taylor expanded in l around 0 46.9%
associate-/l*46.9%
associate-/r/46.9%
unpow246.9%
Simplified46.9%
Taylor expanded in F around 0 46.9%
mul-1-neg46.9%
unpow246.9%
*-commutative46.9%
distribute-frac-neg46.9%
associate-/r*66.6%
distribute-rgt-neg-in66.6%
associate-/l*66.7%
Simplified66.7%
Final simplification79.6%
Initial program 77.1%
associate-*l/77.7%
*-lft-identity77.7%
Simplified77.7%
Taylor expanded in l around 0 68.2%
unpow268.2%
Simplified68.2%
Taylor expanded in F around inf 73.9%
Final simplification73.9%
herbie shell --seed 2023166
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))