Average Error: 0.0 → 0.0
Time: 18.5s
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 r37515844 = x;
        double r37515845 = y;
        double r37515846 = r37515844 - r37515845;
        double r37515847 = r37515844 + r37515845;
        double r37515848 = r37515846 / r37515847;
        return r37515848;
}

double f(double x, double y) {
        double r37515849 = x;
        double r37515850 = y;
        double r37515851 = r37515849 - r37515850;
        double r37515852 = r37515850 + r37515849;
        double r37515853 = r37515851 / r37515852;
        return r37515853;
}

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