Average Error: 0.0 → 0.0
Time: 4.8s
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 r569176 = x;
        double r569177 = y;
        double r569178 = r569176 - r569177;
        double r569179 = r569176 + r569177;
        double r569180 = r569178 / r569179;
        return r569180;
}

double f(double x, double y) {
        double r569181 = 1.0;
        double r569182 = x;
        double r569183 = y;
        double r569184 = r569182 + r569183;
        double r569185 = r569182 - r569183;
        double r569186 = r569184 / r569185;
        double r569187 = r569181 / r569186;
        return r569187;
}

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