
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
if (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < -2.0000000000019e-312 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) Initial program 97.7%
if -2.0000000000019e-312 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < 0.0Initial program 86.1%
Taylor expanded in x around inf 99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
associate-*l*99.9%
Simplified99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*l*99.9%
metadata-eval99.9%
distribute-lft1-in99.9%
distribute-lft-in99.9%
*-commutative99.9%
*-commutative99.9%
associate-*l*99.9%
fma-def99.9%
Applied egg-rr99.9%
Final simplification99.5%
if (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < -2.0000000000019e-312 or 0.0 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) Initial program 97.7%
if -2.0000000000019e-312 < (-.f64 (pow.f64 (+.f64 x eps) 5) (pow.f64 x 5)) < 0.0Initial program 86.1%
Taylor expanded in x around inf 99.9%
fma-def99.9%
distribute-lft1-in99.9%
metadata-eval99.9%
*-commutative99.9%
+-commutative99.9%
*-commutative99.9%
*-commutative99.9%
unpow399.9%
unpow299.9%
associate-*l*99.9%
distribute-lft-out99.9%
Simplified99.9%
Taylor expanded in eps around 0 99.9%
+-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
metadata-eval99.9%
pow-sqr99.9%
unpow299.9%
unpow299.9%
associate-*l*99.9%
associate-*l*99.9%
*-commutative99.9%
associate-*r*99.9%
associate-*l*99.9%
*-commutative99.9%
associate-*l*99.9%
associate-*r*99.9%
unpow299.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
*-commutative99.9%
associate-*r*99.9%
Simplified99.9%
unpow399.9%
Applied egg-rr99.9%
Final simplification99.5%
if x < -1.3500000000000001e-63Initial program 67.4%
Taylor expanded in x around inf 92.4%
fma-def92.4%
distribute-lft1-in92.4%
metadata-eval92.4%
*-commutative92.4%
+-commutative92.4%
*-commutative92.4%
*-commutative92.4%
unpow392.4%
unpow292.4%
associate-*l*92.4%
distribute-lft-out92.4%
Simplified92.4%
Taylor expanded in eps around 0 92.2%
associate-+r+92.2%
+-commutative92.2%
associate-*r*92.3%
*-commutative92.3%
*-commutative92.3%
unpow292.3%
associate-*r*92.3%
*-commutative92.3%
associate-+r+92.3%
*-commutative92.3%
associate-*r*92.3%
Simplified92.4%
fma-udef92.4%
associate-*l*92.3%
associate-*l*92.3%
Applied egg-rr92.3%
if -1.3500000000000001e-63 < x < 1.25e-63Initial program 100.0%
Taylor expanded in x around 0 99.8%
if 1.25e-63 < x Initial program 35.6%
Taylor expanded in x around inf 99.5%
fma-def99.5%
distribute-lft1-in99.5%
metadata-eval99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
*-commutative99.5%
unpow399.5%
unpow299.5%
associate-*l*99.5%
distribute-lft-out99.5%
Simplified99.5%
Taylor expanded in eps around 0 99.5%
+-commutative99.5%
associate-*r*99.5%
*-commutative99.5%
metadata-eval99.5%
pow-sqr99.6%
unpow299.6%
unpow299.6%
associate-*l*99.5%
associate-*l*99.4%
*-commutative99.4%
associate-*r*99.6%
associate-*l*99.6%
*-commutative99.6%
associate-*l*99.3%
associate-*r*99.4%
unpow299.4%
associate-*r*99.4%
*-commutative99.4%
associate-*r*99.4%
*-commutative99.4%
associate-*r*99.4%
Simplified99.6%
Final simplification99.1%
if x < -1.3500000000000001e-63Initial program 67.4%
Taylor expanded in x around inf 92.4%
fma-def92.4%
distribute-lft1-in92.4%
metadata-eval92.4%
*-commutative92.4%
+-commutative92.4%
*-commutative92.4%
*-commutative92.4%
unpow392.4%
unpow292.4%
associate-*l*92.4%
distribute-lft-out92.4%
Simplified92.4%
Taylor expanded in eps around 0 91.8%
+-commutative91.8%
associate-*r*92.0%
*-commutative92.0%
metadata-eval92.0%
pow-sqr92.0%
unpow292.0%
unpow292.0%
associate-*l*92.1%
associate-*l*92.0%
*-commutative92.0%
associate-*r*92.0%
associate-*l*92.1%
*-commutative92.1%
associate-*l*92.0%
associate-*r*92.0%
unpow292.0%
associate-*r*92.0%
*-commutative92.0%
associate-*r*92.0%
*-commutative92.0%
associate-*r*92.0%
Simplified92.1%
unpow392.2%
Applied egg-rr92.2%
if -1.3500000000000001e-63 < x < 1.25000000000000008e-64Initial program 100.0%
Taylor expanded in x around 0 99.8%
if 1.25000000000000008e-64 < x Initial program 35.6%
Taylor expanded in x around inf 99.5%
fma-def99.5%
distribute-lft1-in99.5%
metadata-eval99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
*-commutative99.5%
unpow399.5%
unpow299.5%
associate-*l*99.5%
distribute-lft-out99.5%
Simplified99.5%
Taylor expanded in eps around 0 99.5%
+-commutative99.5%
associate-*r*99.5%
*-commutative99.5%
metadata-eval99.5%
pow-sqr99.6%
unpow299.6%
unpow299.6%
associate-*l*99.5%
associate-*l*99.4%
*-commutative99.4%
associate-*r*99.6%
associate-*l*99.6%
*-commutative99.6%
associate-*l*99.3%
associate-*r*99.4%
unpow299.4%
associate-*r*99.4%
*-commutative99.4%
associate-*r*99.4%
*-commutative99.4%
associate-*r*99.4%
Simplified99.6%
Final simplification99.1%
if x < -1.3500000000000001e-63 or 1.25e-63 < x Initial program 48.2%
Taylor expanded in x around inf 96.7%
fma-def96.7%
distribute-lft1-in96.7%
metadata-eval96.7%
*-commutative96.7%
+-commutative96.7%
*-commutative96.7%
*-commutative96.7%
unpow396.7%
unpow296.7%
associate-*l*96.7%
distribute-lft-out96.7%
Simplified96.7%
Taylor expanded in eps around 0 96.4%
+-commutative96.4%
associate-*r*96.5%
*-commutative96.5%
metadata-eval96.5%
pow-sqr96.6%
unpow296.6%
unpow296.6%
associate-*l*96.6%
associate-*l*96.5%
*-commutative96.5%
associate-*r*96.6%
associate-*l*96.6%
*-commutative96.6%
associate-*l*96.4%
associate-*r*96.4%
unpow296.4%
associate-*r*96.5%
*-commutative96.5%
associate-*r*96.5%
*-commutative96.5%
associate-*r*96.5%
Simplified96.6%
unpow396.6%
Applied egg-rr96.6%
if -1.3500000000000001e-63 < x < 1.25e-63Initial program 100.0%
Taylor expanded in x around 0 99.8%
Final simplification99.1%
Initial program 88.3%
Taylor expanded in x around inf 84.0%
fma-def84.0%
distribute-lft1-in84.0%
metadata-eval84.0%
*-commutative84.0%
+-commutative84.0%
*-commutative84.0%
*-commutative84.0%
unpow384.0%
unpow284.0%
associate-*l*84.0%
distribute-lft-out84.0%
Simplified84.0%
Taylor expanded in eps around 0 84.0%
+-commutative84.0%
associate-*r*84.0%
*-commutative84.0%
metadata-eval84.0%
pow-sqr84.0%
unpow284.0%
unpow284.0%
associate-*l*84.0%
associate-*l*84.0%
*-commutative84.0%
associate-*r*84.0%
associate-*l*84.0%
*-commutative84.0%
associate-*l*84.0%
associate-*r*84.0%
unpow284.0%
associate-*r*84.0%
*-commutative84.0%
associate-*r*84.0%
*-commutative84.0%
associate-*r*84.0%
Simplified84.0%
unpow384.0%
Applied egg-rr84.0%
Final simplification84.0%
Initial program 88.3%
Taylor expanded in eps around 0 83.8%
distribute-lft1-in83.8%
metadata-eval83.8%
*-commutative83.8%
sqr-pow83.8%
associate-*l*83.8%
metadata-eval83.8%
pow283.8%
metadata-eval83.8%
pow283.8%
Applied egg-rr83.8%
Final simplification83.8%
Initial program 88.3%
Taylor expanded in x around inf 83.8%
distribute-lft1-in83.8%
metadata-eval83.8%
associate-*l*83.8%
Simplified83.8%
associate-*r*83.8%
*-commutative83.8%
add-sqr-sqrt78.3%
pow278.3%
sqrt-prod42.2%
*-commutative42.2%
sqrt-pow142.2%
metadata-eval42.2%
pow242.2%
Applied egg-rr42.2%
unpow242.2%
swap-sqr42.2%
add-sqr-sqrt83.8%
*-commutative83.8%
pow283.8%
pow283.8%
pow-prod-up83.8%
metadata-eval83.8%
associate-*r*83.8%
*-commutative83.8%
metadata-eval83.8%
pow-prod-up83.8%
pow283.8%
pow283.8%
associate-*r*83.8%
*-commutative83.8%
associate-*r*83.8%
associate-*l*83.8%
Applied egg-rr83.8%
Final simplification83.8%
Initial program 88.3%
Taylor expanded in x around inf 83.8%
distribute-lft1-in83.8%
metadata-eval83.8%
associate-*l*83.8%
Simplified83.8%
associate-*r*83.8%
*-commutative83.8%
add-sqr-sqrt78.3%
pow278.3%
sqrt-prod42.2%
*-commutative42.2%
sqrt-pow142.2%
metadata-eval42.2%
pow242.2%
Applied egg-rr42.2%
unpow242.2%
swap-sqr42.2%
add-sqr-sqrt83.8%
associate-*r*83.8%
*-commutative83.8%
Applied egg-rr83.8%
Final simplification83.8%
herbie shell --seed 2023166
(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)))