Average Error: 0.0 → 0.0
Time: 3.9s
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 2019010 +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: 3.7s)Debug log

sample15.0ms

Algorithm
intervals

simplify80.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
80.0ms
(+ (* x (* x x)) (* x x))

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 1 expressions with local error:

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

rewrite0.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
log1p-expm1-u
fma-udef
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
expm1-log1p-u
add-sqr-sqrt
Counts
1 → 10
Calls
1 calls:
Slowest
0.0ms
(fma (* x x) x (* x x))

series38.0ms

Counts
1 → 3
Calls
1 calls:
Slowest
38.0ms
(fma (* x x) x (* x x))

simplify20.0ms

Counts
3 → 13
Calls
3 calls:
Slowest
7.0ms
(+ (pow x 3) (pow x 2))
6.0ms
(+ (pow x 3) (pow x 2))
6.0ms
(+ (pow x 3) (pow x 2))

prune112.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize12.0ms

Local error

Found 4 expressions with local error:

31.8b
(sqrt (fma (* x x) x (* x x)))
31.8b
(sqrt (fma (* x x) x (* x x)))
0.0b
(* (sqrt (fma (* x x) x (* x x))) (sqrt (fma (* x x) x (* x x))))
0.0b
(fma (* x x) x (* x x))

rewrite16.0ms

Algorithm
rewrite-expression-head
Rules
12×sqrt-prod
12×add-sqr-sqrt
10×add-cube-cbrt
10×*-un-lft-identity
pow1
add-exp-log
associate-*l*
associate-*r*
pow1/2
add-cbrt-cube
add-log-exp
log1p-expm1-u
expm1-log1p-u
pow-prod-up
pow-prod-down
rem-sqrt-square
fma-udef
cbrt-unprod
*-commutative
prod-exp
sqrt-unprod
pow-plus
rem-square-sqrt
pow2
Counts
4 → 70
Calls
4 calls:
Slowest
10.0ms
(* (sqrt (fma (* x x) x (* x x))) (sqrt (fma (* x x) x (* x x))))
2.0ms
(sqrt (fma (* x x) x (* x x)))
2.0ms
(sqrt (fma (* x x) x (* x x)))
0.0ms
(fma (* x x) x (* x x))

series153.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
56.0ms
(* (sqrt (fma (* x x) x (* x x))) (sqrt (fma (* x x) x (* x x))))
34.0ms
(fma (* x x) x (* x x))
32.0ms
(sqrt (fma (* x x) x (* x x)))
31.0ms
(sqrt (fma (* x x) x (* x x)))

simplify1.6s

Counts
42 → 82
Calls
42 calls:
Slowest
356.0ms
(- (+ x (* 1/2 (pow x 2))) (* 1/8 (pow x 3)))
302.0ms
(- (+ x (* 1/2 (pow x 2))) (* 1/8 (pow x 3)))
192.0ms
(* (fma (* x x) x (* x x)) (fma (* x x) x (* x x)))
176.0ms
(* (fma (* x x) x (* x x)) (fma (* x x) x (* x x)))
150.0ms
(* (* (* (sqrt (fma (* x x) x (* x x))) (sqrt (fma (* x x) x (* x x)))) (sqrt (fma (* x x) x (* x x)))) (* (* (sqrt (fma (* x x) x (* x x))) (sqrt (fma (* x x) x (* x x)))) (sqrt (fma (* x x) x (* x x)))))

prune663.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes15.0ms

Accuracy

0% (0.0b remaining)

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

bsearch0.0ms

end0.0ms

sample900.0ms

Algorithm
intervals