Average Error: 38.7 → 0.0
Time: 11.5s
Precision: 64
Internal Precision: 128
\[\left(x + 1\right) \cdot \left(x + 1\right) - 1\]
\[x \cdot \left(2 + x\right)\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 38.7

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

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

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

Reproduce

herbie shell --seed 2019008 
(FPCore (x)
  :name "Expanding a square"
  (- (* (+ x 1) (+ x 1)) 1))

Details

Time bar (total: 11.0s)Debug log

sample98.0ms

Algorithm
intervals

simplify170.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

170.0ms
(- (* (+ x 1) (+ x 1)) 1)

prune9.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize8.0ms

Local error

Found 1 expressions with local error:

0.0b
(* (+ x 2) x)

rewrite6.0ms

Algorithm
rewrite-expression-head
Counts
1 → 13
Calls

1 calls. Slowest were:

4.0ms
(* (+ x 2) x)

series31.0ms

Counts
1 → 3
Calls

1 calls. Slowest were:

30.0ms
(* (+ x 2) x)

simplify183.0ms

Counts
7 → 16
Calls

7 calls. Slowest were:

147.0ms
(* (- (* x x) (* 2 2)) x)
16.0ms
(* (+ (pow x 3) (pow 2 3)) x)
5.0ms
(+ (* 2 x) (pow x 2))

prune71.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 4 expressions with local error:

0.9b
(cbrt (+ x 2))
0.9b
(cbrt (+ x 2))
0.9b
(cbrt (+ x 2))
0.4b
(* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (* (cbrt (+ x 2)) x))

rewrite22.0ms

Algorithm
rewrite-expression-head
Counts
4 → 81
Calls

4 calls. Slowest were:

19.0ms
(* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (* (cbrt (+ x 2)) x))
1.0ms
(cbrt (+ x 2))
1.0ms
(cbrt (+ x 2))

series373.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

273.0ms
(* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (* (cbrt (+ x 2)) x))
38.0ms
(cbrt (+ x 2))
31.0ms
(cbrt (+ x 2))
31.0ms
(cbrt (+ x 2))

simplify3.3s

Counts
76 → 93
Calls

76 calls. Slowest were:

274.0ms
(* (* (* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (* (cbrt (+ x 2)) (cbrt (+ x 2)))) (* (cbrt (+ x 2)) (cbrt (+ x 2)))) (* (* (* (cbrt (+ x 2)) x) (* (cbrt (+ x 2)) x)) (* (cbrt (+ x 2)) x)))
247.0ms
(* (* (+ x 2) (+ x 2)) (* (* (* (cbrt (+ x 2)) x) (* (cbrt (+ x 2)) x)) (* (cbrt (+ x 2)) x)))
143.0ms
(- (+ (* 1/6 (* x (pow 2 1/3))) (pow 2 1/3)) (* 1/36 (* (pow x 2) (pow 2 1/3))))

prune578.0ms

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0.0b

localize11.0ms

Local error

Found 4 expressions with local error:

0.9b
(cbrt (* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (cbrt (+ x 2))))
0.9b
(cbrt (+ x 2))
0.9b
(cbrt (+ x 2))
0.9b
(cbrt (+ x 2))

rewrite14.0ms

Algorithm
rewrite-expression-head
Counts
4 → 75
Calls

4 calls. Slowest were:

11.0ms
(cbrt (* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (cbrt (+ x 2))))
1.0ms
(cbrt (+ x 2))
1.0ms
(cbrt (+ x 2))

series123.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

31.0ms
(cbrt (+ x 2))
31.0ms
(cbrt (* (* (cbrt (+ x 2)) (cbrt (+ x 2))) (cbrt (+ x 2))))
30.0ms
(cbrt (+ x 2))
30.0ms
(cbrt (+ x 2))

simplify2.1s

Counts
55 → 87
Calls

55 calls. Slowest were:

142.0ms
(- (+ (* 1/6 (* x (pow 2 1/3))) (pow 2 1/3)) (* 1/36 (* (pow x 2) (pow 2 1/3))))
140.0ms
(- (+ (* 1/6 (* x (pow 2 1/3))) (pow 2 1/3)) (* 1/36 (* (pow x 2) (pow 2 1/3))))
138.0ms
(- (+ (* 1/6 (* x (pow 2 1/3))) (pow 2 1/3)) (* 1/36 (* (pow x 2) (pow 2 1/3))))

prune702.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0.0b

localize23.0ms

Local error

Found 2 expressions with local error:

9.4b
(/ (+ (pow x 4) (* 8 x)) (+ (* x x) (- (* 2 2) (* x 2))))
0.0b
(+ (* x x) (- (* 2 2) (* x 2)))

rewrite21.0ms

Algorithm
rewrite-expression-head
Counts
2 → 46
Calls

2 calls. Slowest were:

16.0ms
(/ (+ (pow x 4) (* 8 x)) (+ (* x x) (- (* 2 2) (* x 2))))
5.0ms
(+ (* x x) (- (* 2 2) (* x 2)))

series66.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

58.0ms
(/ (+ (pow x 4) (* 8 x)) (+ (* x x) (- (* 2 2) (* x 2))))
9.0ms
(+ (* x x) (- (* 2 2) (* x 2)))

simplify1.6s

Counts
40 → 52
Calls

40 calls. Slowest were:

192.0ms
(+ (* (* x x) (* x x)) (- (* (- (* 2 2) (* x 2)) (- (* 2 2) (* x 2))) (* (* x x) (- (* 2 2) (* x 2)))))
123.0ms
(- (* (pow x 4) (pow x 4)) (* (* 8 x) (* 8 x)))
117.0ms
(/ (* (* (+ (pow x 4) (* 8 x)) (+ (pow x 4) (* 8 x))) (+ (pow x 4) (* 8 x))) (* (* (+ (* x x) (- (* 2 2) (* x 2))) (+ (* x x) (- (* 2 2) (* x 2)))) (+ (* x x) (- (* 2 2) (* x 2)))))

prune336.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

regimes24.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