



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 25.3 |
|---|---|
| Target | 0.4 |
| Herbie | 13.6 |
if c < -1.8330085165230746e+75Initial program 35.7
Simplified35.7
rmApplied add-sqr-sqrt35.7
Applied *-un-lft-identity35.7
Applied times-frac35.7
Simplified35.7
Simplified23.7
rmApplied associate-*l/23.6
Simplified23.6
Taylor expanded around -inf 17.9
Simplified17.9
if -1.8330085165230746e+75 < c < 1.2160163022410464e+91Initial program 18.4
Simplified18.4
rmApplied add-sqr-sqrt18.4
Applied *-un-lft-identity18.4
Applied times-frac18.4
Simplified18.4
Simplified11.3
rmApplied associate-*r/11.3
if 1.2160163022410464e+91 < c Initial program 37.0
Simplified37.0
rmApplied add-sqr-sqrt37.0
Applied *-un-lft-identity37.0
Applied times-frac37.1
Simplified37.1
Simplified24.1
rmApplied associate-*l/24.0
Simplified24.0
rmApplied clear-num24.1
Taylor expanded around 0 17.0
Final simplification13.6
herbie shell --seed 2019004 +o rules:numerics
(FPCore (a b c d)
:name "Complex division, imag part"
:herbie-target
(if (< (fabs d) (fabs c)) (/ (- b (* a (/ d c))) (+ c (* d (/ d c)))) (/ (+ (- a) (* b (/ c d))) (+ d (* c (/ c d)))))
(/ (- (* b c) (* a d)) (+ (* c c) (* d d))))
Time bar (total: 24.0s)Debug log
1 calls. Slowest were:
| 62.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 27.7b
Found 3 expressions with local error:
| 27.7b | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 0.8b | (- (* b c) (* a d)) |
| 0.0b | (fma d d (* c c)) |
3 calls. Slowest were:
| 10.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 2.0ms | (- (* b c) (* a d)) |
| 0.0ms | (fma d d (* c c)) |
3 calls. Slowest were:
| 67.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 32.0ms | (- (* b c) (* a d)) |
| 21.0ms | (fma d d (* c c)) |
40 calls. Slowest were:
| 564.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 307.0ms | (/ (* (* (- (* b c) (* a d)) (- (* b c) (* a d))) (- (* b c) (* a d))) (* (* (fma d d (* c c)) (fma d d (* c c))) (fma d d (* c c)))) |
| 280.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 18.2b
Found 4 expressions with local error:
| 17.9b | (/ (- (* b c) (* a d)) (hypot d c)) |
| 0.8b | (- (* b c) (* a d)) |
| 0.2b | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 0.0b | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 14.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 12.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 4.0ms | (- (* b c) (* a d)) |
4 calls. Slowest were:
| 120.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 83.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 39.0ms | (- (* b c) (* a d)) |
| 37.0ms | (/ 1 (hypot d c)) |
73 calls. Slowest were:
| 500.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 339.0ms | (* 1 (/ (- (* b c) (* a d)) (hypot d c))) |
| 266.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 7.3b
Found 3 expressions with local error:
| 17.9b | (/ (- (* c b) (* a d)) (hypot d c)) |
| 0.8b | (- (* c b) (* a d)) |
| 0.1b | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
3 calls. Slowest were:
| 10.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 8.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 2.0ms | (- (* c b) (* a d)) |
3 calls. Slowest were:
| 96.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 80.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 39.0ms | (- (* c b) (* a d)) |
139 calls. Slowest were:
| 616.0ms | (/ (* (* (/ (- (* c b) (* a d)) (hypot d c)) (/ (- (* c b) (* a d)) (hypot d c))) (/ (- (* c b) (* a d)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 574.0ms | (- (* (* c b) (* c b)) (* (* a d) (* a d))) |
| 444.0ms | (/ (/ (* (* (- (* c b) (* a d)) (- (* c b) (* a d))) (- (* c b) (* a d))) (* (* (hypot d c) (hypot d c)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 7.3b
Found 4 expressions with local error:
| 18.0b | (/ (hypot d c) (- (* c b) (* a d))) |
| 0.8b | (- (* c b) (* a d)) |
| 0.2b | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
| 0.1b | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
4 calls. Slowest were:
| 5.0ms | (/ (hypot d c) (- (* c b) (* a d))) |
| 4.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 3.0ms | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
4 calls. Slowest were:
| 120.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 102.0ms | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
| 76.0ms | (/ (hypot d c) (- (* c b) (* a d))) |
| 39.0ms | (- (* c b) (* a d)) |
99 calls. Slowest were:
| 326.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 323.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 251.0ms | (- (log (/ 1 (/ (hypot d c) (- (* c b) (* a d))))) (log (hypot d c))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 3.5b
18% (11.3b remaining)
Error of 13.6b against oracle of 2.3b and baseline of 16.1b