Average Error: 0.0 → 0.0
Time: 13.2s
Precision: 64
\[\frac{x - y}{2 - \left(x + y\right)}\]
\[\frac{x - y}{2 - \left(x + y\right)}\]
\frac{x - y}{2 - \left(x + y\right)}
\frac{x - y}{2 - \left(x + y\right)}
double f(double x, double y) {
        double r488058 = x;
        double r488059 = y;
        double r488060 = r488058 - r488059;
        double r488061 = 2.0;
        double r488062 = r488058 + r488059;
        double r488063 = r488061 - r488062;
        double r488064 = r488060 / r488063;
        return r488064;
}

double f(double x, double y) {
        double r488065 = x;
        double r488066 = y;
        double r488067 = r488065 - r488066;
        double r488068 = 2.0;
        double r488069 = r488065 + r488066;
        double r488070 = r488068 - r488069;
        double r488071 = r488067 / r488070;
        return r488071;
}

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}{2 - \left(x + y\right)} - \frac{y}{2 - \left(x + y\right)}\]

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{2 - \left(x + y\right)}\]
  2. Final simplification0.0

    \[\leadsto \frac{x - y}{2 - \left(x + y\right)}\]

Reproduce

herbie shell --seed 2019199 +o rules:numerics
(FPCore (x y)
  :name "Data.Colour.RGB:hslsv from colour-2.3.3, C"

  :herbie-target
  (- (/ x (- 2.0 (+ x y))) (/ y (- 2.0 (+ x y))))

  (/ (- x y) (- 2.0 (+ x y))))