Average Error: 0.0 → 0.0
Time: 2.3s
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 2019008 +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: 2.1s)Debug log

sample33.0ms

Algorithm
intervals

simplify101.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

101.0ms
(+ (* x (* x x)) (* x x))

prune6.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))

series38.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

38.0ms
(fma (* x x) x (* x x))

simplify32.0ms

Counts
3 → 13
Calls

3 calls. Slowest were:

13.0ms
(+ (pow x 3) (pow x 2))
12.0ms
(+ (pow x 3) (pow x 2))
7.0ms
(+ (pow x 3) (pow x 2))

prune61.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 3 expressions with local error:

31.8b
(log (fma (* x x) x (* x x)))
2.8b
(exp (log (fma (* x x) x (* x x))))
0.0b
(fma (* x x) x (* x x))

rewrite4.0ms

Algorithm
rewrite-expression-head
Counts
3 → 41
Calls

3 calls. Slowest were:

2.0ms
(exp (log (fma (* x x) x (* x x))))
1.0ms
(log (fma (* x x) x (* x x)))
0.0ms
(fma (* x x) x (* x x))

series125.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

50.0ms
(exp (log (fma (* x x) x (* x x))))
48.0ms
(fma (* x x) x (* x x))
26.0ms
(log (fma (* x x) x (* x x)))

simplify659.0ms

Counts
21 → 50
Calls

21 calls. Slowest were:

226.0ms
(- (+ (/ 1 x) (log -1)) (+ (* 3 (log (/ -1 x))) (* 1/2 (/ 1 (pow x 2)))))
114.0ms
(- (/ 1 x) (+ (* 3 (log (/ 1 x))) (* 1/2 (/ 1 (pow x 2)))))
56.0ms
(- (+ x (* 2 (log x))) (* 1/2 (pow x 2)))

prune363.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0.0b

regimes23.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample624.0ms

Algorithm
intervals