Average Error: 0.0 → 0.0
Time: 8.7s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{x}{y + x} - \frac{y}{y + x}\]
\frac{x - y}{x + y}
\frac{x}{y + x} - \frac{y}{y + x}
double f(double x, double y) {
        double r44360386 = x;
        double r44360387 = y;
        double r44360388 = r44360386 - r44360387;
        double r44360389 = r44360386 + r44360387;
        double r44360390 = r44360388 / r44360389;
        return r44360390;
}

double f(double x, double y) {
        double r44360391 = x;
        double r44360392 = y;
        double r44360393 = r44360392 + r44360391;
        double r44360394 = r44360391 / r44360393;
        double r44360395 = r44360392 / r44360393;
        double r44360396 = r44360394 - r44360395;
        return r44360396;
}

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. Final simplification0.0

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

Reproduce

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