


Bits error versus a



Bits error versus b



Bits error versus c
if b < 2.6985622642685762e+103Initial program 14.7
Simplified14.7
rmApplied add-sqr-sqrt14.7
Applied sqrt-prod14.8
Applied fma-neg14.7
if 2.6985622642685762e+103 < b Initial program 45.6
Simplified45.6
Taylor expanded around 0 4.3
Final simplification13.1
herbie shell --seed 2019008 +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.8s)Debug log
1 calls. Slowest were:
| 104.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: 20.0b
Found 4 expressions with local error:
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 0.9b | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 0.8b | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
4 calls. Slowest were:
| 10.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 9.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))) |
| 55.0ms | (- (- b) (sqrt (fma c (* a -4) (* b b)))) |
| 49.0ms | (- (sqrt (fma c (* a -4) (* b b))) b) |
| 42.0ms | (sqrt (fma c (* a -4) (* b b))) |
81 calls. Slowest were:
| 99.0ms | (- (* 2 (/ (* a c) b)) (* 2 b)) |
| 75.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)))))))) |
| 74.0ms | (fma 1 (- b) (- (* (sqrt (fma c (* a -4) (* b b))) (sqrt 1)))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 14.5b
Found 4 expressions with local error:
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 16.2b | (fma (sqrt (sqrt (fma c (* a -4) (* b b)))) (sqrt (sqrt (fma c (* a -4) (* b b)))) (- b)) |
4 calls. Slowest were:
| 1.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 1.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 1.0ms | (sqrt (fma c (* a -4) (* b b))) |
4 calls. Slowest were:
| 331.0ms | (fma (sqrt (sqrt (fma c (* a -4) (* b b)))) (sqrt (sqrt (fma c (* a -4) (* b b)))) (- b)) |
| 68.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 52.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 51.0ms | (sqrt (fma c (* a -4) (* b b))) |
24 calls. Slowest were:
| 329.0ms | (- (pow (exp (* 1/4 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) 2) b) |
| 101.0ms | (- (pow (exp (* 1/4 (- (log -4) (+ (log (/ -1 c)) (log (/ -1 a)))))) 2) b) |
| 21.0ms | (sqrt (* (cbrt (fma c (* a -4) (* b b))) (cbrt (fma c (* a -4) (* b b))))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 14.5b
Found 4 expressions with local error:
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
| 23.7b | (sqrt (fma c (* a -4) (* b b))) |
| 23.1b | (fma (sqrt (cbrt (fma (* a -4) c (* b b)))) (fabs (cbrt (fma (* a -4) c (* b b)))) b) |
4 calls. Slowest were:
| 2.0ms | (sqrt (fma c (* a -4) (* b b))) |
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 271.0ms | (fma (sqrt (cbrt (fma (* a -4) c (* b b)))) (fabs (cbrt (fma (* a -4) c (* b b)))) b) |
| 211.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 195.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 63.0ms | (sqrt (fma c (* a -4) (* b b))) |
22 calls. Slowest were:
| 207.0ms | (+ (* (exp (* 1/6 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) (fabs (pow (fma (* -4 a) c (pow b 2)) 1/3))) b) |
| 200.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)))) |
| 198.0ms | (exp (* 1/3 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 14.5b
Found 4 expressions with local error:
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
| 24.5b | (cbrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 1.0ms | (cbrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 254.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 237.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 229.0ms | (cbrt (fma (* a -4) c (* b b))) |
| 215.0ms | (cbrt (fma (* a -4) c (* b b))) |
24 calls. Slowest were:
| 232.0ms | (exp (* 1/3 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) |
| 225.0ms | (exp (* 1/3 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) |
| 173.0ms | (- (pow b 2/3) (* 4/3 (* (* a c) (pow (/ 1 (pow b 4)) 1/3)))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 14.5b
91.4% (0.6b remaining)
Error of 13.1b against oracle of 12.5b and baseline of 19.5b