
Results
Herbie found 5 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 71.1%
unpow271.1%
Simplified71.1%
unpow271.1%
+-commutative71.1%
+-commutative71.1%
Applied egg-rr71.1%
distribute-rgt-in71.2%
*-commutative71.2%
associate--l+74.6%
+-commutative74.6%
distribute-lft-out--74.6%
+-commutative74.6%
*-commutative74.6%
+-commutative74.6%
Applied egg-rr74.6%
Taylor expanded in x around 0 99.9%
+-commutative99.9%
*-commutative99.9%
distribute-lft-out100.0%
Applied egg-rr100.0%
Final simplification100.0%
if x < -3.8000000000000001e-96 or 1.1499999999999999e-99 < x Initial program 35.9%
unpow235.9%
unpow235.9%
difference-of-squares35.8%
*-commutative35.8%
+-commutative35.8%
associate--l+99.9%
+-inverses99.9%
+-rgt-identity99.9%
+-commutative99.9%
associate-+r+99.9%
count-299.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in eps around 0 86.4%
if -3.8000000000000001e-96 < x < 1.1499999999999999e-99Initial program 96.9%
unpow296.9%
unpow296.9%
difference-of-squares96.9%
*-commutative96.9%
+-commutative96.9%
associate--l+100.0%
+-inverses100.0%
+-rgt-identity100.0%
+-commutative100.0%
associate-+r+100.0%
count-2100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in eps around inf 96.2%
unpow296.2%
Simplified96.2%
Final simplification92.1%
if x < -3.9999999999999996e-96Initial program 29.8%
unpow229.8%
unpow229.8%
difference-of-squares29.8%
*-commutative29.8%
+-commutative29.8%
associate--l+100.0%
+-inverses100.0%
+-rgt-identity100.0%
+-commutative100.0%
associate-+r+99.9%
count-299.9%
fma-def99.9%
Simplified99.9%
Taylor expanded in eps around 0 88.5%
if -3.9999999999999996e-96 < x < 1.7999999999999999e-100Initial program 96.9%
unpow296.9%
unpow296.9%
difference-of-squares96.9%
*-commutative96.9%
+-commutative96.9%
associate--l+100.0%
+-inverses100.0%
+-rgt-identity100.0%
+-commutative100.0%
associate-+r+100.0%
count-2100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in eps around inf 96.2%
unpow296.2%
Simplified96.2%
if 1.7999999999999999e-100 < x Initial program 41.7%
unpow241.7%
unpow241.7%
difference-of-squares41.7%
*-commutative41.7%
+-commutative41.7%
associate--l+99.9%
+-inverses99.9%
+-rgt-identity99.9%
+-commutative99.9%
associate-+r+99.9%
count-299.9%
fma-def99.9%
Simplified99.9%
fma-udef99.9%
distribute-rgt-in99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 84.3%
associate-*r*84.5%
*-commutative84.5%
associate-*r*84.5%
count-284.5%
Simplified84.5%
Final simplification92.1%
Initial program 71.1%
unpow271.1%
Simplified71.1%
unpow271.1%
+-commutative71.1%
+-commutative71.1%
Applied egg-rr71.1%
distribute-rgt-in71.2%
*-commutative71.2%
associate--l+74.6%
+-commutative74.6%
distribute-lft-out--74.6%
+-commutative74.6%
*-commutative74.6%
+-commutative74.6%
Applied egg-rr74.6%
Taylor expanded in x around 0 99.9%
Taylor expanded in x around 0 99.9%
unpow299.9%
*-commutative99.9%
associate-*r*100.0%
count-2100.0%
distribute-rgt-in100.0%
Simplified100.0%
Final simplification100.0%
Initial program 71.1%
unpow271.1%
unpow271.1%
difference-of-squares71.1%
*-commutative71.1%
+-commutative71.1%
associate--l+100.0%
+-inverses100.0%
+-rgt-identity100.0%
+-commutative100.0%
associate-+r+100.0%
count-2100.0%
fma-def100.0%
Simplified100.0%
Taylor expanded in eps around inf 68.7%
unpow268.7%
Simplified68.7%
Final simplification68.7%
herbie shell --seed 2023167
(FPCore (x eps)
:name "ENA, Section 1.4, Exercise 4b, n=2"
:precision binary64
:pre (and (and (<= -1000000000.0 x) (<= x 1000000000.0)) (and (<= -1.0 eps) (<= eps 1.0)))
(- (pow (+ x eps) 2.0) (pow x 2.0)))