Average Error: 0.0 → 0.0
Time: 837.0ms
Precision: 64
Internal Precision: 128
\[x \cdot \left(x \cdot x\right) + x \cdot x\]
\[(\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\]

Error

Bits error versus x

Target

Original0.0
Target0.0
Herbie0.0
\[\left(\left(1.0 + x\right) \cdot x\right) \cdot x\]

Derivation

  1. Initial program 0.0

    \[x \cdot \left(x \cdot x\right) + x \cdot x\]
  2. Simplified0.0

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

    \[\leadsto (\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\]

Reproduce

herbie shell --seed 2019005 +o rules:numerics
(FPCore (x)
  :name "Expression 3, p15"
  :pre (<= 0 x 2)

  :herbie-target
  (* (* (+ 1.0 x) x) x)

  (+ (* x (* x x)) (* x x)))

Details

Time bar (total: 687.0ms)Debug log

sample30.0ms

Algorithm
intervals

simplify83.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

83.0ms
(+ (* x (* x x)) (* x x))

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize6.0ms

Local error

Found 1 expressions with local error:

0.0b
(fma (* x x) x (* x x))

rewrite0.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

0.0ms
(fma (* x x) x (* x x))

series30.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

30.0ms
(fma (* x x) x (* x x))

simplify19.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

6.0ms
(+ (pow x 3) (pow x 2))
6.0ms
(+ (pow x 3) (pow x 2))
6.0ms
(+ (pow x 3) (pow x 2))

prune59.0ms

Pruning

1 alts after pruning (0 fresh and 1 done)

Merged error: 0.0b

end0.0ms

sample453.0ms

Algorithm
intervals