Average Error: 16.2 → 16.2
Time: 720.0ms
Precision: binary64
\[x - \frac{{x}^{2} - 2}{2 \cdot x}\]
\[x - \frac{{x}^{2} - 2}{2 \cdot x}\]
x - \frac{{x}^{2} - 2}{2 \cdot x}
x - \frac{{x}^{2} - 2}{2 \cdot x}
double code(double x) {
	return ((double) (x - ((double) (((double) (((double) pow(x, 2.0)) - 2.0)) / ((double) (2.0 * x))))));
}
double code(double x) {
	return ((double) (x - ((double) (((double) (((double) pow(x, 2.0)) - 2.0)) / ((double) (2.0 * x))))));
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 16.2

    \[x - \frac{{x}^{2} - 2}{2 \cdot x}\]
  2. Final simplification16.2

    \[\leadsto x - \frac{{x}^{2} - 2}{2 \cdot x}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (x)
  :name "(- x (/ (- (pow x 2) 2) (* 2 x)))"
  :precision binary64
  (- x (/ (- (pow x 2.0) 2.0) (* 2.0 x))))