



Bits error versus a




Bits error versus b




Bits error versus c
| Original | 33.9 |
|---|---|
| Target | 21.1 |
| Herbie | 13.4 |
if (/ (pow (exp (* (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b)))) (* 2 a)) < -1.938004317774865e+294 or -1.9236870970777136e-296 < (/ (pow (exp (* (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b)))) (* 2 a)) < 2.6963135394380778e-257 or 6.027720723072216e+299 < (/ (pow (exp (* (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b)))) (* 2 a)) Initial program 58.7
Applied simplify58.7
rmApplied div-inv58.7
rmApplied flip--59.6
Applied associate-*l/59.6
Applied simplify38.6
Taylor expanded around 0 28.4
Applied simplify22.0
if -1.938004317774865e+294 < (/ (pow (exp (* (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b)))) (* 2 a)) < -1.9236870970777136e-296 or 2.6963135394380778e-257 < (/ (pow (exp (* (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b))))) (cbrt (log (- (sqrt (fma (* 4 a) (- c) (* b b))) b)))) (* 2 a)) < 6.027720723072216e+299Initial program 2.5
Applied simplify2.5
Time bar (total: 2.1m)Debug logProfile
herbie shell --seed 2018208 +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)))