Average Error: 0.0 → 0.0
Time: 1.9s
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 2019004 +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.5s)Debug log

sample36.0ms

Algorithm
intervals

simplify10.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

prune28.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize16.0ms

Local error

Found 1 expressions with local error:

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

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

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

series26.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

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

simplify16.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

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

prune98.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0b

localize12.0ms

Local error

Found 0 expressions with local error:

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
0 → 0
Calls

0 calls. Slowest were:

series0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

simplify0.0ms

Counts
0 → 0
Calls

0 calls. Slowest were:

prune6.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0b

end0.0ms

sample1.3s

Algorithm
intervals