Average Error: 13.7 → 13.7
Time: 762.0ms
Precision: binary64
Cost: 704
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\[\frac{1}{x + 1} - \frac{1}{x - 1}\]
\frac{1}{x + 1} - \frac{1}{x - 1}
\frac{1}{x + 1} - \frac{1}{x - 1}
(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
(FPCore (x) :precision binary64 (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))
double code(double x) {
	return (1.0 / (x + 1.0)) - (1.0 / (x - 1.0));
}
double code(double x) {
	return (1.0 / (x + 1.0)) - (1.0 / (x - 1.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.7

    \[\frac{1}{x + 1} - \frac{1}{x - 1}\]
  2. Simplified13.7

    \[\leadsto \color{blue}{\frac{1}{x + 1} - \frac{1}{x - 1}}\]
  3. Final simplification13.7

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

Reproduce

herbie shell --seed 2021023 
(FPCore (x)
  :name "Asymptote A"
  :precision binary64
  (- (/ 1.0 (+ x 1.0)) (/ 1.0 (- x 1.0))))