



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 25.0 |
|---|---|
| Target | 0.5 |
| Herbie | 4.8 |
if b < -3.7549061336177695e+50 or 3.160825419620763e+142 < b Initial program 33.6
rmApplied add-sqr-sqrt33.6
Applied *-un-lft-identity33.6
Applied times-frac33.6
Simplified33.6
Simplified28.1
rmApplied associate-*l/28.0
Simplified28.0
rmApplied div-sub28.0
rmApplied *-un-lft-identity28.0
Applied times-frac10.2
Simplified10.2
if -3.7549061336177695e+50 < b < 3.160825419620763e+142Initial program 21.1
rmApplied add-sqr-sqrt21.1
Applied *-un-lft-identity21.1
Applied times-frac21.1
Simplified21.1
Simplified10.6
rmApplied associate-*l/10.5
Simplified10.5
rmApplied div-sub10.5
rmApplied *-un-lft-identity10.5
Applied times-frac2.3
Simplified2.3
Final simplification4.8
herbie shell --seed 2018362 +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: 23.4s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 22.7b
Found 3 expressions with local error:
| 22.7b | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 0.5b | (- (* b c) (* a d)) |
| 0.0b | (+ (* c c) (* d d)) |
3 calls. Slowest were:
| 12.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 4.0ms | (+ (* c c) (* d d)) |
| 4.0ms | (- (* b c) (* a d)) |
3 calls. Slowest were:
| 79.0ms | (/ (- (* b c) (* a d)) (+ (* c c) (* d d))) |
| 27.0ms | (- (* b c) (* a d)) |
| 15.0ms | (+ (* c c) (* d d)) |
43 calls. Slowest were:
| 586.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 303.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
| 249.0ms | (+ (* (* c c) (* c c)) (- (* (* d d) (* d d)) (* (* c c) (* d d)))) |
9 alts after pruning (8 fresh and 1 done)
Merged error: 15.4b
Found 4 expressions with local error:
| 15.1b | (/ (- (* b c) (* a d)) (hypot c d)) |
| 0.5b | (- (* 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:
| 7.0ms | (* (/ 1 (hypot c d)) (/ (- (* b c) (* a d)) (hypot c d))) |
| 6.0ms | (/ (- (* b c) (* a d)) (hypot c d)) |
| 2.0ms | (- (* b c) (* a d)) |
4 calls. Slowest were:
| 118.0ms | (* (/ 1 (hypot c d)) (/ (- (* b c) (* a d)) (hypot c d))) |
| 97.0ms | (/ (- (* b c) (* a d)) (hypot c d)) |
| 42.0ms | (/ 1 (hypot c d)) |
| 34.0ms | (- (* b c) (* a d)) |
73 calls. Slowest were:
| 584.0ms | (- (* (* b c) (* b c)) (* (* a d) (* a d))) |
| 359.0ms | (* 1 (/ (- (* b c) (* a d)) (hypot c d))) |
| 306.0ms | (- (pow (* b c) 3) (pow (* a d) 3)) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 4.5b
Found 4 expressions with local error:
| 15.1b | (/ (- (* c b) (* a d)) (hypot c d)) |
| 0.5b | (- (* 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:
| 7.0ms | (/ (/ (- (* c b) (* a d)) (hypot c d)) (hypot c d)) |
| 6.0ms | (/ (- (* c b) (* a d)) (hypot c d)) |
| 2.0ms | (- (* c b) (* a d)) |
4 calls. Slowest were:
| 85.0ms | (/ (/ (- (* c b) (* a d)) (hypot c d)) (hypot c d)) |
| 65.0ms | (/ (- (* c b) (* a d)) (hypot c d)) |
| 35.0ms | (hypot c d) |
| 28.0ms | (- (* c b) (* a d)) |
142 calls. Slowest were:
| 639.0ms | (- (* (* c b) (* c b)) (* (* a d) (* a d))) |
| 495.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))) |
| 437.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))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 4.5b
Found 4 expressions with local error:
| 9.9b | (/ (* c b) (hypot c d)) |
| 9.5b | (/ (* a d) (hypot c d)) |
| 0.1b | (/ (- (/ (* c b) (hypot c d)) (/ (* a d) (hypot c d))) (hypot c d)) |
| 0.0b | (hypot c d) |
4 calls. Slowest were:
| 36.0ms | (/ (- (/ (* c b) (hypot c d)) (/ (* a d) (hypot c d))) (hypot c d)) |
| 3.0ms | (/ (* c b) (hypot c d)) |
| 3.0ms | (/ (* a d) (hypot c d)) |
4 calls. Slowest were:
| 165.0ms | (/ (- (/ (* c b) (hypot c d)) (/ (* a d) (hypot c d))) (hypot c d)) |
| 55.0ms | (/ (* c b) (hypot c d)) |
| 54.0ms | (/ (* a d) (hypot c d)) |
| 27.0ms | (hypot c d) |
84 calls. Slowest were:
| 653.0ms | (/ (* (* (* a d) (* a d)) (* a d)) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
| 469.0ms | (/ (* (* (* c b) (* c b)) (* c b)) (* (* (hypot c d) (hypot c d)) (hypot c d))) |
| 394.0ms | (- (pow (/ (* c b) (hypot c d)) 3) (pow (/ (* a d) (hypot c d)) 3)) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 0.2b
52% (4.1b remaining)
Error of 4.8b against oracle of 0.7b and baseline of 9.3b