Average Error: 0.0 → 0.0
Time: 10.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 2019010 
(FPCore (x)
  :name "Asymptote B"
  (+ (/ 1 (- x 1)) (/ x (+ x 1))))

Details

Time bar (total: 10.1s)Debug log

sample43.0ms

Algorithm
intervals

simplify10.0ms

Counts
1 → 1
Calls
1 calls:
Slowest
10.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

prune7.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
(/ 1 (- x 1))
0.0b
(/ x (+ x 1))
0.0b
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

rewrite13.0ms

Algorithm
rewrite-expression-head
Rules
*-un-lft-identity
associate-/r*
add-log-exp
add-cube-cbrt
add-sqr-sqrt
associate-/r/
add-exp-log
pow1
div-inv
add-cbrt-cube
distribute-lft-out
flip-+
flip3-+
frac-2neg
clear-num
inv-pow
flip--
pow-flip
frac-add
flip3--
sum-log
rec-exp
+-commutative
Counts
3 → 47
Calls
3 calls:
Slowest
9.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
2.0ms
(/ 1 (- x 1))
1.0ms
(/ x (+ x 1))

series67.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
39.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
16.0ms
(/ x (+ x 1))
11.0ms
(/ 1 (- x 1))

simplify645.0ms

Counts
25 → 56
Calls
25 calls:
Slowest
117.0ms
(+ (* 1 (+ x 1)) (* (- x 1) x))
76.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
69.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
57.0ms
(- (+ x (+ (pow x 2) 1)))
50.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))

prune386.0ms

Pruning

2 alts after pruning (1 fresh and 1 done)

Merged error: 0b

localize32.0ms

Local error

Found 4 expressions with local error:

12.4b
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
0.3b
(/ 1 (- (* x x) (* 1 1)))
0.0b
(/ x (+ x 1))
0.0b
(+ (* (/ 1 (- (* x x) (* 1 1))) (+ x 1)) (/ x (+ x 1)))

rewrite26.0ms

Algorithm
rewrite-expression-head
Rules
add-exp-log
add-cube-cbrt
*-un-lft-identity
add-sqr-sqrt
associate-/r*
pow1
add-log-exp
flip-+
associate-/r/
associate-*l*
add-cbrt-cube
flip3-+
frac-add
associate-*r/
frac-times
div-inv
associate-*r*
flip--
prod-exp
associate-*l/
flip3--
distribute-lft-in
frac-2neg
clear-num
associate-+l+
rec-exp
distribute-rgt-in
difference-of-squares
inv-pow
pow-flip
cbrt-unprod
*-commutative
pow-prod-down
sum-log
+-commutative
Counts
4 → 80
Calls
4 calls:
Slowest
10.0ms
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
10.0ms
(+ (* (/ 1 (- (* x x) (* 1 1))) (+ x 1)) (/ x (+ x 1)))
4.0ms
(/ 1 (- (* x x) (* 1 1)))
1.0ms
(/ x (+ x 1))

series86.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
50.0ms
(+ (* (/ 1 (- (* x x) (* 1 1))) (+ x 1)) (/ x (+ x 1)))
13.0ms
(/ 1 (- (* x x) (* 1 1)))
13.0ms
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
10.0ms
(/ x (+ x 1))

simplify7.0s

Counts
57 → 92
Calls
57 calls:
Slowest
1.1s
(* (* (* (/ 1 (- (* x x) (* 1 1))) (/ 1 (- (* x x) (* 1 1)))) (/ 1 (- (* x x) (* 1 1)))) (* (* (+ x 1) (+ x 1)) (+ x 1)))
1.0s
(* (/ 1 (- (* x x) (* 1 1))) (+ x 1))
703.0ms
(* (exp (* (/ 1 (- (* x x) (* 1 1))) (+ x 1))) (exp (/ x (+ x 1))))
510.0ms
(* (* (- (* x x) (* 1 1)) (+ (* x x) (- (* 1 1) (* x 1)))) (+ x 1))
435.0ms
(* (- (* x x) (* 1 1)) (+ x 1))

prune789.0ms

Pruning

2 alts after pruning (0 fresh and 2 done)

Merged error: 0b

regimes49.0ms

Accuracy

0% (0.0b remaining)

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

bsearch1.0ms

end0.0ms

sample862.0ms

Algorithm
intervals