Average Error: 0.0 → 0.0
Time: 12.1s
Precision: 64
\[0 \le x \land x \lt y\]
\[\frac{x + y}{x - y}\]
\[\frac{x + y}{x - y}\]
\frac{x + y}{x - y}
\frac{x + y}{x - y}
double f(double x, double y) {
        double r23640585 = x;
        double r23640586 = y;
        double r23640587 = r23640585 + r23640586;
        double r23640588 = r23640585 - r23640586;
        double r23640589 = r23640587 / r23640588;
        return r23640589;
}

double f(double x, double y) {
        double r23640590 = x;
        double r23640591 = y;
        double r23640592 = r23640590 + r23640591;
        double r23640593 = r23640590 - r23640591;
        double r23640594 = r23640592 / r23640593;
        return r23640594;
}

Error

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 0.0

    \[\frac{x + y}{x - y}\]
  2. Final simplification0.0

    \[\leadsto \frac{x + y}{x - y}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "(x+y)/(x-y)"
  :pre (and (<= 0 x) (< x y))
  (/ (+ x y) (- x y)))