Average Error: 0.0 → 0.0
Time: 7.0s
Precision: 64
\[\frac{x + y}{x - y}\]
\[\frac{y + x}{x - y}\]
\frac{x + y}{x - y}
\frac{y + x}{x - y}
double f(double x, double y) {
        double r25313477 = x;
        double r25313478 = y;
        double r25313479 = r25313477 + r25313478;
        double r25313480 = r25313477 - r25313478;
        double r25313481 = r25313479 / r25313480;
        return r25313481;
}

double f(double x, double y) {
        double r25313482 = y;
        double r25313483 = x;
        double r25313484 = r25313482 + r25313483;
        double r25313485 = r25313483 - r25313482;
        double r25313486 = r25313484 / r25313485;
        return r25313486;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\frac{1}{\frac{x}{x + y} - \frac{y}{x + y}}\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2019162 
(FPCore (x y)
  :name "Linear.Projection:perspective from linear-1.19.1.3, A"

  :herbie-target
  (/ 1 (- (/ x (+ x y)) (/ y (+ x y))))

  (/ (+ x y) (- x y)))