Average Error: 0.0 → 0.0
Time: 20.9s
Precision: 64
Internal Precision: 128
\[\frac{1}{x - 1} + \frac{x}{x + 1}\]
\[\frac{{\left(\frac{1}{x - 1}\right)}^{3} + {\left(\frac{x}{x + 1}\right)}^{3}}{\left(\frac{x}{x + 1} \cdot \frac{x}{x + 1} - \frac{1}{x - 1} \cdot \frac{x}{x + 1}\right) + \frac{1}{x - 1} \cdot \frac{1}{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 flip3-+0.0

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

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

Reproduce

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

Details

Time bar (total: 20.6s)Debug log

sample39.0ms

Algorithm
intervals
Results
256×(pre true 80)
256×(body real 80)

simplify10.0ms

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

prune6.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize12.0ms

Local error

Found 3 expressions with local error:

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

rewrite6.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
5.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
1.0ms
(/ 1 (- x 1))
0.0ms
(/ x (+ x 1))

series54.0ms

Counts
3 → 9
Calls
3 calls:
Slowest
37.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
10.0ms
(/ x (+ x 1))
7.0ms
(/ 1 (- x 1))

simplify722.0ms

Counts
25 → 56
Calls
25 calls:
Slowest
155.0ms
(+ (* 1 (+ x 1)) (* (- x 1) x))
88.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
73.0ms
(- (+ x (+ (pow x 2) 1)))
63.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
53.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))

prune328.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize32.0ms

Local error

Found 4 expressions with local error:

0.1b
(* (/ 1 (- x 1)) (/ 1 (- x 1)))
0.1b
(pow (/ 1 (- x 1)) 3)
0.0b
(pow (/ x (+ x 1)) 3)
0.0b
(* (/ x (+ x 1)) (/ x (+ x 1)))

rewrite20.0ms

Algorithm
rewrite-expression-head
Rules
23×pow1
17×add-exp-log
16×associate-/r/
12×add-cube-cbrt
12×associate-*l*
12×associate-*r*
12×cube-prod
12×*-un-lft-identity
12×unpow-prod-down
12×add-sqr-sqrt
10×add-cbrt-cube
div-inv
inv-pow
pow-flip
pow-prod-up
prod-exp
rec-exp
add-log-exp
flip--
flip-+
pow-prod-down
flip3--
flip3-+
pow-pow
pow-exp
rem-cube-cbrt
cbrt-unprod
*-commutative
associate-*r/
associate-*l/
unpow3
pow-plus
pow-to-exp
frac-times
cube-mult
pow2
cube-div
un-div-inv
Counts
4 → 123
Calls
4 calls:
Slowest
9.0ms
(* (/ 1 (- x 1)) (/ 1 (- x 1)))
5.0ms
(* (/ x (+ x 1)) (/ x (+ x 1)))
3.0ms
(pow (/ 1 (- x 1)) 3)
2.0ms
(pow (/ x (+ x 1)) 3)

series58.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
19.0ms
(* (/ x (+ x 1)) (/ x (+ x 1)))
18.0ms
(pow (/ x (+ x 1)) 3)
12.0ms
(* (/ 1 (- x 1)) (/ 1 (- x 1)))
9.0ms
(pow (/ 1 (- x 1)) 3)

simplify5.5s

Counts
102 → 135
Calls
102 calls:
Slowest
1.0s
(* (* (* (/ x (+ x 1)) (/ x (+ x 1))) (/ x (+ x 1))) (* (* (/ x (+ x 1)) (/ x (+ x 1))) (/ x (+ x 1))))
528.0ms
(pow (/ 1 (- (* x x) (* 1 1))) 3)
503.0ms
(pow (/ 1 (- (* x x) (* 1 1))) 3)
424.0ms
(pow (/ x (+ (pow x 3) (pow 1 3))) 3)
416.0ms
(pow (/ x (+ (pow x 3) (pow 1 3))) 3)

prune1.7s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize9.0ms

Local error

Found 4 expressions with local error:

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

rewrite17.0ms

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

series80.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
29.0ms
(exp (/ x (+ x 1)))
29.0ms
(+ (/ 1 (- x 1)) (log (exp (/ x (+ x 1)))))
11.0ms
(/ 1 (- x 1))
11.0ms
(log (exp (/ x (+ x 1))))

simplify757.0ms

Counts
42 → 80
Calls
42 calls:
Slowest
85.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
82.0ms
(- (+ x (+ (pow x 2) 1)))
82.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
64.0ms
(- (+ (* 3/2 (/ E (pow x 2))) E) (/ E x))
51.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))

prune700.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize19.0ms

Local error

Found 4 expressions with local error:

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

rewrite45.0ms

Algorithm
rewrite-expression-head
Rules
24×cbrt-div
23×*-un-lft-identity
11×flip-+
11×frac-add
11×flip3-+
10×add-log-exp
10×distribute-lft-out
10×cbrt-prod
pow1
frac-times
add-cube-cbrt
associate-*l*
associate-*r*
add-sqr-sqrt
add-exp-log
div-inv
pow1/3
add-cbrt-cube
associate-*r/
associate-*l/
sum-log
+-commutative
pow-prod-up
pow-prod-down
cbrt-unprod
*-commutative
prod-exp
pow-plus
pow2
Counts
4 → 89
Calls
4 calls:
Slowest
30.0ms
(* (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))
5.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
5.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
5.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

series263.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
189.0ms
(* (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))
26.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
24.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
23.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

simplify8.1s

Counts
75 → 101
Calls
75 calls:
Slowest
489.0ms
(* (cbrt (- (* (/ 1 (- x 1)) (/ 1 (- x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))) (cbrt (+ (pow (/ 1 (- x 1)) 3) (pow (/ x (+ x 1)) 3))))
487.0ms
(* (cbrt (+ (pow (/ 1 (- x 1)) 3) (pow (/ x (+ x 1)) 3))) (cbrt (- (* (/ 1 (- x 1)) (/ 1 (- x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))))
473.0ms
(+ (* 4/3 (/ (pow (cbrt -1) 2) (pow x 2))) (+ (* 8/9 (/ (pow (cbrt -1) 2) (pow x 4))) (pow (cbrt -1) 2)))
377.0ms
(* (cbrt (* (- x 1) (+ x 1))) (cbrt (- (/ 1 (- x 1)) (/ x (+ x 1)))))
338.0ms
(* (cbrt (+ (pow (/ 1 (- x 1)) 3) (pow (/ x (+ x 1)) 3))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))

prune1.0s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes79.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample960.0ms

Algorithm
intervals
Results
8000×(pre true 80)
8000×(body real 80)