Average Error: 0.0 → 0.0
Time: 16.2s
Precision: 64
Internal Precision: 128
\[\frac{1}{x - 1} + \frac{x}{x + 1}\]
\[\frac{1}{x \cdot x - 1} \cdot \left(x + 1\right) + \frac{x}{x + 1}\]

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{1}{x - 1} + \frac{x}{x + 1}\]
  2. Using strategy rm
  3. Applied flip--0.0

    \[\leadsto \frac{1}{\color{blue}{\frac{x \cdot x - 1 \cdot 1}{x + 1}}} + \frac{x}{x + 1}\]
  4. Applied associate-/r/0.0

    \[\leadsto \color{blue}{\frac{1}{x \cdot x - 1 \cdot 1} \cdot \left(x + 1\right)} + \frac{x}{x + 1}\]
  5. Final simplification0.0

    \[\leadsto \frac{1}{x \cdot x - 1} \cdot \left(x + 1\right) + \frac{x}{x + 1}\]

Reproduce

herbie shell --seed 2019004 
(FPCore (x)
  :name "Asymptote B"
  (+ (/ 1 (- x 1)) (/ x (+ x 1))))

Details

Time bar (total: 15.9s)Debug log

sample39.0ms

Algorithm
intervals

simplify10.0ms

Counts
1 → 1
Calls

1 calls. Slowest were:

9.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

prune7.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize25.0ms

Local error

Found 2 expressions with local error:

0.0b
(/ 1 (- x 1))
0.0b
(/ x (+ x 1))

rewrite3.0ms

Algorithm
rewrite-expression-head
Counts
2 → 33
Calls

2 calls. Slowest were:

2.0ms
(/ 1 (- x 1))
1.0ms
(/ x (+ x 1))

series36.0ms

Counts
2 → 6
Calls

2 calls. Slowest were:

25.0ms
(/ x (+ x 1))
11.0ms
(/ 1 (- x 1))

simplify311.0ms

Counts
17 → 39
Calls

17 calls. Slowest were:

80.0ms
(- (+ x (+ (pow x 2) 1)))
40.0ms
(+ (* x x) (- (* 1 1) (* x 1)))
33.0ms
(- (+ x (pow x 3)) (pow x 2))

prune217.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize15.0ms

Local error

Found 3 expressions with local error:

17.3b
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
0.5b
(/ 1 (- (* x x) (* 1 1)))
0.0b
(/ x (+ x 1))

rewrite8.0ms

Algorithm
rewrite-expression-head
Counts
3 → 62
Calls

3 calls. Slowest were:

5.0ms
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
2.0ms
(/ 1 (- (* x x) (* 1 1)))
0.0ms
(/ x (+ x 1))

series50.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

23.0ms
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
16.0ms
(/ 1 (- (* x x) (* 1 1)))
11.0ms
(/ x (+ x 1))

simplify3.2s

Counts
41 → 71
Calls

41 calls. Slowest were:

1.1s
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
908.0ms
(* (* (* (/ 1 (- (* x x) (* 1 1))) (/ 1 (- (* x x) (* 1 1)))) (/ 1 (- (* x x) (* 1 1)))) (* (* (+ x 1) (+ x 1)) (+ x 1)))
154.0ms
(* (- (* x x) (* 1 1)) (- x 1))

prune536.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize27.0ms

Local error

Found 4 expressions with local error:

17.7b
(cbrt (/ 1 (- (* x x) (* 1 1))))
17.7b
(cbrt (/ 1 (- (* x x) (* 1 1))))
17.7b
(cbrt (/ 1 (- (* x x) (* 1 1))))
17.3b
(* (* (* (cbrt (/ 1 (- (* x x) (* 1 1)))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (+ x 1))

rewrite73.0ms

Algorithm
rewrite-expression-head
Counts
4 → 91
Calls

4 calls. Slowest were:

66.0ms
(* (* (* (cbrt (/ 1 (- (* x x) (* 1 1)))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (+ x 1))
2.0ms
(cbrt (/ 1 (- (* x x) (* 1 1))))
2.0ms
(cbrt (/ 1 (- (* x x) (* 1 1))))

series368.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

134.0ms
(cbrt (/ 1 (- (* x x) (* 1 1))))
106.0ms
(cbrt (/ 1 (- (* x x) (* 1 1))))
106.0ms
(cbrt (/ 1 (- (* x x) (* 1 1))))
22.0ms
(* (* (* (cbrt (/ 1 (- (* x x) (* 1 1)))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (+ x 1))

simplify8.9s

Counts
85 → 103
Calls

85 calls. Slowest were:

1.1s
(* (* (* (/ 1 (- (* x x) (* 1 1))) (/ 1 (- (* x x) (* 1 1)))) (/ 1 (- (* x x) (* 1 1)))) (* (* (+ x 1) (+ x 1)) (+ x 1)))
497.0ms
(* (* (* (cbrt (/ 1 (- (* x x) (* 1 1)))) (cbrt 1)) (cbrt (/ 1 (- (* x x) (* 1 1))))) (+ x 1))
372.0ms
(* (* (* (cbrt (/ 1 (- (* x x) (* 1 1)))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (cbrt (/ 1 (- (* x x) (* 1 1))))) (+ x 1))

prune1.0s

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes30.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample968.0ms

Algorithm
intervals