



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 25.9 |
|---|---|
| Target | 0.4 |
| Herbie | 13.3 |
if c < -2.9469398602138537e+156Initial program 44.4
Initial simplification44.4
rmApplied add-sqr-sqrt44.4
Applied *-un-lft-identity44.4
Applied times-frac44.4
Simplified44.4
Simplified28.2
rmApplied associate-*l/28.1
Simplified28.1
Taylor expanded around -inf 15.2
Simplified15.2
if -2.9469398602138537e+156 < c < 2.229079571946664e+76Initial program 18.7
Initial simplification18.7
rmApplied add-sqr-sqrt18.7
Applied *-un-lft-identity18.7
Applied times-frac18.7
Simplified18.7
Simplified11.9
rmApplied associate-*l/11.8
Simplified11.8
if 2.229079571946664e+76 < c Initial program 37.8
Initial simplification37.8
rmApplied add-sqr-sqrt37.8
Applied *-un-lft-identity37.8
Applied times-frac37.8
Simplified37.8
Simplified24.5
rmApplied associate-*l/24.4
Simplified24.4
Taylor expanded around inf 17.2
Final simplification13.3
herbie shell --seed 2018365 +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.1s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 27.0b
Found 2 expressions with local error:
| 27.0b | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 0.7b | (- (* b c) (* a d)) |
2 calls. Slowest were:
| 12.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 4.0ms | (- (* b c) (* a d)) |
2 calls. Slowest were:
| 71.0ms | (/ (- (* b c) (* a d)) (fma d d (* c c))) |
| 46.0ms | (- (* b c) (* a d)) |
37 calls. Slowest were:
| 590.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 335.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)))) |
| 284.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 18.0b
Found 4 expressions with local error:
| 17.6b | (/ (- (* b c) (* a d)) (hypot d c)) |
| 0.7b | (- (* 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:
| 7.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 6.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 2.0ms | (- (* b c) (* a d)) |
4 calls. Slowest were:
| 157.0ms | (* (/ 1 (hypot d c)) (/ (- (* b c) (* a d)) (hypot d c))) |
| 112.0ms | (/ (- (* b c) (* a d)) (hypot d c)) |
| 47.0ms | (- (* b c) (* a d)) |
| 27.0ms | (/ 1 (hypot d c)) |
73 calls. Slowest were:
| 626.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 368.0ms | (* 1 (/ (- (* b c) (* a d)) (hypot d c))) |
| 309.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
12 alts after pruning (12 fresh and 0 done)
Merged error: 5.1b
Found 3 expressions with local error:
| 17.6b | (/ (- (* c b) (* a d)) (hypot d c)) |
| 0.7b | (- (* c b) (* a d)) |
| 0.0b | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
3 calls. Slowest were:
| 15.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 11.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 4.0ms | (- (* c b) (* a d)) |
3 calls. Slowest were:
| 101.0ms | (/ (- (* c b) (* a d)) (hypot d c)) |
| 93.0ms | (/ (/ (- (* c b) (* a d)) (hypot d c)) (hypot d c)) |
| 31.0ms | (- (* c b) (* a d)) |
139 calls. Slowest were:
| 596.0ms | (- (* (* c b) (* c b)) (* (* a d) (* a d))) |
| 558.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))) |
| 372.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))) |
13 alts after pruning (12 fresh and 1 done)
Merged error: 5.0b
Found 4 expressions with local error:
| 17.6b | (/ (hypot d c) (- (* c b) (* a d))) |
| 0.7b | (- (* c b) (* a d)) |
| 0.2b | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
| 0.0b | (/ (/ 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)) |
| 2.0ms | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
4 calls. Slowest were:
| 116.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 105.0ms | (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) |
| 71.0ms | (/ (hypot d c) (- (* c b) (* a d))) |
| 33.0ms | (- (* c b) (* a d)) |
99 calls. Slowest were:
| 307.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 307.0ms | (/ (/ 1 (/ (hypot d c) (- (* c b) (* a d)))) (hypot d c)) |
| 289.0ms | (/ (* (cbrt (/ 1 (/ (hypot d c) (- (* c b) (* a d))))) (cbrt (/ 1 (/ (hypot d c) (- (* c b) (* a d)))))) (* (cbrt (hypot d c)) (cbrt (hypot d c)))) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 2.1b
22.6% (10.7b remaining)
Error of 13.3b against oracle of 2.6b and baseline of 16.5b