Average Error: 0.0 → 0.0
Time: 6.2s
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 r14103998 = x;
        double r14103999 = y;
        double r14104000 = r14103998 - r14103999;
        double r14104001 = r14103998 + r14103999;
        double r14104002 = r14104000 / r14104001;
        return r14104002;
}

double f(double x, double y) {
        double r14104003 = x;
        double r14104004 = y;
        double r14104005 = r14104003 - r14104004;
        double r14104006 = r14104004 + r14104003;
        double r14104007 = r14104005 / r14104006;
        return r14104007;
}

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 2019156 +o rules:numerics
(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)))