



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 26.0 |
|---|---|
| Target | 0.4 |
| Herbie | 14.5 |
if d < 4.4205857620523035e+121Initial program 23.1
rmApplied add-sqr-sqrt23.1
Applied *-un-lft-identity23.1
Applied times-frac23.1
Simplified23.1
Simplified14.5
rmApplied associate-*l/14.4
Simplified14.4
if 4.4205857620523035e+121 < d Initial program 41.1
rmApplied add-sqr-sqrt41.1
Applied *-un-lft-identity41.1
Applied times-frac41.1
Simplified41.1
Simplified26.3
rmApplied associate-*l/26.2
Simplified26.2
rmApplied *-un-lft-identity26.2
Applied associate-/l*26.3
Taylor expanded around 0 15.1
Simplified15.1
Final simplification14.5
herbie shell --seed 2019008 +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.2s)Debug log
1 calls. Slowest were:
| 73.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 26.9b
Found 3 expressions with local error:
| 26.9b | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 0.7b | (- (* b c) (* a d)) |
| 0.0b | (+ (* c c) (* d d)) |
3 calls. Slowest were:
| 11.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 2.0ms | (+ (* c c) (* d d)) |
| 2.0ms | (- (* b c) (* a d)) |
3 calls. Slowest were:
| 59.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 28.0ms | (- (* b c) (* a d)) |
| 21.0ms | (+ (* c c) (* d d)) |
43 calls. Slowest were:
| 553.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 278.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
| 268.0ms | (+ (* (* c c) (* c c)) (- (* (* d d) (* d d)) (* (* c c) (* d d)))) |
9 alts after pruning (9 fresh and 0 done)
Merged error: 16.7b
Found 4 expressions with local error:
| 16.4b | (/ (- (* b c) (* a d)) (hypot c d)) |
| 0.7b | (- (* b c) (* a d)) |
| 0.3b | (* (/ 1 (hypot c d)) (/ (- (* b c) (* a d)) (hypot c d))) |
| 0.0b | (/ 1 (hypot c d)) |
4 calls. Slowest were:
| 13.0ms | (* (/ 1 (hypot c d)) (/ (- (* b c) (* a d)) (hypot c d))) |
| 11.0ms | (/ (- (* b c) (* a d)) (hypot c d)) |
| 4.0ms | (- (* b c) (* a d)) |
4 calls. Slowest were:
| 110.0ms | (* (/ 1 (hypot c d)) (/ (- (* b c) (* a d)) (hypot c d))) |
| 90.0ms | (/ (- (* b c) (* a d)) (hypot c d)) |
| 28.0ms | (- (* b c) (* a d)) |
| 26.0ms | (/ 1 (hypot c d)) |
73 calls. Slowest were:
| 470.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 294.0ms | (* 1 (/ (- (* b c) (* a d)) (hypot c d))) |
| 260.0ms | (/ (* (* (- (* b c) (* a d)) (- (* b c) (* a d))) (- (* b c) (* a d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 5.7b
Found 4 expressions with local error:
| 16.4b | (/ (- (* c b) (* a d)) (hypot c d)) |
| 0.7b | (- (* c b) (* a d)) |
| 0.1b | (/ (/ (- (* c b) (* a d)) (hypot c d)) (hypot c d)) |
| 0.0b | (hypot c d) |
4 calls. Slowest were:
| 13.0ms | (/ (/ (- (* c b) (* a d)) (hypot c d)) (hypot c d)) |
| 11.0ms | (/ (- (* c b) (* a d)) (hypot c d)) |
| 4.0ms | (- (* c b) (* a d)) |
4 calls. Slowest were:
| 80.0ms | (/ (- (* c b) (* a d)) (hypot c d)) |
| 74.0ms | (/ (/ (- (* c b) (* a d)) (hypot c d)) (hypot c d)) |
| 39.0ms | (hypot c d) |
| 34.0ms | (- (* c b) (* a d)) |
142 calls. Slowest were:
| 580.0ms | (- (* (* c b) (* c b)) (* (* a d) (* a d))) |
| 406.0ms | (/ (* (* (/ (- (* c b) (* a d)) (hypot c d)) (/ (- (* c b) (* a d)) (hypot c d))) (/ (- (* c b) (* a d)) (hypot c d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
| 383.0ms | (/ (/ (* (* (- (* c b) (* a d)) (- (* c b) (* a d))) (- (* c b) (* a d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
14 alts after pruning (13 fresh and 1 done)
Merged error: 5.6b
Found 4 expressions with local error:
| 16.5b | (/ (hypot c d) (- (* c b) (* a d))) |
| 0.7b | (- (* c b) (* a d)) |
| 0.2b | (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) |
| 0.1b | (/ (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) (hypot c d)) |
4 calls. Slowest were:
| 5.0ms | (/ (hypot c d) (- (* c b) (* a d))) |
| 4.0ms | (/ (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) (hypot c d)) |
| 2.0ms | (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) |
4 calls. Slowest were:
| 91.0ms | (/ (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) (hypot c d)) |
| 66.0ms | (/ (hypot c d) (- (* c b) (* a d))) |
| 65.0ms | (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) |
| 27.0ms | (- (* c b) (* a d)) |
99 calls. Slowest were:
| 289.0ms | (/ (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) (hypot c d)) |
| 284.0ms | (/ (/ 1 (/ (hypot c d) (- (* c b) (* a d)))) (hypot c d)) |
| 219.0ms | (- (log (/ 1 (/ (hypot c d) (- (* c b) (* a d))))) (log (hypot c d))) |
12 alts after pruning (11 fresh and 1 done)
Merged error: 5.6b
16.7% (9.0b remaining)
Error of 14.5b against oracle of 5.6b and baseline of 16.3b