Average Error: 0.0 → 0.0
Time: 11.3s
Precision: 64
\[\frac{x - y}{x + y}\]
\[\frac{x - y}{y + x}\]
\frac{x - y}{x + y}
\frac{x - y}{y + x}
double f(double x, double y) {
        double r37973269 = x;
        double r37973270 = y;
        double r37973271 = r37973269 - r37973270;
        double r37973272 = r37973269 + r37973270;
        double r37973273 = r37973271 / r37973272;
        return r37973273;
}

double f(double x, double y) {
        double r37973274 = x;
        double r37973275 = y;
        double r37973276 = r37973274 - r37973275;
        double r37973277 = r37973275 + r37973274;
        double r37973278 = r37973276 / r37973277;
        return r37973278;
}

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

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

Reproduce

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