Average Error: 14.2 → 14.2
Time: 577.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 14.2

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

Reproduce

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