Average Error: 0.0 → 0.0
Time: 13.5s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{1}{\frac{x + y}{x - y}}\]
\frac{x - y}{x + y}
\frac{1}{\frac{x + y}{x - y}}
double f(double x, double y) {
        double r40439527 = x;
        double r40439528 = y;
        double r40439529 = r40439527 - r40439528;
        double r40439530 = r40439527 + r40439528;
        double r40439531 = r40439529 / r40439530;
        return r40439531;
}

double f(double x, double y) {
        double r40439532 = 1.0;
        double r40439533 = x;
        double r40439534 = y;
        double r40439535 = r40439533 + r40439534;
        double r40439536 = r40439533 - r40439534;
        double r40439537 = r40439535 / r40439536;
        double r40439538 = r40439532 / r40439537;
        return r40439538;
}

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. Using strategy rm
  3. Applied clear-num0.0

    \[\leadsto \color{blue}{\frac{1}{\frac{x + y}{x - y}}}\]
  4. Final simplification0.0

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

Reproduce

herbie shell --seed 2019168 
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, D"

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

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