Average Error: 29.6 → 29.7
Time: 12.4s
Precision: binary64
\[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
\[\sqrt[3]{{\left(\frac{x}{x + 1} - \left(x + 1\right) \cdot \frac{1}{x - 1}\right)}^{3}}\]
\frac{x}{x + 1} - \frac{x + 1}{x - 1}
\sqrt[3]{{\left(\frac{x}{x + 1} - \left(x + 1\right) \cdot \frac{1}{x - 1}\right)}^{3}}
(FPCore (x) :precision binary64 (- (/ x (+ x 1.0)) (/ (+ x 1.0) (- x 1.0))))
(FPCore (x)
 :precision binary64
 (cbrt (pow (- (/ x (+ x 1.0)) (* (+ x 1.0) (/ 1.0 (- x 1.0)))) 3.0)))
double code(double x) {
	return (x / (x + 1.0)) - ((x + 1.0) / (x - 1.0));
}
double code(double x) {
	return cbrt(pow(((x / (x + 1.0)) - ((x + 1.0) * (1.0 / (x - 1.0)))), 3.0));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 29.6

    \[\frac{x}{x + 1} - \frac{x + 1}{x - 1}\]
  2. Using strategy rm
  3. Applied add-cbrt-cube_binary64_167929.6

    \[\leadsto \color{blue}{\sqrt[3]{\left(\left(\frac{x}{x + 1} - \frac{x + 1}{x - 1}\right) \cdot \left(\frac{x}{x + 1} - \frac{x + 1}{x - 1}\right)\right) \cdot \left(\frac{x}{x + 1} - \frac{x + 1}{x - 1}\right)}}\]
  4. Simplified29.6

    \[\leadsto \sqrt[3]{\color{blue}{{\left(\frac{x}{x + 1} - \frac{x + 1}{x - 1}\right)}^{3}}}\]
  5. Using strategy rm
  6. Applied div-inv_binary64_170829.7

    \[\leadsto \sqrt[3]{{\left(\frac{x}{x + 1} - \color{blue}{\left(x + 1\right) \cdot \frac{1}{x - 1}}\right)}^{3}}\]
  7. Final simplification29.7

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

Reproduce

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