
Herbie found 4 alternatives:
| Alternative | Accuracy | Speedup |
|---|
Initial program 100.0%
+-commutative100.0%
distribute-rgt-in100.0%
fma-def100.0%
*-commutative100.0%
Applied egg-rr100.0%
Final simplification100.0%
Initial program 100.0%
Final simplification100.0%
Initial program 100.0%
Taylor expanded in b around 0 63.3%
Final simplification63.3%
Initial program 100.0%
Taylor expanded in d around inf 33.2%
*-commutative33.2%
Simplified33.2%
Final simplification33.2%
herbie shell --seed 2023167
(FPCore (a b c d)
:name "Expression, p14"
:precision binary64
:pre (and (and (and (and (<= 56789.0 a) (<= a 98765.0)) (and (<= 0.0 b) (<= b 1.0))) (and (<= 0.0 c) (<= c 0.0016773))) (and (<= 0.0 d) (<= d 0.0016773)))
:herbie-target
(+ (* a b) (* a (+ c d)))
(* a (+ (+ b c) d)))