



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 26.5 |
|---|---|
| Target | 0.5 |
| Herbie | 13.0 |
if d < -6.506377436448894e+135Initial program 43.3
rmApplied add-sqr-sqrt43.3
Applied *-un-lft-identity43.3
Applied times-frac43.3
Simplified43.3
Simplified29.0
rmApplied associate-*l/28.9
Simplified28.9
Taylor expanded around -inf 14.7
Simplified14.7
if -6.506377436448894e+135 < d < 4.881520392713296e+183Initial program 20.5
rmApplied add-sqr-sqrt20.5
Applied *-un-lft-identity20.5
Applied times-frac20.5
Simplified20.5
Simplified13.0
rmApplied associate-*r/12.9
if 4.881520392713296e+183 < d Initial program 43.4
rmApplied add-sqr-sqrt43.4
Applied *-un-lft-identity43.4
Applied times-frac43.4
Simplified43.4
Simplified30.3
rmApplied associate-*l/30.3
Simplified30.3
Taylor expanded around inf 10.6
Final simplification13.0
herbie shell --seed 2019007 +o rules:numerics
(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: 16.1s)Debug log
1 calls. Slowest were:
| 7.0ms | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
2 alts after pruning (2 fresh and 0 done)
Merged error: 28.5b
Found 3 expressions with local error:
| 28.5b | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
| 0.9b | (+ (* a c) (* b d)) |
| 0.0b | (+ (* c c) (* d d)) |
3 calls. Slowest were:
| 10.0ms | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
| 2.0ms | (+ (* a c) (* b d)) |
| 2.0ms | (+ (* c c) (* d d)) |
3 calls. Slowest were:
| 91.0ms | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
| 40.0ms | (+ (* a c) (* b d)) |
| 24.0ms | (+ (* c c) (* d d)) |
40 calls. Slowest were:
| 576.0ms | (- (* (* a c) (* a c)) (* (* b d) (* b d))) |
| 302.0ms | (+ (* (* c c) (* c c)) (- (* (* d d) (* d d)) (* (* c c) (* d d)))) |
| 172.0ms | (/ (* (* (+ (* a c) (* b d)) (+ (* a c) (* b d))) (+ (* a c) (* b d))) (* (* (+ (* c c) (* d d)) (+ (* c c) (* d d))) (+ (* c c) (* d d)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 19.7b
Found 4 expressions with local error:
| 19.4b | (/ (fma a c (* b d)) (hypot c d)) |
| 0.7b | (fma a c (* b d)) |
| 0.2b | (* (/ 1 (hypot c d)) (/ (fma a c (* b d)) (hypot c d))) |
| 0.0b | (/ 1 (hypot c d)) |
4 calls. Slowest were:
| 6.0ms | (* (/ 1 (hypot c d)) (/ (fma a c (* b d)) (hypot c d))) |
| 3.0ms | (/ (fma a c (* b d)) (hypot c d)) |
| 1.0ms | (/ 1 (hypot c d)) |
4 calls. Slowest were:
| 116.0ms | (* (/ 1 (hypot c d)) (/ (fma a c (* b d)) (hypot c d))) |
| 87.0ms | (/ (fma a c (* b d)) (hypot c d)) |
| 42.0ms | (fma a c (* b d)) |
| 30.0ms | (/ 1 (hypot c d)) |
67 calls. Slowest were:
| 554.0ms | (* (* (* (/ 1 (hypot c d)) (/ 1 (hypot c d))) (/ 1 (hypot c d))) (* (* (/ (fma a c (* b d)) (hypot c d)) (/ (fma a c (* b d)) (hypot c d))) (/ (fma a c (* b d)) (hypot c d)))) |
| 281.0ms | (* (/ 1 (hypot c d)) (/ (fma a c (* b d)) (hypot c d))) |
| 154.0ms | (* (* (* (/ 1 (hypot c d)) (/ 1 (hypot c d))) (/ 1 (hypot c d))) (/ (* (* (fma a c (* b d)) (fma a c (* b d))) (fma a c (* b d))) (* (* (hypot c d) (hypot c d)) (hypot c d)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 7.6b
Found 3 expressions with local error:
| 19.4b | (/ (fma d b (* c a)) (hypot c d)) |
| 0.2b | (fma d b (* c a)) |
| 0.1b | (/ (/ (fma d b (* c a)) (hypot c d)) (hypot c d)) |
3 calls. Slowest were:
| 6.0ms | (/ (/ (fma d b (* c a)) (hypot c d)) (hypot c d)) |
| 4.0ms | (/ (fma d b (* c a)) (hypot c d)) |
| 0.0ms | (fma d b (* c a)) |
3 calls. Slowest were:
| 101.0ms | (/ (/ (fma d b (* c a)) (hypot c d)) (hypot c d)) |
| 90.0ms | (/ (fma d b (* c a)) (hypot c d)) |
| 26.0ms | (fma d b (* c a)) |
132 calls. Slowest were:
| 271.0ms | (/ (/ (* (* (fma d b (* c a)) (fma d b (* c a))) (fma d b (* c a))) (* (* (hypot c d) (hypot c d)) (hypot c d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
| 241.0ms | (/ (* (* (/ (fma d b (* c a)) (hypot c d)) (/ (fma d b (* c a)) (hypot c d))) (/ (fma d b (* c a)) (hypot c d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
| 175.0ms | (/ (/ (* (cbrt (fma d b (* c a))) (cbrt (fma d b (* c a)))) 1) (* (cbrt (hypot c d)) (cbrt (hypot c d)))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 2.8b
Found 4 expressions with local error:
| 19.5b | (* (/ 1 (hypot c d)) (fma a c (* b d))) |
| 0.7b | (fma a c (* b d)) |
| 0.1b | (/ (* (/ 1 (hypot c d)) (fma a c (* b d))) (hypot c d)) |
| 0.0b | (/ 1 (hypot c d)) |
4 calls. Slowest were:
| 15.0ms | (/ (* (/ 1 (hypot c d)) (fma a c (* b d))) (hypot c d)) |
| 9.0ms | (* (/ 1 (hypot c d)) (fma a c (* b d))) |
| 2.0ms | (/ 1 (hypot c d)) |
4 calls. Slowest were:
| 136.0ms | (/ (* (/ 1 (hypot c d)) (fma a c (* b d))) (hypot c d)) |
| 114.0ms | (* (/ 1 (hypot c d)) (fma a c (* b d))) |
| 45.0ms | (/ 1 (hypot c d)) |
| 44.0ms | (fma a c (* b d)) |
44 calls. Slowest were:
| 728.0ms | (* (* (* (/ 1 (hypot c d)) (/ 1 (hypot c d))) (/ 1 (hypot c d))) (* (* (fma a c (* b d)) (fma a c (* b d))) (fma a c (* b d)))) |
| 255.0ms | (- (log (* (/ 1 (hypot c d)) (fma a c (* b d)))) (log (hypot c d))) |
| 164.0ms | (* (/ 1 (hypot c d)) (fma a c (* b d))) |
10 alts after pruning (8 fresh and 2 done)
Merged error: 2.7b
29.5% (10.4b remaining)
Error of 13.0b against oracle of 2.5b and baseline of 17.3b