


Bits error versus a



Bits error versus b



Bits error versus c
if b < 7.79324369207276e+95Initial program 15.3
Simplified15.3
rmApplied add-cube-cbrt15.4
Applied sqrt-prod15.4
Applied *-un-lft-identity15.4
Applied prod-diff15.5
Simplified15.5
Simplified15.4
if 7.79324369207276e+95 < b Initial program 42.9
Simplified42.8
Taylor expanded around 0 4.0
Final simplification13.7
herbie shell --seed 2019005 +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: 19.0s)Debug log
1 calls. Slowest were:
| 98.0ms | (if (>= b 0) (/ (- (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) (/ (* 2 c) (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 19.9b
Found 4 expressions with local error:
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 1.1b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 1.1b | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
4 calls. Slowest were:
| 10.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 10.0ms | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 70.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 69.0ms | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
| 53.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 53.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
81 calls. Slowest were:
| 76.0ms | (fma 1 (- b) (- (* (sqrt (fma c (* a -4) (* b b))) 1))) |
| 71.0ms | (fma 1 (- b) (- (* (sqrt (cbrt (fma c (* a -4) (* b b)))) (sqrt (* (cbrt (fma c (* a -4) (* b b))) (cbrt (fma c (* a -4) (* b b)))))))) |
| 65.0ms | (fma (* (cbrt (- b)) (cbrt (- b))) (cbrt (- b)) (- (* (sqrt (fma c (* a -4) (* b b))) (sqrt 1)))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 13.9b
Found 4 expressions with local error:
| 25.1b | (cbrt (fma (* a -4) c (* b b))) |
| 25.1b | (cbrt (fma (* a -4) c (* b b))) |
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 22.7b | (fma (fabs (cbrt (fma (* a -4) c (* b b)))) (sqrt (cbrt (fma (* a -4) c (* b b)))) b) |
4 calls. Slowest were:
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 2.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 313.0ms | (fma (fabs (cbrt (fma (* a -4) c (* b b)))) (sqrt (cbrt (fma (* a -4) c (* b b)))) b) |
| 233.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 210.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 51.0ms | (sqrt (fma c (* a -4) (* b b))) |
22 calls. Slowest were:
| 205.0ms | (exp (* 1/3 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) |
| 186.0ms | (- (pow b 2/3) (* 4/3 (* (* a c) (pow (/ 1 (pow b 4)) 1/3)))) |
| 179.0ms | (- (+ b (* (fabs (pow (fma (* -4 a) c (pow b 2)) 1/3)) (pow b 1/3))) (* 2/3 (* (* a (* (fabs (pow (fma (* -4 a) c (pow b 2)) 1/3)) c)) (pow (/ 1 (pow b 5)) 1/3)))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 13.9b
Found 4 expressions with local error:
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 1.1b | (- (sqrt (fma c (* a -4) (* b b))) b) |
4 calls. Slowest were:
| 10.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 72.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 67.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 55.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 45.0ms | (sqrt (fma c (* a -4) (* b b))) |
29 calls. Slowest were:
| 21.0ms | (sqrt (* (cbrt (fma c (* a -4) (* b b))) (cbrt (fma c (* a -4) (* b b))))) |
| 19.0ms | (sqrt (sqrt (fma c (* a -4) (* b b)))) |
| 17.0ms | (sqrt (fma c (* a -4) (* b b))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 13.9b
Found 4 expressions with local error:
| 25.1b | (cbrt (fma c (* a -4) (* b b))) |
| 25.1b | (cbrt (fma (* c -4) a (* b b))) |
| 24.3b | (sqrt (fma c (* a -4) (* b b))) |
| 5.5b | (- (* (fabs (cbrt (fma (* c -4) a (* b b)))) (sqrt (cbrt (fma c (* a -4) (* b b))))) b) |
4 calls. Slowest were:
| 14.0ms | (- (* (fabs (cbrt (fma (* c -4) a (* b b)))) (sqrt (cbrt (fma c (* a -4) (* b b))))) b) |
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 1.0ms | (cbrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 314.0ms | (- (* (fabs (cbrt (fma (* c -4) a (* b b)))) (sqrt (cbrt (fma c (* a -4) (* b b))))) b) |
| 235.0ms | (cbrt (fma c (* a -4) (* b b))) |
| 214.0ms | (cbrt (fma (* c -4) a (* b b))) |
| 44.0ms | (sqrt (fma c (* a -4) (* b b))) |
23 calls. Slowest were:
| 224.0ms | (exp (* 1/3 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) |
| 215.0ms | (- (pow b 2/3) (* 4/3 (* (* a c) (pow (/ 1 (pow b 4)) 1/3)))) |
| 201.0ms | (- (pow b 2/3) (* 4/3 (* (* a c) (pow (/ 1 (pow b 4)) 1/3)))) |
11 alts after pruning (8 fresh and 3 done)
Merged error: 13.9b
89.1% (0.7b remaining)
Error of 13.7b against oracle of 13.0b and baseline of 19.5b