Average Error: 0.0 → 0.0
Time: 11.9s
Precision: 64
\[\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 r991463 = x;
        double r991464 = y;
        double r991465 = r991463 - r991464;
        double r991466 = r991463 + r991464;
        double r991467 = r991465 / r991466;
        return r991467;
}

double f(double x, double y) {
        double r991468 = x;
        double r991469 = y;
        double r991470 = r991468 - r991469;
        double r991471 = r991468 + r991469;
        double r991472 = r991470 / r991471;
        return r991472;
}

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{x}{x + y} - \frac{y}{x + y}\]

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 2020046 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
  :precision binary64

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

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