


Bits error versus a



Bits error versus b



Bits error versus c
if b < 5.249016491775119e+108Initial program 14.8
Initial simplification14.8
rmApplied add-cube-cbrt15.0
Applied sqrt-prod15.0
Applied add-sqr-sqrt34.2
Applied prod-diff34.2
Simplified15.0
Simplified15.0
if 5.249016491775119e+108 < b Initial program 46.4
Initial simplification46.4
Taylor expanded around 0 3.9
rmApplied add-sqr-sqrt3.9
Final simplification13.3
herbie shell --seed 2018365 +o rules:numerics
(FPCore (a b c)
:name "jeff quadratic root 1"
(if (>= b 0) (/ (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) (/ (* 2 c) (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))))))
Time bar (total: 15.3s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 18.8b
Found 4 expressions with local error:
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 1.2b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 1.2b | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
4 calls. Slowest were:
| 5.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 4.0ms | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
| 1.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 72.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 65.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 53.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 48.0ms | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
81 calls. Slowest were:
| 78.0ms | (fma 1 (- b) (- (* (sqrt (fma c (* a -4) (* b b))) (sqrt 1)))) |
| 70.0ms | (fma (* (cbrt (- b)) (cbrt (- b))) (cbrt (- b)) (- (* (sqrt (fma c (* a -4) (* b b))) (sqrt 1)))) |
| 68.0ms | (fma 1 (- b) (- (* (sqrt (fma c (* a -4) (* b b))) 1))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 10.2b
Found 4 expressions with local error:
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 1.2b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 0.1b | (/ (* 2 c) (- (sqrt (fma c (* a -4) (* b b))) b)) |
| 0.0b | (fma c (* a -4) (* b b)) |
4 calls. Slowest were:
| 17.0ms | (/ (* 2 c) (- (sqrt (fma c (* a -4) (* b b))) b)) |
| 10.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 174.0ms | (/ (* 2 c) (- (sqrt (fma c (* a -4) (* b b))) b)) |
| 60.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 46.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 38.0ms | (fma c (* a -4) (* b b)) |
34 calls. Slowest were:
| 621.0ms | (/ (* (* (* 2 c) (* 2 c)) (* 2 c)) (* (* (- (sqrt (fma c (* a -4) (* b b))) b) (- (sqrt (fma c (* a -4) (* b b))) b)) (- (sqrt (fma c (* a -4) (* b b))) b))) |
| 119.0ms | (+ (* (sqrt (fma c (* a -4) (* b b))) (sqrt (fma c (* a -4) (* b b)))) (+ (* b b) (* (sqrt (fma c (* a -4) (* b b))) b))) |
| 50.0ms | (- (pow b 2) (* 4 (* a c))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 10.2b
Found 4 expressions with local error:
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 1.2b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 0.1b | (* (* 2 c) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b))) |
| 0.1b | (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)) |
4 calls. Slowest were:
| 5.0ms | (* (* 2 c) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b))) |
| 5.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 5.0ms | (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)) |
4 calls. Slowest were:
| 152.0ms | (* (* 2 c) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b))) |
| 103.0ms | (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)) |
| 56.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 54.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
39 calls. Slowest were:
| 462.0ms | (* (* (* (* 2 c) (* 2 c)) (* 2 c)) (* (* (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b))) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)))) |
| 129.0ms | (* (* 2 c) (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b))) |
| 91.0ms | (+ (log (* 2 c)) (log (/ 1 (- (sqrt (fma c (* a -4) (* b b))) b)))) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 10.2b
Found 4 expressions with local error:
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 24.1b | (sqrt (fma c (* a -4) (* b b))) |
| 1.2b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 1.2b | (- (sqrt (fma c (* a -4) (* b b))) b) |
4 calls. Slowest were:
| 11.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 10.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 66.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 66.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 53.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 53.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
30 calls. Slowest were:
| 22.0ms | (sqrt (* (cbrt (fma c (* a -4) (* b b))) (cbrt (fma c (* a -4) (* b b))))) |
| 21.0ms | (* (cbrt (sqrt (fma c (* a -4) (* b b)))) (cbrt (sqrt (fma c (* a -4) (* b b))))) |
| 20.0ms | (sqrt (sqrt (fma c (* a -4) (* b b)))) |
7 alts after pruning (6 fresh and 1 done)
Merged error: 10.2b
91.7% (0.7b remaining)
Error of 13.3b against oracle of 12.6b and baseline of 21.3b