Average Error: 0.0 → 0.0
Time: 2.8s
Precision: 64
Internal Precision: 128
\[x.re \cdot y.re - x.im \cdot y.im\]
\[(\left(-y.im\right) \cdot x.im + \left(y.im \cdot x.im\right))_* + (x.re \cdot y.re + \left(\left(-x.im\right) \cdot y.im\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.re - x.im \cdot y.im\]
  2. Using strategy rm
  3. Applied prod-diff0.0

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

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

Reproduce

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

Details

Time bar (total: 2.5s)Debug log

sample38.0ms

Algorithm
intervals

simplify9.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

9.0ms
(- (* x.re y.re) (* x.im y.im))

prune10.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
(- (* x.re y.re) (* x.im y.im))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
1 → 16
Calls

1 calls. Slowest were:

2.0ms
(- (* x.re y.re) (* x.im y.im))

series42.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

42.0ms
(- (* x.re y.re) (* x.im y.im))

simplify98.0ms

Counts
6 → 19
Calls

6 calls. Slowest were:

37.0ms
(/ (exp (* x.re y.re)) (exp (* x.im y.im)))
17.0ms
(fma x.re y.re (- (* y.im x.im)))
16.0ms
(- (* y.re x.re) (* y.im x.im))

prune157.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize18.0ms

Local error

Found 2 expressions with local error:

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

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
2 → 20
Calls

2 calls. Slowest were:

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

series50.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

34.0ms
(fma x.re y.re (- (* y.im x.im)))
16.0ms
(fma (- y.im) x.im (* y.im x.im))

simplify25.0ms

Counts
6 → 26
Calls

6 calls. Slowest were:

12.0ms
(- (* y.re x.re) (* y.im x.im))
9.0ms
(- (* y.re x.re) (* y.im x.im))
1.0ms
0

prune224.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes247.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms

end0.0ms

sample1.5s

Algorithm
intervals