
Results
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
if (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < -2.0000000000000001e-218Initial program 99.8%
Taylor expanded in x around 0 100.0%
+-commutative100.0%
*-commutative100.0%
unpow2100.0%
associate-*l*100.0%
*-commutative100.0%
distribute-lft-out100.0%
Simplified100.0%
if -2.0000000000000001e-218 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < 0.0Initial program 86.2%
Taylor expanded in x around inf 99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in eps around 0 99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
Simplified99.9%
if 0.0 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) Initial program 91.4%
Final simplification99.1%
if (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < -2.0000000000000001e-218 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) Initial program 94.4%
if -2.0000000000000001e-218 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < 0.0Initial program 86.2%
Taylor expanded in x around inf 99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in eps around 0 99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
Simplified99.9%
Final simplification99.1%
if x < -7.59999999999999966e-59 or 8.79999999999999942e-15 < x Initial program 36.8%
Taylor expanded in x around inf 93.4%
distribute-lft1-in93.4%
metadata-eval93.4%
associate-*l*93.4%
Simplified93.4%
if -7.59999999999999966e-59 < x < 8.79999999999999942e-15Initial program 99.3%
Taylor expanded in x around 0 98.5%
Final simplification97.5%
if x < -1.01999999999999994e-60 or 8.79999999999999942e-15 < x Initial program 36.8%
Taylor expanded in x around inf 93.4%
distribute-lft1-in93.4%
metadata-eval93.4%
*-commutative93.4%
Simplified93.4%
Taylor expanded in eps around 0 93.4%
associate-*r*93.4%
*-commutative93.4%
associate-*r*93.6%
Simplified93.6%
if -1.01999999999999994e-60 < x < 8.79999999999999942e-15Initial program 99.3%
Taylor expanded in x around 0 98.5%
Final simplification97.5%
Initial program 87.5%
Taylor expanded in x around 0 86.1%
Final simplification86.1%
Initial program 87.5%
add-sqr-sqrt73.1%
sqrt-unprod69.2%
pow-prod-up68.1%
metadata-eval68.1%
Applied egg-rr68.1%
sqrt-pow187.5%
metadata-eval87.5%
sqr-pow43.4%
pow243.4%
metadata-eval43.4%
Applied egg-rr43.4%
Taylor expanded in x around inf 73.5%
distribute-rgt1-in73.5%
metadata-eval73.5%
mul0-lft73.5%
Simplified73.5%
Final simplification73.5%
herbie shell --seed 2023167
(FPCore (x eps)
:name "ENA, Section 1.4, Exercise 4b, n=5"
:precision binary64
:pre (and (and (<= -1000000000.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))
(- (pow (+ x eps) 5.0) (pow x 5.0)))