



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 26.1 |
|---|---|
| Target | 0.5 |
| Herbie | 26.0 |
if d < 3.052453129606842e+67Initial program 23.0
Initial simplification23.0
rmApplied add-sqr-sqrt23.0
Applied associate-/r*22.9
rmApplied div-inv23.0
if 3.052453129606842e+67 < d Initial program 37.9
Initial simplification37.9
rmApplied add-sqr-sqrt37.9
Applied associate-/r*37.9
rmApplied div-inv37.9
Taylor expanded around inf 37.8
Final simplification26.0
herbie shell --seed 2018365
(FPCore (a b c d)
:name "Complex division, real part"
:herbie-target
(if (< (fabs d) (fabs c)) (/ (+ a (* b (/ d c))) (+ c (* d (/ d c)))) (/ (+ b (* a (/ c d))) (+ d (* c (/ c d)))))
(/ (+ (* a c) (* b d)) (+ (* c c) (* d d))))
Time bar (total: 12.1s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 24.9b
Found 2 expressions with local error:
| 24.9b | (/ (+ (* b d) (* a c)) (+ (* c c) (* d d))) |
| 0.5b | (+ (* b d) (* a c)) |
2 calls. Slowest were:
| 19.0ms | (/ (+ (* b d) (* a c)) (+ (* c c) (* d d))) |
| 4.0ms | (+ (* b d) (* a c)) |
2 calls. Slowest were:
| 97.0ms | (/ (+ (* b d) (* a c)) (+ (* c c) (* d d))) |
| 42.0ms | (+ (* b d) (* a c)) |
36 calls. Slowest were:
| 240.0ms | (- (* (* b d) (* b d)) (* (* a c) (* a c))) |
| 166.0ms | (+ (* (* c c) (* c c)) (- (* (* d d) (* d d)) (* (* c c) (* d d)))) |
| 134.0ms | (/ (* (* (+ (* b d) (* a c)) (+ (* b d) (* a c))) (+ (* b d) (* a c))) (* (* (+ (* c c) (* d d)) (+ (* c c) (* d d))) (+ (* c c) (* d d)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 24.4b
Found 4 expressions with local error:
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 16.5b | (/ (+ (* b d) (* a c)) (sqrt (+ (* c c) (* d d)))) |
| 0.5b | (+ (* b d) (* a c)) |
4 calls. Slowest were:
| 19.0ms | (/ (+ (* b d) (* a c)) (sqrt (+ (* c c) (* d d)))) |
| 4.0ms | (+ (* b d) (* a c)) |
| 4.0ms | (sqrt (+ (* c c) (* d d))) |
4 calls. Slowest were:
| 105.0ms | (/ (+ (* b d) (* a c)) (sqrt (+ (* c c) (* d d)))) |
| 36.0ms | (+ (* b d) (* a c)) |
| 31.0ms | (sqrt (+ (* c c) (* d d))) |
| 31.0ms | (sqrt (+ (* c c) (* d d))) |
75 calls. Slowest were:
| 271.0ms | (- (* (* b d) (* b d)) (* (* a c) (* a c))) |
| 176.0ms | (sqrt (- (* (* c c) (* c c)) (* (* d d) (* d d)))) |
| 169.0ms | (sqrt (+ (* (* c c) (* c c)) (- (* (* d d) (* d d)) (* (* c c) (* d d))))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 22.3b
Found 4 expressions with local error:
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 16.6b | (/ (sqrt (+ (* c c) (* d d))) (+ (* b d) (* a c))) |
| 0.5b | (+ (* b d) (* a c)) |
4 calls. Slowest were:
| 13.0ms | (/ (sqrt (+ (* c c) (* d d))) (+ (* b d) (* a c))) |
| 4.0ms | (+ (* b d) (* a c)) |
| 4.0ms | (sqrt (+ (* c c) (* d d))) |
4 calls. Slowest were:
| 72.0ms | (/ (sqrt (+ (* c c) (* d d))) (+ (* b d) (* a c))) |
| 36.0ms | (sqrt (+ (* c c) (* d d))) |
| 31.0ms | (sqrt (+ (* c c) (* d d))) |
| 24.0ms | (+ (* b d) (* a c)) |
75 calls. Slowest were:
| 354.0ms | (+ (* (* b d) (* b d)) (- (* (* a c) (* a c)) (* (* b d) (* a c)))) |
| 157.0ms | (sqrt (- (* (* c c) (* c c)) (* (* d d) (* d d)))) |
| 140.0ms | (sqrt (- (* (* c c) (* c c)) (* (* d d) (* d d)))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 22.3b
Found 4 expressions with local error:
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 29.3b | (sqrt (+ (* c c) (* d d))) |
| 16.7b | (* (+ (* b d) (* a c)) (/ 1 (sqrt (+ (* c c) (* d d))))) |
| 0.5b | (+ (* b d) (* a c)) |
4 calls. Slowest were:
| 6.0ms | (* (+ (* b d) (* a c)) (/ 1 (sqrt (+ (* c c) (* d d))))) |
| 4.0ms | (sqrt (+ (* c c) (* d d))) |
| 2.0ms | (+ (* b d) (* a c)) |
4 calls. Slowest were:
| 73.0ms | (* (+ (* b d) (* a c)) (/ 1 (sqrt (+ (* c c) (* d d))))) |
| 24.0ms | (+ (* b d) (* a c)) |
| 19.0ms | (sqrt (+ (* c c) (* d d))) |
| 19.0ms | (sqrt (+ (* c c) (* d d))) |
45 calls. Slowest were:
| 419.0ms | (* (- (* (* b d) (* b d)) (* (* a c) (* a c))) 1) |
| 355.0ms | (* (+ (pow (* b d) 3) (pow (* a c) 3)) 1) |
| 182.0ms | (* (+ (pow (* b d) 3) (pow (* a c) 3)) (/ 1 (sqrt (+ (* c c) (* d d))))) |
10 alts after pruning (7 fresh and 3 done)
Merged error: 22.3b
1.2% (2.7b remaining)
Error of 26.0b against oracle of 23.4b and baseline of 26.1b