



Bits error versus a




Bits error versus b




Bits error versus c
| Original | 33.7 |
|---|---|
| Target | 21.0 |
| Herbie | 13.7 |
if (* (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) 2) (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) a)) < -6.536946105088419e+304 or -1.4492009222739857e-263 < (* (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) 2) (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) a)) < 6.138147418955094e-296 or 6.39557541013831e+274 < (* (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) 2) (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) a)) Initial program 58.4
Applied simplify58.4
rmApplied flip--59.3
Applied simplify39.8
rmApplied *-un-lft-identity39.8
Applied times-frac39.8
Applied simplify39.8
Taylor expanded around 0 32.3
Applied simplify22.7
if -6.536946105088419e+304 < (* (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) 2) (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) a)) < -1.4492009222739857e-263 or 6.138147418955094e-296 < (* (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) 2) (/ (sqrt (- (sqrt (fma (* 4 a) (- c) (* b b))) b)) a)) < 6.39557541013831e+274Initial program 2.2
Applied simplify2.2
Time bar (total: 1.8m)Debug logProfile
herbie shell --seed 2018214 +o rules:numerics
(FPCore (a b c)
:name "The quadratic formula (r1)"
:herbie-target
(if (< b 0) (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) (/ c (* a (/ (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))