



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 25.8 |
|---|---|
| Target | 0.5 |
| Herbie | 13.0 |
if c < -2.0358380435950273e+138Initial program 43.2
Simplified43.2
rmApplied add-sqr-sqrt43.2
Applied *-un-lft-identity43.2
Applied times-frac43.1
Simplified43.1
Simplified29.5
rmApplied associate-*l/29.5
Simplified29.5
Taylor expanded around -inf 15.4
Simplified15.4
if -2.0358380435950273e+138 < c < 6.412199599525631e+120Initial program 18.7
Simplified18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.8
Simplified18.8
Simplified11.9
rmApplied associate-*l/11.8
Simplified11.8
rmApplied fma-neg11.8
rmApplied clear-num11.9
if 6.412199599525631e+120 < c Initial program 40.9
Simplified40.9
rmApplied add-sqr-sqrt40.9
Applied *-un-lft-identity40.9
Applied times-frac40.9
Simplified40.9
Simplified26.7
rmApplied associate-*l/26.6
Simplified26.6
rmApplied fma-neg26.6
Taylor expanded around inf 15.8
Final simplification13.0
herbie shell --seed 2019005 +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: 22.0s)Debug log
1 calls. Slowest were:
| 76.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 23.9b
Found 2 expressions with local error:
| 23.9b | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 0.0b | (- (* b c) (* a d)) |
2 calls. Slowest were:
| 7.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 4.0ms | (- (* b c) (* a d)) |
2 calls. Slowest were:
| 87.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 41.0ms | (- (* b c) (* a d)) |
37 calls. Slowest were:
| 595.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 311.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)))) |
| 237.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 16.3b
Found 4 expressions with local error:
| 16.1b | (/ (- (* b c) (* a d)) (hypot d c)) |
| 0.3b | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 0.0b | (- (* b c) (* a d)) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 12.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 10.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 4.0ms | (- (* b c) (* a d)) |
4 calls. Slowest were:
| 107.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 97.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 32.0ms | (hypot d c) |
| 28.0ms | (- (* b c) (* a d)) |
69 calls. Slowest were:
| 473.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 342.0ms | (* 1 (/ (- (* b c) (* a d)) (hypot d c))) |
| 324.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 8.1b
Found 4 expressions with local error:
| 16.1b | (/ (- (* c b) (* a d)) (hypot d c)) |
| 0.1b | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 0.0b | (- (* c b) (* a d)) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 8.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 6.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 2.0ms | (- (* c b) (* a d)) |
4 calls. Slowest were:
| 108.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 76.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 47.0ms | (- (* c b) (* a d)) |
| 35.0ms | (hypot d c) |
142 calls. Slowest were:
| 516.0ms | (- (* (* c b) (* c b)) (* (* a d) (* a d))) |
| 496.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))) |
| 350.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))) |
14 alts after pruning (14 fresh and 0 done)
Merged error: 8.1b
Found 4 expressions with local error:
| 16.1b | (/ (fma c b (- (* a d))) (hypot d c)) |
| 0.1b | (/ (/ (fma c b (- (* a d))) (hypot d c)) (hypot d c)) |
| 0.0b | (hypot d c) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 6.0ms | (/ (/ (fma c b (- (* a d))) (hypot d c)) (hypot d c)) |
| 3.0ms | (/ (fma c b (- (* a d))) (hypot d c)) |
| 0.0ms | (hypot d c) |
4 calls. Slowest were:
| 332.0ms | (/ (/ (fma c b (- (* a d))) (hypot d c)) (hypot d c)) |
| 69.0ms | (/ (fma c b (- (* a d))) (hypot d c)) |
| 24.0ms | (hypot d c) |
| 24.0ms | (hypot d c) |
135 calls. Slowest were:
| 276.0ms | (/ (/ (* (* (fma c b (- (* a d))) (fma c b (- (* a d)))) (fma c b (- (* a d)))) (* (* (hypot d c) (hypot d c)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 201.0ms | (/ (/ (* (cbrt (fma c b (- (* a d)))) (cbrt (fma c b (- (* a d))))) (* (cbrt (hypot d c)) (cbrt (hypot d c)))) 1) |
| 190.0ms | (/ (* (* (/ (fma c b (- (* a d))) (hypot d c)) (/ (fma c b (- (* a d))) (hypot d c))) (/ (fma c b (- (* a d))) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
13 alts after pruning (13 fresh and 0 done)
Merged error: 8.1b
34.7% (7.1b remaining)
Error of 13.0b against oracle of 5.9b and baseline of 16.8b