


Bits error versus a



Bits error versus b



Bits error versus c
Initial program 52.8
Initial simplification52.8
rmApplied flip--52.8
Applied associate-/l/52.8
Simplified0.4
rmApplied times-frac0.1
Simplified0.1
rmApplied add-sqr-sqrt0.1
Applied sqrt-prod0.3
Applied fma-def0.1
Final simplification0.1
herbie shell --seed 2018362 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, wide range"
:pre (and (< 4.930380657631324e-32 a 2.028240960365167e+31) (< 4.930380657631324e-32 b 2.028240960365167e+31) (< 4.930380657631324e-32 c 2.028240960365167e+31))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))
Time bar (total: 13.7s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 52.4b
Found 4 expressions with local error:
| 27.5b | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 0.1b | (fma (* a -4) c (* b b)) |
| 0.1b | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 0.0b | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 18.0ms | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 14.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 1.0ms | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 74.0ms | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 61.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 41.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 29.0ms | (fma (* a -4) c (* b b)) |
34 calls. Slowest were:
| 730.0ms | (- (* (sqrt (fma (* a -4) c (* b b))) (sqrt (fma (* a -4) c (* b b)))) (* b b)) |
| 133.0ms | (- (pow (sqrt (fma (* a -4) c (* b b))) 3) (pow b 3)) |
| 65.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))) |
4 alts after pruning (4 fresh and 0 done)
Merged error: 0.3b
Found 4 expressions with local error:
| 0.3b | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 0.1b | (fma (* a -4) c (* b b)) |
| 0.1b | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 0.1b | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
4 calls. Slowest were:
| 18.0ms | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 8.0ms | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 4.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
4 calls. Slowest were:
| 123.0ms | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 118.0ms | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 81.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 48.0ms | (fma (* a -4) c (* b b)) |
37 calls. Slowest were:
| 697.0ms | (/ (* (* (* (* a -4) c) (* (* a -4) c)) (* (* a -4) c)) (* (* (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)))) |
| 681.0ms | (- (log (* (* a -4) c)) (+ (log (* 2 a)) (log (+ (sqrt (fma (* a -4) c (* b b))) b)))) |
| 564.0ms | (/ (* (* (* (* a -4) c) (* (* a -4) c)) (* (* a -4) c)) (* (* (* (* 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)))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.1b | (fma (* a -4) c (* b b)) |
| 0.1b | (/ c (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 0.1b | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 0.0b | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 4.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 2.0ms | (/ c (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 1.0ms | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 144.0ms | (/ c (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 66.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 62.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 38.0ms | (fma (* a -4) c (* b b)) |
26 calls. Slowest were:
| 234.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))) |
| 45.0ms | (- (pow b 2) (* 4 (* a c))) |
| 30.0ms | (- (pow b 2) (* 4 (* a c))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.1b | (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b) |
| 0.1b | (fma (* a -4) c (* b b)) |
| 0.1b | (fma (* a -4) c (* b b)) |
| 0.1b | (/ c (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b)) |
4 calls. Slowest were:
| 0.0ms | (/ c (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b)) |
| 0.0ms | (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b) |
| 0.0ms | (fma (* a -4) c (* b b)) |
4 calls. Slowest were:
| 330.0ms | (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b) |
| 277.0ms | (/ c (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b)) |
| 42.0ms | (fma (* a -4) c (* b b)) |
| 32.0ms | (fma (* a -4) c (* b b)) |
15 calls. Slowest were:
| 321.0ms | (+ (pow (exp (* 1/4 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) 2) b) |
| 191.0ms | (- (/ c b) (+ (* 1/4 (/ (pow (exp (* 1/4 (- (log -4) (+ (log (/ -1 c)) (log (/ -1 a)))))) 4) (* a b))) (/ (* c (pow (exp (* 1/4 (- (log -4) (+ (log (/ -1 c)) (log (/ -1 a)))))) 2)) (pow b 2)))) |
| 176.0ms | (- (/ c b) (+ (/ (* (pow (exp (* 1/4 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) 2) c) (pow b 2)) (* 1/4 (/ (pow (exp (* 1/4 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) 4) (* a b))))) |
6 alts after pruning (5 fresh and 1 done)
Merged error: 0b
0% (0.1b remaining)
Error of 0.1b against oracle of 0.0b and baseline of 0.1b