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

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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. Using strategy rm
  3. Applied distribute-lft-out0.0

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

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

Reproduce

herbie shell --seed 2019022 
(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: 13.9s)Debug log

sample17.0ms

Algorithm
intervals
Results
8.0ms256×body80valid
4.0ms256×pre80true

simplify32.0ms

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

prune5.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize7.0ms

Local error

Found 2 expressions with local error:

0.1b
(* x (* x x))
0.0b
(+ (* x (* x x)) (* x x))

rewrite5.0ms

Algorithm
rewrite-expression-head
Rules
add-log-exp
add-cube-cbrt
add-exp-log
add-cbrt-cube
*-un-lft-identity
pow1
add-sqr-sqrt
distribute-lft-out
flip-+
*-commutative
associate-*r*
cube-unmult
flip3-+
distribute-lft1-in
sum-log
+-commutative
Counts
2 → 23
Calls
2 calls:
Slowest
3.0ms
(+ (* x (* x x)) (* x x))
1.0ms
(* x (* x x))

series50.0ms

Counts
2 → 6
Calls
2 calls:
Slowest
35.0ms
(+ (* x (* x x)) (* x x))
14.0ms
(* x (* x x))

simplify114.0ms

Counts
9 → 29
Calls
9 calls:
Slowest
60.0ms
(* (exp (* x (* x x))) (exp (* x x)))
12.0ms
(+ (* x x) x)
11.0ms
(+ (pow x 3) (pow x 2))
11.0ms
(+ (pow x 3) (pow x 2))
11.0ms
(+ (pow x 3) (pow x 2))

prune192.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0.0b

localize5.0ms

Local error

Found 1 expressions with local error:

0.0b
(* x (+ (* x x) x))

rewrite3.0ms

Algorithm
rewrite-expression-head
Rules
associate-*r*
add-cube-cbrt
associate-*r/
*-un-lft-identity
add-sqr-sqrt
add-log-exp
flip-+
*-commutative
add-exp-log
add-cbrt-cube
flip3-+
distribute-lft1-in
distribute-lft-in
pow1
distribute-rgt-in
Counts
1 → 16
Calls
1 calls:
Slowest
3.0ms
(* x (+ (* x x) x))

series32.0ms

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

simplify601.0ms

Counts
10 → 19
Calls
10 calls:
Slowest
526.0ms
(+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x)))
12.0ms
(cbrt (+ (* x x) x))
12.0ms
(sqrt (+ (* x x) x))
11.0ms
(+ (pow x 3) (pow x 2))
11.0ms
(+ (pow x 3) (pow x 2))

prune123.0ms

Pruning

4 alts after pruning (3 fresh and 1 done)

Merged error: 0b

localize8.0ms

Local error

Found 4 expressions with local error:

0.2b
(* x (sqrt (+ (* x x) x)))
0.2b
(* (* x (sqrt (+ (* x x) x))) (sqrt (+ (* x x) x)))
0.0b
(sqrt (+ (* x x) x))
0.0b
(sqrt (+ (* x x) x))

rewrite19.0ms

Algorithm
rewrite-expression-head
Rules
18×sqrt-div
16×sqrt-prod
14×associate-*r*
12×add-sqr-sqrt
10×add-cube-cbrt
10×associate-*r/
10×*-un-lft-identity
flip-+
flip3-+
add-exp-log
add-cbrt-cube
pow1
add-log-exp
distribute-lft1-in
frac-times
*-commutative
associate-*l/
pow1/2
rem-sqrt-square
cbrt-unprod
prod-exp
pow-prod-down
associate-*l*
Counts
4 → 74
Calls
4 calls:
Slowest
11.0ms
(* (* x (sqrt (+ (* x x) x))) (sqrt (+ (* x x) x)))
3.0ms
(* x (sqrt (+ (* x x) x)))
2.0ms
(sqrt (+ (* x x) x))
2.0ms
(sqrt (+ (* x x) x))

series111.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
49.0ms
(* (* x (sqrt (+ (* x x) x))) (sqrt (+ (* x x) x)))
29.0ms
(* x (sqrt (+ (* x x) x)))
19.0ms
(sqrt (+ (* x x) x))
14.0ms
(sqrt (+ (* x x) x))

simplify5.7s

Counts
57 → 86
Calls
57 calls:
Slowest
629.0ms
(* (* x (sqrt (- (* (* x x) (* x x)) (* x x)))) (sqrt (- (* (* x x) (* x x)) (* x x))))
533.0ms
(* (sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x)))) (sqrt (- (* x x) x)))
505.0ms
(* (sqrt (- (* x x) x)) (sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x)))))
438.0ms
(sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x))))
420.0ms
(* (* (* (* x (sqrt (+ (* x x) x))) (* x (sqrt (+ (* x x) x)))) (* x (sqrt (+ (* x x) x)))) (* (* (sqrt (+ (* x x) x)) (sqrt (+ (* x x) x))) (sqrt (+ (* x x) x))))

prune636.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize14.0ms

Local error

Found 4 expressions with local error:

0.2b
(* (* x (sqrt (+ x 1))) (sqrt x))
0.2b
(* (* (* x (sqrt (+ x 1))) (sqrt x)) (sqrt (+ (* x x) x)))
0.0b
(* x (sqrt (+ x 1)))
0.0b
(sqrt (+ (* x x) x))

rewrite41.0ms

Algorithm
rewrite-expression-head
Rules
18×sqrt-div
16×associate-*r*
12×associate-*r/
11×sqrt-prod
11×add-exp-log
11×add-cbrt-cube
11×pow1
11×add-sqr-sqrt
10×add-cube-cbrt
10×associate-*l/
10×*-un-lft-identity
flip-+
flip3-+
add-log-exp
cbrt-unprod
prod-exp
pow-prod-down
frac-times
*-commutative
associate-*l*
distribute-lft1-in
pow1/2
rem-sqrt-square
Counts
4 → 78
Calls
4 calls:
Slowest
29.0ms
(* (* (* x (sqrt (+ x 1))) (sqrt x)) (sqrt (+ (* x x) x)))
7.0ms
(* (* x (sqrt (+ x 1))) (sqrt x))
2.0ms
(sqrt (+ (* x x) x))
2.0ms
(* x (sqrt (+ x 1)))

series146.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
81.0ms
(* (* (* x (sqrt (+ x 1))) (sqrt x)) (sqrt (+ (* x x) x)))
31.0ms
(* (* x (sqrt (+ x 1))) (sqrt x))
20.0ms
(* x (sqrt (+ x 1)))
14.0ms
(sqrt (+ (* x x) x))

simplify4.1s

Counts
61 → 90
Calls
61 calls:
Slowest
525.0ms
(sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x))))
448.0ms
(* (sqrt (- x 1)) (sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x)))))
433.0ms
(* (sqrt (+ (* x x) (- (* 1 1) (* x 1)))) (sqrt (+ (* (* x x) (* x x)) (- (* x x) (* (* x x) x)))))
312.0ms
(* (* (* x (sqrt (- (* x x) (* 1 1)))) (sqrt x)) (sqrt (- (* (* x x) (* x x)) (* x x))))
282.0ms
(* (* (* x (sqrt (+ (pow x 3) (pow 1 3)))) (sqrt x)) (sqrt (- (* (* x x) (* x x)) (* x x))))

prune836.0ms

Pruning

3 alts after pruning (1 fresh and 2 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

sample1.1s

Algorithm
intervals
Results
473.0ms8000×body80valid
237.0ms8000×pre80true