Average Error: 0.0 → 0.0
Time: 6.8s
Precision: 64
Internal Precision: 128
\[\frac{1}{x - 1} + \frac{x}{x + 1}\]
\[\frac{1}{x - 1} + \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. Initial simplification0.0

    \[\leadsto \frac{1}{x - 1} + \frac{x}{x + 1}\]
  3. Final simplification0.0

    \[\leadsto \frac{1}{x - 1} + \frac{x}{x + 1}\]

Reproduce

herbie shell --seed 2018362 +o rules:numerics
(FPCore (x)
  :name "Asymptote B"
  (+ (/ 1 (- x 1)) (/ x (+ x 1))))

Details

Time bar (total: 4.5s)Debug log

start30.0ms

Algorithm
intervals

setup23.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize26.0ms

Local error

Found 3 expressions with local error:

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

rewrite31.0ms

Algorithm
rewrite-expression-head
Counts
3 → 59
Calls

3 calls. Slowest were:

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

series47.0ms

Counts
3 → 9
Calls

3 calls. Slowest were:

26.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
13.0ms
(/ x (+ x 1))
7.0ms
(/ 1 (- x 1))

simplify1.3s

Counts
29 → 68
Calls

29 calls. Slowest were:

195.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
162.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
159.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))

prune641.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize24.0ms

Local error

Found 4 expressions with local error:

4.8b
(log (exp (/ x (+ x 1))))
0.0b
(/ x (+ x 1))
0.0b
(/ 1 (- x 1))
0.0b
(+ (/ 1 (- x 1)) (log (exp (/ x (+ x 1)))))

rewrite27.0ms

Algorithm
rewrite-expression-head
Counts
4 → 83
Calls

4 calls. Slowest were:

18.0ms
(+ (/ 1 (- x 1)) (log (exp (/ x (+ x 1)))))
5.0ms
(log (exp (/ x (+ x 1))))
2.0ms
(/ 1 (- x 1))

series83.0ms

Counts
4 → 12
Calls

4 calls. Slowest were:

39.0ms
(+ (/ 1 (- x 1)) (log (exp (/ x (+ x 1)))))
17.0ms
(log (exp (/ x (+ x 1))))
16.0ms
(/ x (+ x 1))
11.0ms
(/ 1 (- x 1))

simplify1.3s

Counts
44 → 95
Calls

44 calls. Slowest were:

224.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
159.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
115.0ms
(- (+ x (+ (pow x 2) 1)))

prune959.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes45.0ms

Accuracy

0% (0.0b remaining)

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

bsearch2.0ms