Average Error: 16.1 → 16.1
Time: 658.0ms
Precision: binary64
\[\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}\]
\[\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}\]
\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}
\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}
double code(double x) {
	return ((double) (((double) (((double) (((double) (x * x)) + x)) - 2.0)) / ((double) (((double) (((double) (x * x)) - ((double) (2.0 * x)))) + 3.0))));
}
double code(double x) {
	return ((double) (((double) (((double) (((double) (x * x)) + x)) - 2.0)) / ((double) (((double) (((double) (x * x)) - ((double) (2.0 * x)))) + 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 16.1

    \[\frac{\left(x \cdot x + x\right) - 2}{\left(x \cdot x - 2 \cdot x\right) + 3}\]
  2. Final simplification16.1

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

Reproduce

herbie shell --seed 2020152 
(FPCore (x)
  :name "(/ (- (+ (* x x) x) 2) (+ (- (* x x) (* 2 x)) 3))"
  :precision binary64
  (/ (- (+ (* x x) x) 2.0) (+ (- (* x x) (* 2.0 x)) 3.0)))