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

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. Using strategy rm
  4. Applied add-cbrt-cube20.4

    \[\leadsto \color{blue}{\sqrt[3]{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_* \cdot (\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right) \cdot (\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*}}\]
  5. Using strategy rm
  6. Applied pow120.4

    \[\leadsto \sqrt[3]{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_* \cdot (\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right) \cdot \color{blue}{{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}}}\]
  7. Applied pow120.4

    \[\leadsto \sqrt[3]{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_* \cdot \color{blue}{{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}}\right) \cdot {\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}}\]
  8. Applied pow120.4

    \[\leadsto \sqrt[3]{\left(\color{blue}{{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}} \cdot {\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}\right) \cdot {\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}}\]
  9. Applied pow-prod-up20.4

    \[\leadsto \sqrt[3]{\color{blue}{{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{\left(1 + 1\right)}} \cdot {\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{1}}\]
  10. Applied pow-prod-up20.4

    \[\leadsto \sqrt[3]{\color{blue}{{\left((\left(x \cdot x\right) \cdot x + \left(x \cdot x\right))_*\right)}^{\left(\left(1 + 1\right) + 1\right)}}}\]
  11. Simplified20.4

    \[\leadsto \sqrt[3]{{\color{blue}{\left((x \cdot x + x)_* \cdot x\right)}}^{\left(\left(1 + 1\right) + 1\right)}}\]
  12. Simplified20.4

    \[\leadsto \sqrt[3]{{\left((x \cdot x + x)_* \cdot x\right)}^{\color{blue}{3}}}\]
  13. Using strategy rm
  14. Applied rem-cbrt-cube0.0

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

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

Reproduce

herbie shell --seed 2019002 +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: 8.5s)Debug log

sample31.0ms

Algorithm
intervals

simplify110.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

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

rewrite1.0ms

Algorithm
rewrite-expression-head
Counts
1 → 10
Calls

1 calls. Slowest were:

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

series58.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

58.0ms
(fma (* x x) x (* x x))

simplify33.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))
6.0ms
(+ (pow x 3) (pow x 2))

prune63.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 4 expressions with local error:

21.2b
(cbrt (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))))
0.1b
(* (fma (* x x) x (* x x)) (fma (* x x) x (* x x)))
0.1b
(* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x)))
0.0b
(fma (* x x) x (* x x))

rewrite34.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

13.0ms
(cbrt (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))))
12.0ms
(* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x)))
8.0ms
(* (fma (* x x) x (* x x)) (fma (* x x) x (* x x)))

series145.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

56.0ms
(fma (* x x) x (* x x))
41.0ms
(cbrt (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))))
25.0ms
(* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x)))
22.0ms
(* (fma (* x x) x (* x x)) (fma (* x x) x (* x x)))

simplify3.7s

Counts
49 → 87
Calls

49 calls. Slowest were:

1.1s
(* (* (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))) (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x)))) (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))))
552.0ms
(* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (* x x))
475.0ms
(* (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))) (* (* (fma (* x x) x (* x x)) (fma (* x x) x (* x x))) (fma (* x x) x (* x x))))

prune545.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize11.0ms

Local error

Found 3 expressions with local error:

21.2b
(cbrt (pow (* (fma x x x) x) 3))
0.1b
(pow (* (fma x x x) x) 3)
0.0b
(* (fma x x x) x)

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
3 → 48
Calls

3 calls. Slowest were:

2.0ms
(* (fma x x x) x)
2.0ms
(pow (* (fma x x x) x) 3)
1.0ms
(cbrt (pow (* (fma x x x) x) 3))

series128.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

73.0ms
(cbrt (pow (* (fma x x x) x) 3))
30.0ms
(* (fma x x x) x)
25.0ms
(pow (* (fma x x x) x) 3)

simplify2.2s

Counts
24 → 57
Calls

24 calls. Slowest were:

904.0ms
(cbrt (* (* (fma x x x) x) (* (fma x x x) x)))
566.0ms
(* (* (fma x x x) x) (* (fma x x x) x))
199.0ms
(- (+ (* (pow x 2) (cbrt -1)) (* (pow x 3) (cbrt -1))))

prune425.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize0.0ms

Local error

Found 1 expressions with local error:

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

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
1 → 13
Calls

1 calls. Slowest were:

2.0ms
(* (fma x x x) x)

series44.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

44.0ms
(* (fma x x x) x)

simplify56.0ms

Counts
5 → 16
Calls

5 calls. Slowest were:

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

prune110.0ms

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes18.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample740.0ms

Algorithm
intervals