
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 94.6%
+-commutative94.6%
associate-+r+95.9%
associate-+l+100.0%
*-un-lft-identity100.0%
fma-def100.0%
Applied egg-rr100.0%
Final simplification100.0%
Initial program 94.6%
Final simplification94.6%
Initial program 94.6%
Taylor expanded in a around 0 95.7%
Final simplification95.7%
Initial program 94.6%
Taylor expanded in a around 0 95.7%
associate-+r+100.0%
flip-+98.6%
Applied egg-rr98.6%
flip-+100.0%
Applied egg-rr100.0%
Final simplification100.0%
if a < -13.710000000000001Initial program 93.7%
Taylor expanded in b around 0 5.9%
Taylor expanded in c around 0 13.1%
+-commutative13.1%
Simplified13.1%
if -13.710000000000001 < a Initial program 94.9%
Taylor expanded in a around 0 96.0%
Taylor expanded in b around inf 17.1%
Final simplification16.0%
if a < -13.710000000000001Initial program 93.7%
Taylor expanded in b around inf 11.8%
if -13.710000000000001 < a Initial program 94.9%
Taylor expanded in c around inf 14.0%
Final simplification13.4%
Initial program 94.6%
Taylor expanded in a around 0 95.7%
Taylor expanded in b around inf 14.2%
Final simplification14.2%
Initial program 94.6%
Taylor expanded in b around inf 6.2%
Final simplification6.2%
herbie shell --seed 2023167
(FPCore (a b c d)
:name "Expression, p6"
:precision binary64
:pre (and (and (and (and (<= -14.0 a) (<= a -13.0)) (and (<= -3.0 b) (<= b -2.0))) (and (<= 3.0 c) (<= c 3.5))) (and (<= 12.5 d) (<= d 13.5)))
:herbie-target
(+ (* (+ a b) 2.0) (* (+ c d) 2.0))
(* (+ a (+ b (+ c d))) 2.0))