Average Error: 0.0 → 0.0
Time: 10.6s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{1}{\frac{x + y}{x}} - \frac{y}{x + y}\]
\frac{x - y}{x + y}
\frac{1}{\frac{x + y}{x}} - \frac{y}{x + y}
double f(double x, double y) {
        double r38647590 = x;
        double r38647591 = y;
        double r38647592 = r38647590 - r38647591;
        double r38647593 = r38647590 + r38647591;
        double r38647594 = r38647592 / r38647593;
        return r38647594;
}

double f(double x, double y) {
        double r38647595 = 1.0;
        double r38647596 = x;
        double r38647597 = y;
        double r38647598 = r38647596 + r38647597;
        double r38647599 = r38647598 / r38647596;
        double r38647600 = r38647595 / r38647599;
        double r38647601 = r38647597 / r38647598;
        double r38647602 = r38647600 - r38647601;
        return r38647602;
}

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 div-sub0.0

    \[\leadsto \color{blue}{\frac{x}{x + y} - \frac{y}{x + y}}\]
  4. Using strategy rm
  5. Applied clear-num0.0

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

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

Reproduce

herbie shell --seed 2019163 
(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)))