



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 25.5 |
|---|---|
| Target | 0.4 |
| Herbie | 12.3 |
if c < -1.0598670353086325e+133Initial program 42.9
Initial simplification42.9
rmApplied add-sqr-sqrt42.9
Applied *-un-lft-identity42.9
Applied times-frac42.9
Simplified42.9
Simplified28.2
rmApplied associate-*r/28.2
rmApplied associate-*l/28.2
Simplified28.2
Taylor expanded around -inf 13.1
Simplified13.1
if -1.0598670353086325e+133 < c < 2.0830718422818717e+146Initial program 18.2
Initial simplification18.2
rmApplied add-sqr-sqrt18.2
Applied *-un-lft-identity18.2
Applied times-frac18.2
Simplified18.2
Simplified11.7
rmApplied associate-*r/11.7
rmApplied associate-*l/11.6
Simplified11.6
if 2.0830718422818717e+146 < c Initial program 44.4
Initial simplification44.4
rmApplied add-sqr-sqrt44.4
Applied *-un-lft-identity44.4
Applied times-frac44.4
Simplified44.4
Simplified28.5
rmApplied associate-*r/28.5
rmApplied associate-*l/28.5
Simplified28.5
Taylor expanded around inf 14.9
Final simplification12.3
herbie shell --seed 2018362 +o rules:numerics
(FPCore (a b c d)
:name "Complex division, real part"
:herbie-target
(if (< (fabs d) (fabs c)) (/ (+ a (* b (/ d c))) (+ c (* d (/ d c)))) (/ (+ b (* a (/ c d))) (+ d (* c (/ c d)))))
(/ (+ (* a c) (* b d)) (+ (* c c) (* d d))))
Time bar (total: 14.4s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 23.8b
Found 2 expressions with local error:
| 23.8b | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 0.0b | (fma a c (* b d)) |
2 calls. Slowest were:
| 3.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 0.0ms | (fma a c (* b d)) |
2 calls. Slowest were:
| 87.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 45.0ms | (fma a c (* b d)) |
31 calls. Slowest were:
| 275.0ms | (/ (* (* (fma a c (* b d)) (fma a c (* b d))) (fma a c (* b d))) (* (* (fma d d (* c c)) (fma d d (* c c))) (fma d d (* c c)))) |
| 37.0ms | (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) (* (cbrt (fma d d (* c c))) (cbrt (fma d d (* c c))))) |
| 26.0ms | (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) 1) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 16.3b
Found 4 expressions with local error:
| 16.0b | (/ (fma d b (* a c)) (hypot d c)) |
| 0.3b | (fma d b (* a c)) |
| 0.3b | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 0.0b | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 6.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 6.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 1.0ms | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 133.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 79.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 46.0ms | (fma d b (* a c)) |
| 32.0ms | (/ 1 (hypot d c)) |
67 calls. Slowest were:
| 598.0ms | (* (* (* (/ 1 (hypot d c)) (/ 1 (hypot d c))) (/ 1 (hypot d c))) (* (* (/ (fma d b (* a c)) (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) (/ (fma d b (* a c)) (hypot d c)))) |
| 315.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 219.0ms | (/ (* (* (fma d b (* a c)) (fma d b (* a c))) (fma d b (* a c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 6.8b
Found 4 expressions with local error:
| 16.1b | (* (/ 1 (hypot d c)) (fma d b (* a c))) |
| 0.3b | (fma d b (* a c)) |
| 0.1b | (/ (* (/ 1 (hypot d c)) (fma d b (* a c))) (hypot d c)) |
| 0.0b | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 7.0ms | (/ (* (/ 1 (hypot d c)) (fma d b (* a c))) (hypot d c)) |
| 4.0ms | (* (/ 1 (hypot d c)) (fma d b (* a c))) |
| 1.0ms | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 120.0ms | (/ (* (/ 1 (hypot d c)) (fma d b (* a c))) (hypot d c)) |
| 104.0ms | (* (/ 1 (hypot d c)) (fma d b (* a c))) |
| 45.0ms | (/ 1 (hypot d c)) |
| 35.0ms | (fma d b (* a c)) |
44 calls. Slowest were:
| 868.0ms | (* (* (* (/ 1 (hypot d c)) (/ 1 (hypot d c))) (/ 1 (hypot d c))) (* (* (fma d b (* a c)) (fma d b (* a c))) (fma d b (* a c)))) |
| 251.0ms | (- (log (* (/ 1 (hypot d c)) (fma d b (* a c)))) (log (hypot d c))) |
| 186.0ms | (* (/ 1 (hypot d c)) (fma d b (* a c))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 6.7b
Found 4 expressions with local error:
| 16.0b | (/ (fma a c (* b d)) (hypot d c)) |
| 0.1b | (/ (/ (fma a c (* b d)) (hypot d c)) (hypot d c)) |
| 0.0b | (hypot d c) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 12.0ms | (/ (/ (fma a c (* b d)) (hypot d c)) (hypot d c)) |
| 6.0ms | (/ (fma a c (* b d)) (hypot d c)) |
| 0.0ms | (hypot d c) |
4 calls. Slowest were:
| 130.0ms | (/ (fma a c (* b d)) (hypot d c)) |
| 129.0ms | (/ (/ (fma a c (* b d)) (hypot d c)) (hypot d c)) |
| 38.0ms | (hypot d c) |
| 38.0ms | (hypot d c) |
135 calls. Slowest were:
| 315.0ms | (/ (/ (* (* (fma a c (* b d)) (fma a c (* b d))) (fma a c (* b d))) (* (* (hypot d c) (hypot d c)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 238.0ms | (/ (* (* (/ (fma a c (* b d)) (hypot d c)) (/ (fma a c (* b d)) (hypot d c))) (/ (fma a c (* b d)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 220.0ms | (/ (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) (* (cbrt (hypot d c)) (cbrt (hypot d c)))) 1) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 2.9b
29.8% (9.8b remaining)
Error of 12.3b against oracle of 2.4b and baseline of 16.4b