



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 26.3 |
|---|---|
| Target | 0.4 |
| Herbie | 13.2 |
if d < -8.346460948837449e+220Initial program 42.5
Simplified42.5
rmApplied add-sqr-sqrt42.5
Applied *-un-lft-identity42.5
Applied times-frac42.5
Simplified42.5
Simplified32.6
rmApplied associate-*l/32.6
Simplified32.6
rmApplied *-un-lft-identity32.6
Applied associate-/l*32.6
Taylor expanded around -inf 11.2
Simplified11.2
if -8.346460948837449e+220 < d < 1.0043357683224773e+119Initial program 21.3
Simplified21.3
rmApplied add-sqr-sqrt21.3
Applied *-un-lft-identity21.3
Applied times-frac21.3
Simplified21.3
Simplified12.9
rmApplied associate-*l/12.8
Simplified12.8
if 1.0043357683224773e+119 < d Initial program 40.6
Simplified40.6
rmApplied add-sqr-sqrt40.6
Applied *-un-lft-identity40.6
Applied times-frac40.6
Simplified40.6
Simplified26.2
rmApplied associate-*l/26.2
Simplified26.2
rmApplied *-un-lft-identity26.2
Applied associate-/l*26.2
Taylor expanded around inf 15.8
Final simplification13.2
herbie shell --seed 2019005 +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.8s)Debug log
1 calls. Slowest were:
| 12.0ms | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 23.6b
Found 2 expressions with local error:
| 23.6b | (/ (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:
| 72.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 47.0ms | (fma a c (* b d)) |
31 calls. Slowest were:
| 241.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 | (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) (* (cbrt (fma d d (* c c))) (cbrt (fma d d (* c c))))) |
| 27.0ms | (/ (* (cbrt (fma a c (* b d))) (cbrt (fma a c (* b d)))) 1) |
8 alts after pruning (7 fresh and 1 done)
Merged error: 14.7b
Found 4 expressions with local error:
| 14.4b | (/ (fma d b (* a c)) (hypot d c)) |
| 0.2b | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 0.2b | (fma d b (* a c)) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 7.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 3.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 0.0ms | (fma d b (* a c)) |
4 calls. Slowest were:
| 125.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 79.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 40.0ms | (fma d b (* a c)) |
| 26.0ms | (hypot d c) |
63 calls. Slowest were:
| 519.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)))) |
| 331.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 201.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))) |
11 alts after pruning (11 fresh and 0 done)
Merged error: 5.5b
Found 4 expressions with local error:
| 14.4b | (/ (fma c a (* b d)) (hypot d c)) |
| 0.1b | (/ (/ (fma c a (* 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 c a (* b d)) (hypot d c)) (hypot d c)) |
| 7.0ms | (/ (fma c a (* b d)) (hypot d c)) |
| 0.0ms | (hypot d c) |
4 calls. Slowest were:
| 97.0ms | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
| 91.0ms | (/ (fma c a (* b d)) (hypot d c)) |
| 41.0ms | (hypot d c) |
| 40.0ms | (hypot d c) |
135 calls. Slowest were:
| 304.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))) |
| 258.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) |
11 alts after pruning (10 fresh and 1 done)
Merged error: 3.0b
Found 4 expressions with local error:
| 14.5b | (/ (hypot d c) (fma c a (* b d))) |
| 0.2b | (/ 1 (/ (hypot d c) (fma c a (* b d)))) |
| 0.1b | (/ (/ 1 (/ (hypot d c) (fma c a (* b d)))) (hypot d c)) |
| 0.0b | (hypot d c) |
4 calls. Slowest were:
| 6.0ms | (/ (hypot d c) (fma c a (* b d))) |
| 4.0ms | (/ (/ 1 (/ (hypot d c) (fma c a (* b d)))) (hypot d c)) |
| 2.0ms | (/ 1 (/ (hypot d c) (fma c a (* b d)))) |
4 calls. Slowest were:
| 136.0ms | (/ (/ 1 (/ (hypot d c) (fma c a (* b d)))) (hypot d c)) |
| 117.0ms | (/ 1 (/ (hypot d c) (fma c a (* b d)))) |
| 69.0ms | (/ (hypot d c) (fma c a (* b d))) |
| 38.0ms | (hypot d c) |
92 calls. Slowest were:
| 495.0ms | (- (log (/ 1 (/ (hypot d c) (fma c a (* b d))))) (log (hypot d c))) |
| 351.0ms | (/ (/ 1 (/ (hypot d c) (fma c a (* b d)))) (cbrt (hypot d c))) |
| 348.0ms | (/ (/ 1 (/ (hypot d c) (fma c a (* b d)))) (sqrt (hypot d c))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 3.0b
24.7% (10.5b remaining)
Error of 13.2b against oracle of 2.7b and baseline of 16.6b