Average Error: 22.2 → 22.2
Time: 1.0s
Precision: binary64
\[\frac{n \cdot x - y \cdot y}{n \cdot n - n}\]
\[\frac{n \cdot x - y \cdot y}{n \cdot n - n}\]
\frac{n \cdot x - y \cdot y}{n \cdot n - n}
\frac{n \cdot x - y \cdot y}{n \cdot n - n}
double code(double n, double x, double y) {
	return ((double) (((double) (((double) (n * x)) - ((double) (y * y)))) / ((double) (((double) (n * n)) - n))));
}
double code(double n, double x, double y) {
	return ((double) (((double) (((double) (n * x)) - ((double) (y * y)))) / ((double) (((double) (n * n)) - n))));
}

Error

Bits error versus n

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 22.2

    \[\frac{n \cdot x - y \cdot y}{n \cdot n - n}\]
  2. Final simplification22.2

    \[\leadsto \frac{n \cdot x - y \cdot y}{n \cdot n - n}\]

Reproduce

herbie shell --seed 2020152 
(FPCore (n x y)
  :name "(/ (- (* n x) (* y y)) (- (* n n) n))"
  :precision binary64
  (/ (- (* n x) (* y y)) (- (* n n) n)))