



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 26.1 |
|---|---|
| Target | 0.5 |
| Herbie | 12.7 |
if c < -4.001353954028944e+116Initial program 40.7
Initial simplification40.7
rmApplied add-sqr-sqrt40.7
Applied *-un-lft-identity40.7
Applied times-frac40.7
Simplified40.7
Simplified27.0
rmApplied associate-*l/26.9
Simplified26.9
Taylor expanded around -inf 15.6
Simplified15.6
if -4.001353954028944e+116 < c < 1.6521411071335998e+156Initial program 19.3
Initial simplification19.3
rmApplied add-sqr-sqrt19.3
Applied *-un-lft-identity19.3
Applied times-frac19.3
Simplified19.3
Simplified11.9
rmApplied associate-*l/11.8
Simplified11.8
rmApplied *-un-lft-identity11.8
Applied associate-/r*11.8
if 1.6521411071335998e+156 < c Initial program 43.9
Initial simplification43.9
rmApplied add-sqr-sqrt43.9
Applied *-un-lft-identity43.9
Applied times-frac43.9
Simplified43.9
Simplified28.2
rmApplied associate-*l/28.2
Simplified28.2
Taylor expanded around inf 13.8
Final simplification12.7
herbie shell --seed 2018365 +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: 17.5s)Debug log
1 alts after pruning (1 fresh and 0 done)
Merged error: 24.9b
Found 1 expressions with local error:
| 24.9b | (/ (fma a c (* b d)) (fma d d (* c c))) |
1 calls. Slowest were:
| 7.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
1 calls. Slowest were:
| 76.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
28 calls. Slowest were:
| 284.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)))) |
| 28.0ms | (- (log (fma a c (* b d))) (log (fma d d (* c c)))) |
| 25.0ms | (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) (sqrt (fma d d (* c c)))) |
8 alts after pruning (8 fresh and 0 done)
Merged error: 16.8b
Found 4 expressions with local error:
| 16.5b | (/ (fma d b (* a c)) (hypot d c)) |
| 0.5b | (fma d b (* a c)) |
| 0.2b | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 0.0b | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 12.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 7.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 2.0ms | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 119.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 69.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 33.0ms | (/ 1 (hypot d c)) |
| 28.0ms | (fma d b (* a c)) |
67 calls. Slowest were:
| 697.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)))) |
| 262.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 178.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))) (* (* (hypot d c) (hypot d c)) (hypot d c)))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 6.7b
Found 2 expressions with local error:
| 16.5b | (/ (fma c a (* b d)) (hypot d c)) |
| 0.1b | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
2 calls. Slowest were:
| 12.0ms | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
| 7.0ms | (/ (fma c a (* b d)) (hypot d c)) |
2 calls. Slowest were:
| 80.0ms | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
| 74.0ms | (/ (fma c a (* b d)) (hypot d c)) |
129 calls. Slowest were:
| 382.0ms | (/ (/ (* (* (fma c a (* b d)) (fma c a (* b d))) (fma c a (* b d))) (* (* (hypot d c) (hypot d c)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 232.0ms | (/ (* (* (/ (fma c a (* b d)) (hypot d c)) (/ (fma c a (* b d)) (hypot d c))) (/ (fma c a (* b d)) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 226.0ms | (/ (/ (* (cbrt (fma c a (* b d))) (cbrt (fma c a (* b d)))) (* (cbrt (hypot d c)) (cbrt (hypot d c)))) 1) |
10 alts after pruning (10 fresh and 0 done)
Merged error: 3.0b
Found 2 expressions with local error:
| 16.5b | (/ (/ (fma c a (* b d)) 1) (hypot d c)) |
| 0.1b | (/ (/ (/ (fma c a (* b d)) 1) (hypot d c)) (hypot d c)) |
2 calls. Slowest were:
| 8.0ms | (/ (/ (/ (fma c a (* b d)) 1) (hypot d c)) (hypot d c)) |
| 5.0ms | (/ (/ (fma c a (* b d)) 1) (hypot d c)) |
2 calls. Slowest were:
| 99.0ms | (/ (/ (fma c a (* b d)) 1) (hypot d c)) |
| 66.0ms | (/ (/ (/ (fma c a (* b d)) 1) (hypot d c)) (hypot d c)) |
158 calls. Slowest were:
| 898.0ms | (/ (* (* (/ (/ (fma c a (* b d)) 1) (hypot d c)) (/ (/ (fma c a (* b d)) 1) (hypot d c))) (/ (/ (fma c a (* b d)) 1) (hypot d c))) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 394.0ms | (/ (* (* (/ (fma c a (* b d)) 1) (/ (fma c a (* b d)) 1)) (/ (fma c a (* b d)) 1)) (* (* (hypot d c) (hypot d c)) (hypot d c))) |
| 258.0ms | (/ (/ (* (cbrt (/ (fma c a (* b d)) 1)) (cbrt (/ (fma c a (* b d)) 1))) (* (cbrt (hypot d c)) (cbrt (hypot d c)))) 1) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 3.0b
26.6% (10.4b remaining)
Error of 12.7b against oracle of 2.3b and baseline of 16.5b