



Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 25.4 |
|---|---|
| Target | 0.3 |
| Herbie | 13.5 |
if d < -9.234484326885406e+101Initial program 38.4
Simplified38.4
rmApplied add-sqr-sqrt38.4
Applied *-un-lft-identity38.4
Applied times-frac38.4
Simplified38.4
Simplified24.6
Taylor expanded around -inf 16.0
Simplified16.0
if -9.234484326885406e+101 < d < -1.1521206323075965e-237 or -7.3148665069542e-292 < d < 1.0294661443825063e+154Initial program 18.4
Simplified18.4
rmApplied add-sqr-sqrt18.4
Applied *-un-lft-identity18.4
Applied times-frac18.4
Simplified18.4
Simplified12.2
rmApplied associate-*l/12.0
Simplified12.0
if -1.1521206323075965e-237 < d < -7.3148665069542e-292Initial program 23.5
Simplified23.6
rmApplied add-sqr-sqrt23.6
Applied *-un-lft-identity23.6
Applied times-frac23.5
Simplified23.5
Simplified13.9
rmApplied associate-*l/13.8
Simplified13.8
Taylor expanded around -inf 30.6
Simplified30.6
if 1.0294661443825063e+154 < d Initial program 43.2
Simplified43.2
rmApplied add-sqr-sqrt43.2
Applied *-un-lft-identity43.2
Applied times-frac43.2
Simplified43.2
Simplified28.1
rmApplied associate-*l/28.1
Simplified28.1
Taylor expanded around 0 12.3
Final simplification13.5
herbie shell --seed 2019004 +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: 18.4s)Debug log
1 calls. Slowest were:
| 8.0ms | (/ (+ (* a c) (* b d)) (+ (* c c) (* d d))) |
1 alts after pruning (1 fresh and 0 done)
Merged error: 30.8b
Found 3 expressions with local error:
| 30.8b | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 0.2b | (fma a c (* b d)) |
| 0.0b | (fma d d (* c c)) |
3 calls. Slowest were:
| 3.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 0.0ms | (fma a c (* b d)) |
| 0.0ms | (fma d d (* c c)) |
3 calls. Slowest were:
| 77.0ms | (/ (fma a c (* b d)) (fma d d (* c c))) |
| 43.0ms | (fma a c (* b d)) |
| 27.0ms | (fma d d (* c c)) |
34 calls. Slowest were:
| 216.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)))) |
| 46.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))))) |
| 24.0ms | (/ (sqrt (fma a c (* b d))) (* (cbrt (fma d d (* c c))) (cbrt (fma d d (* c c))))) |
7 alts after pruning (7 fresh and 0 done)
Merged error: 21.8b
Found 4 expressions with local error:
| 21.5b | (/ (fma d b (* a c)) (hypot d c)) |
| 1.0b | (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 | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 3.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 1.0ms | (/ 1 (hypot d c)) |
4 calls. Slowest were:
| 127.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 67.0ms | (/ (fma d b (* a c)) (hypot d c)) |
| 30.0ms | (fma d b (* a c)) |
| 25.0ms | (/ 1 (hypot d c)) |
67 calls. Slowest were:
| 604.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)))) |
| 247.0ms | (* (/ 1 (hypot d c)) (/ (fma d b (* a c)) (hypot d c))) |
| 143.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)))) |
10 alts after pruning (9 fresh and 1 done)
Merged error: 8.1b
Found 3 expressions with local error:
| 21.5b | (/ (fma c a (* b d)) (hypot d c)) |
| 0.2b | (fma c a (* b d)) |
| 0.1b | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
3 calls. Slowest were:
| 6.0ms | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
| 3.0ms | (/ (fma c a (* b d)) (hypot d c)) |
| 0.0ms | (fma c a (* b d)) |
3 calls. Slowest were:
| 108.0ms | (/ (/ (fma c a (* b d)) (hypot d c)) (hypot d c)) |
| 83.0ms | (/ (fma c a (* b d)) (hypot d c)) |
| 39.0ms | (fma c a (* b d)) |
132 calls. Slowest were:
| 327.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))) |
| 213.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 (8 fresh and 2 done)
Merged error: 3.3b
Found 4 expressions with local error:
| 22.1b | (cbrt (fma d b (* a c))) |
| 22.1b | (cbrt (fma d b (* a c))) |
| 22.1b | (cbrt (fma d b (* a c))) |
| 4.7b | (* (/ 1 (hypot d c)) (/ (* (cbrt (fma d b (* a c))) (cbrt (fma d b (* a c)))) 1)) |
4 calls. Slowest were:
| 7.0ms | (* (/ 1 (hypot d c)) (/ (* (cbrt (fma d b (* a c))) (cbrt (fma d b (* a c)))) 1)) |
| 3.0ms | (cbrt (fma d b (* a c))) |
| 1.0ms | (cbrt (fma d b (* a c))) |
4 calls. Slowest were:
| 264.0ms | (* (/ 1 (hypot d c)) (/ (* (cbrt (fma d b (* a c))) (cbrt (fma d b (* a c)))) 1)) |
| 157.0ms | (cbrt (fma d b (* a c))) |
| 143.0ms | (cbrt (fma d b (* a c))) |
| 129.0ms | (cbrt (fma d b (* a c))) |
34 calls. Slowest were:
| 396.0ms | (* (/ 1 (hypot d c)) (/ (* (cbrt (fma d b (* a c))) (cbrt (fma d b (* a c)))) 1)) |
| 375.0ms | (exp (* -1/3 (+ (log (/ 1 b)) (log (/ 1 d))))) |
| 370.0ms | (exp (* -1/3 (+ (log (/ 1 b)) (log (/ 1 d))))) |
10 alts after pruning (7 fresh and 3 done)
Merged error: 3.3b
20.2% (11.4b remaining)
Error of 13.5b against oracle of 2.2b and baseline of 16.4b