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

Error

Bits error versus r

Bits error versus x

Bits error versus a

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 26.3

    \[\frac{r \cdot x - a \cdot y}{r \cdot r + a \cdot a}\]
  2. Final simplification26.3

    \[\leadsto \frac{r \cdot x - a \cdot y}{r \cdot r + a \cdot a}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (r x a y)
  :name "(/ (- (* r x) (* a y)) (+ (* r r) (* a a)))"
  :precision binary64
  (/ (- (* r x) (* a y)) (+ (* r r) (* a a))))