


Bits error versus a



Bits error versus b



Bits error versus c
if b < 4.107445960089145e-23Initial program 22.4
Simplified22.4
rmApplied add-sqr-sqrt22.4
Applied sqrt-prod22.6
Applied fma-neg22.5
if 4.107445960089145e-23 < b Initial program 54.3
Simplified54.3
rmApplied *-un-lft-identity54.3
Applied associate-/l*54.3
Taylor expanded around 0 7.6
Simplified7.6
Final simplification17.5
herbie shell --seed 2019005 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, full range"
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))
Time bar (total: 14.6s)Debug log
1 calls. Slowest were:
| 76.0ms | (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 32.1b
Found 4 expressions with local error:
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 1.1b | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 0.1b | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 0.0b | (fma (* a -4) c (* b b)) |
4 calls. Slowest were:
| 10.0ms | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 5.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 1.0ms | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 109.0ms | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 62.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 58.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 30.0ms | (fma (* a -4) c (* b b)) |
34 calls. Slowest were:
| 772.0ms | (- (* (sqrt (fma (* a -4) c (* b b))) (sqrt (fma (* a -4) c (* b b)))) (* b b)) |
| 151.0ms | (- (pow (sqrt (fma (* a -4) c (* b b))) 3) (pow b 3)) |
| 89.0ms | (/ (* (* (- (sqrt (fma (* a -4) c (* b b))) b) (- (sqrt (fma (* a -4) c (* b b))) b)) (- (sqrt (fma (* a -4) c (* b b))) b)) (* (* (* 2 a) (* 2 a)) (* 2 a))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 22.8b
Found 4 expressions with local error:
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 1.1b | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 0.2b | (/ 1 (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b))) |
| 0.1b | (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b)) |
4 calls. Slowest were:
| 12.0ms | (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b)) |
| 10.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 7.0ms | (/ 1 (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b))) |
4 calls. Slowest were:
| 151.0ms | (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b)) |
| 104.0ms | (/ 1 (/ (* 2 a) (- (sqrt (fma (* a -4) c (* b b))) b))) |
| 74.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 48.0ms | (sqrt (fma (* a -4) c (* b b))) |
45 calls. Slowest were:
| 476.0ms | (/ (* (* (* 2 a) (* 2 a)) (* 2 a)) (* (* (- (sqrt (fma (* a -4) c (* b b))) b) (- (sqrt (fma (* a -4) c (* b b))) b)) (- (sqrt (fma (* a -4) c (* b b))) b))) |
| 105.0ms | (+ (* (sqrt (fma (* a -4) c (* b b))) (sqrt (fma (* a -4) c (* b b)))) (+ (* b b) (* (sqrt (fma (* a -4) c (* b b))) b))) |
| 84.0ms | (+ (* (sqrt (fma (* a -4) c (* b b))) (sqrt (fma (* a -4) c (* b b)))) (+ (* b b) (* (sqrt (fma (* a -4) c (* b b))) b))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 13.7b
Found 4 expressions with local error:
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 1.1b | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 1.1b | (- (sqrt (fma (* a -4) c (* b b))) b) |
4 calls. Slowest were:
| 8.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 6.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 3.0ms | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 74.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 71.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 64.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 50.0ms | (sqrt (fma (* a -4) c (* b b))) |
30 calls. Slowest were:
| 29.0ms | (sqrt (* (cbrt (fma (* a -4) c (* b b))) (cbrt (fma (* a -4) c (* b b))))) |
| 27.0ms | (sqrt (* (cbrt (fma (* a -4) c (* b b))) (cbrt (fma (* a -4) c (* b b))))) |
| 26.0ms | (* (cbrt (sqrt (fma (* a -4) c (* b b)))) (cbrt (sqrt (fma (* a -4) c (* b b))))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 13.7b
Found 4 expressions with local error:
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 23.2b | (sqrt (fma (* a -4) c (* b b))) |
| 1.1b | (- (sqrt (fma (* a -4) c (* b b))) b) |
4 calls. Slowest were:
| 10.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 2.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 2.0ms | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 70.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 53.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 48.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 47.0ms | (sqrt (fma (* a -4) c (* b b))) |
29 calls. Slowest were:
| 26.0ms | (* (cbrt (sqrt (fma (* a -4) c (* b b)))) (cbrt (sqrt (fma (* a -4) c (* b b))))) |
| 25.0ms | (sqrt (sqrt (fma (* a -4) c (* b b)))) |
| 24.0ms | (sqrt (sqrt (fma (* a -4) c (* b b)))) |
13 alts after pruning (11 fresh and 2 done)
Merged error: 13.7b
78% (4.5b remaining)
Error of 17.5b against oracle of 13.1b and baseline of 33.4b