


Bits error versus a



Bits error versus b



Bits error versus c
Initial program 28.4
Simplified28.4
rmApplied flip--28.5
Applied associate-/l/28.5
Simplified0.5
rmApplied times-frac0.3
Simplified0.3
rmApplied add-sqr-sqrt0.4
Applied fma-def0.3
Final simplification0.3
herbie shell --seed 2019004 +o rules:numerics
(FPCore (a b c)
:name "Quadratic roots, narrow range"
:pre (and (< 1.0536712127723509e-08 a 94906265.62425156) (< 1.0536712127723509e-08 b 94906265.62425156) (< 1.0536712127723509e-08 c 94906265.62425156))
(/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)))
Time bar (total: 16.7s)Debug log
1 calls. Slowest were:
| 91.0ms | (/ (+ (- b) (sqrt (- (* b b) (* (* 4 a) c)))) (* 2 a)) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 29.2b
Found 4 expressions with local error:
| 29.0b | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 0.3b | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 0.2b | (fma (* a -4) c (* b b)) |
| 0.1b | (sqrt (fma (* a -4) c (* b b))) |
4 calls. Slowest were:
| 11.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:
| 83.0ms | (/ (- (sqrt (fma (* a -4) c (* b b))) b) (* 2 a)) |
| 68.0ms | (- (sqrt (fma (* a -4) c (* b b))) b) |
| 43.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 32.0ms | (fma (* a -4) c (* b b)) |
34 calls. Slowest were:
| 732.0ms | (- (* (sqrt (fma (* a -4) c (* b b))) (sqrt (fma (* a -4) c (* b b)))) (* b b)) |
| 122.0ms | (- (pow (sqrt (fma (* a -4) c (* b b))) 3) (pow b 3)) |
| 71.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))) |
3 alts after pruning (3 fresh and 0 done)
Merged error: 0.5b
Found 4 expressions with local error:
| 0.4b | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 0.2b | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 0.2b | (fma (* a -4) c (* b b)) |
| 0.2b | (+ (sqrt (fma (* a -4) c (* b b))) b) |
4 calls. Slowest were:
| 19.0ms | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 16.0ms | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 6.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
4 calls. Slowest were:
| 107.0ms | (/ (* (* a -4) c) (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b))) |
| 104.0ms | (* (* 2 a) (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 77.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 48.0ms | (fma (* a -4) c (* b b)) |
37 calls. Slowest were:
| 736.0ms | (- (log (* (* a -4) c)) (+ (log (* 2 a)) (log (+ (sqrt (fma (* a -4) c (* b b))) b)))) |
| 591.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)))) |
| 554.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)))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 0.0b
Found 4 expressions with local error:
| 0.2b | (fma (* a -4) c (* b b)) |
| 0.2b | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 0.2b | (/ c (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 0.1b | (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:
| 158.0ms | (/ c (+ (sqrt (fma (* a -4) c (* b b))) b)) |
| 63.0ms | (+ (sqrt (fma (* a -4) c (* b b))) b) |
| 49.0ms | (sqrt (fma (* a -4) c (* b b))) |
| 49.0ms | (fma (* a -4) c (* b b)) |
26 calls. Slowest were:
| 240.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))) |
| 39.0ms | (- (pow b 2) (* 4 (* a c))) |
| 30.0ms | (sqrt (* (cbrt (fma (* a -4) c (* b b))) (cbrt (fma (* a -4) c (* b b))))) |
6 alts after pruning (6 fresh and 0 done)
Merged error: 0b
Found 4 expressions with local error:
| 0.2b | (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b) |
| 0.2b | (fma (* a -4) c (* b b)) |
| 0.2b | (fma (* a -4) c (* b b)) |
| 0.2b | (/ 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:
| 294.0ms | (/ c (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b)) |
| 267.0ms | (fma (sqrt (sqrt (fma (* a -4) c (* b b)))) (sqrt (sqrt (fma (* a -4) c (* b b)))) b) |
| 50.0ms | (fma (* a -4) c (* b b)) |
| 31.0ms | (fma (* a -4) c (* b b)) |
15 calls. Slowest were:
| 298.0ms | (+ (pow (exp (* 1/4 (- (log -4) (+ (log (/ 1 a)) (log (/ 1 c)))))) 2) b) |
| 241.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)))) |
| 178.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.3b remaining)
Error of 0.3b against oracle of 0.0b and baseline of 0.3b