Average Error: 0.0 → 0.0
Time: 2.7s
Precision: 64
Internal Precision: 128
\[x.re \cdot y.im + x.im \cdot y.re\]
\[(y.re \cdot x.im + \left(y.im \cdot x.re\right))_*\]

Error

Bits error versus x.re

Bits error versus x.im

Bits error versus y.re

Bits error versus y.im

Derivation

  1. Initial program 0.0

    \[x.re \cdot y.im + x.im \cdot y.re\]
  2. Simplified0.0

    \[\leadsto \color{blue}{(x.re \cdot y.im + \left(x.im \cdot y.re\right))_*}\]
  3. Taylor expanded around -inf 0.0

    \[\leadsto \color{blue}{y.re \cdot x.im + y.im \cdot x.re}\]
  4. Simplified0.0

    \[\leadsto \color{blue}{(y.re \cdot x.im + \left(y.im \cdot x.re\right))_*}\]
  5. Final simplification0.0

    \[\leadsto (y.re \cdot x.im + \left(y.im \cdot x.re\right))_*\]

Reproduce

herbie shell --seed 2019005 +o rules:numerics
(FPCore (x.re x.im y.re y.im)
  :name "_multiplyComplex, imaginary part"
  (+ (* x.re y.im) (* x.im y.re)))

Details

Time bar (total: 1.9s)Debug log

sample69.0ms

Algorithm
intervals

simplify10.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

10.0ms
(+ (* x.re y.im) (* x.im y.re))

prune17.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize17.0ms

Local error

Found 1 expressions with local error:

0.0b
(fma x.re y.im (* x.im y.re))

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

0.0ms
(fma x.re y.im (* x.im y.re))

series29.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

29.0ms
(fma x.re y.im (* x.im y.re))

simplify12.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

6.0ms
(+ (* y.re x.im) (* y.im x.re))
4.0ms
(+ (* y.re x.im) (* y.im x.re))
0.0ms
0

prune162.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize13.0ms

Local error

Found 1 expressions with local error:

0.0b
(fma y.re x.im (* y.im x.re))

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

0.0ms
(fma y.re x.im (* y.im x.re))

series40.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

40.0ms
(fma y.re x.im (* y.im x.re))

simplify14.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

8.0ms
(+ (* y.re x.im) (* y.im x.re))
4.0ms
(+ (* y.re x.im) (* y.im x.re))
1.0ms
0

prune125.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes241.0ms

Accuracy

0% (0.0b remaining)

Error of 0.0b against oracle of 0.0b and baseline of 0.0b

bsearch1.0ms

end0.0ms

sample1.2s

Algorithm
intervals