Average Error: 0.0 → 0.0
Time: 26.8s
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 +o rules:numerics
(FPCore (x)
  :name "Asymptote B"
  (+ (/ 1 (- x 1)) (/ x (+ x 1))))

Details

Time bar (total: 26.4s)Debug log

sample34.0ms

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

simplify6.0ms

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

prune4.0ms

Pruning

1 alts after pruning (1 fresh and 0 done)

Merged error: 0.0b

localize20.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))

rewrite14.0ms

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

series51.0ms

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

simplify1.0s

Counts
29 → 68
Calls
29 calls:
Slowest
155.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
118.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
112.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))
110.0ms
(- (+ x (+ (pow x 2) 1)))
110.0ms
(+ (* 1 (+ x 1)) (* (- x 1) x))

prune546.0ms

Pruning

3 alts after pruning (3 fresh and 0 done)

Merged error: 0b

localize44.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)))

rewrite17.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--
log1p-expm1-u
flip-+
pow-prod-down
flip3--
flip3-+
pow-pow
expm1-log1p-u
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 → 131
Calls
4 calls:
Slowest
8.0ms
(* (/ 1 (- x 1)) (/ 1 (- x 1)))
4.0ms
(* (/ x (+ x 1)) (/ x (+ x 1)))
2.0ms
(pow (/ 1 (- x 1)) 3)
1.0ms
(pow (/ x (+ x 1)) 3)

series65.0ms

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

simplify6.8s

Counts
102 → 143
Calls
102 calls:
Slowest
853.0ms
(* (* (* (/ x (+ x 1)) (/ x (+ x 1))) (/ x (+ x 1))) (* (* (/ x (+ x 1)) (/ x (+ x 1))) (/ x (+ x 1))))
695.0ms
(pow (/ x (+ (pow x 3) (pow 1 3))) 3)
660.0ms
(pow (/ x (+ (pow x 3) (pow 1 3))) 3)
560.0ms
(pow (/ x (- (* x x) (* 1 1))) 3)
523.0ms
(pow (/ x (- (* x x) (* 1 1))) 3)

prune1.8s

Pruning

3 alts after pruning (2 fresh and 1 done)

Merged error: 0b

localize19.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)))

rewrite23.0ms

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

series82.0ms

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

simplify1.6s

Counts
46 → 94
Calls
46 calls:
Slowest
387.0ms
(- (+ x 1) (* 1/2 (pow x 2)))
195.0ms
(- (+ (* 2 (pow x 2)) (+ (* 2 (pow x 4)) 1)))
161.0ms
(- (+ x (+ (pow x 2) 1)))
104.0ms
(- (+ (* 3/2 (/ E (pow x 2))) E) (/ E x))
94.0ms
(+ (* 2 (/ 1 (pow x 4))) (+ 1 (* 2 (/ 1 (pow x 2)))))

prune952.0ms

Pruning

3 alts after pruning (1 fresh and 2 done)

Merged error: 0b

localize20.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)))

rewrite68.0ms

Algorithm
rewrite-expression-head
Rules
26×*-un-lft-identity
24×cbrt-div
18×fma-def
11×flip-+
11×add-cube-cbrt
11×frac-add
11×flip3-+
11×add-sqr-sqrt
10×add-log-exp
10×distribute-lft-out
10×cbrt-prod
pow1
frac-times
div-inv
associate-*l*
associate-*r*
associate-/r/
add-exp-log
log1p-expm1-u
pow1/3
add-cbrt-cube
expm1-log1p-u
flip--
associate-*r/
associate-*l/
flip3--
sum-log
+-commutative
pow-prod-up
pow-prod-down
cbrt-unprod
*-commutative
prod-exp
pow-plus
pow2
Counts
4 → 115
Calls
4 calls:
Slowest
34.0ms
(* (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))
11.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
10.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
10.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

series305.0ms

Counts
4 → 12
Calls
4 calls:
Slowest
194.0ms
(* (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))
38.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
38.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))
35.0ms
(+ (/ 1 (- x 1)) (/ x (+ x 1)))

simplify10.3s

Counts
87 → 127
Calls
87 calls:
Slowest
683.0ms
(* (cbrt (* (- x 1) (+ x 1))) (cbrt (- (/ 1 (- x 1)) (/ x (+ x 1)))))
582.0ms
(* (cbrt (- (/ 1 (- x 1)) (/ x (+ x 1)))) (cbrt (* (- x 1) (+ x 1))))
490.0ms
(* (cbrt (- (* (/ 1 (- x 1)) (/ 1 (- x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))) (cbrt (- (* (/ 1 (- x 1)) (/ 1 (- x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))))
467.0ms
(* (cbrt (* (- x 1) (+ x 1))) (cbrt (* (- x 1) (+ x 1))))
451.0ms
(* (cbrt (- (* (/ 1 (- x 1)) (/ 1 (- x 1))) (* (/ x (+ x 1)) (/ x (+ x 1))))) (cbrt (+ (/ 1 (- x 1)) (/ x (+ x 1)))))

prune1.5s

Pruning

3 alts after pruning (0 fresh and 3 done)

Merged error: 0b

regimes63.0ms

Accuracy

0% (0.0b remaining)

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

bsearch4.0ms

end0.0ms

sample1.0s

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