



Bits error versus a




Bits error versus b




Bits error versus c
| Original | 34.5 |
|---|---|
| Target | 21.5 |
| Herbie | 10.3 |
if b < -4.7868277875676773e101Initial program 47.1
Simplified47.1
Taylor expanded around -inf 4.1
Simplified4.1
if -4.7868277875676773e101 < b < 3.6492548177152135e-79Initial program 13.2
Simplified13.2
if 3.6492548177152135e-79 < b Initial program 53.1
Simplified53.1
Taylor expanded around inf 9.5
Final simplification10.3
herbie shell --seed 2020182
(FPCore (a b c)
:name "The quadratic formula (r1)"
:precision binary64
:herbie-target
(if (< b 0.0) (/ (+ (neg b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)) (/ c (* a (/ (- (neg b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))))
(/ (+ (neg b) (sqrt (- (* b b) (* (* 4.0 a) c)))) (* 2.0 a)))