Average Error: 0.0 → 0.0
Time: 30.1s
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 r37142477 = x;
        double r37142478 = y;
        double r37142479 = r37142477 - r37142478;
        double r37142480 = r37142477 + r37142478;
        double r37142481 = r37142479 / r37142480;
        return r37142481;
}

double f(double x, double y) {
        double r37142482 = 1.0;
        double r37142483 = x;
        double r37142484 = y;
        double r37142485 = r37142483 + r37142484;
        double r37142486 = r37142483 - r37142484;
        double r37142487 = r37142485 / r37142486;
        double r37142488 = r37142482 / r37142487;
        return r37142488;
}

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)))