Average Error: 0.0 → 0.0
Time: 10.9s
Precision: 64
\[\frac{x - y}{2 - \left(x + y\right)}\]
\[\frac{x - y}{\left(2 - x\right) - y}\]
\frac{x - y}{2 - \left(x + y\right)}
\frac{x - y}{\left(2 - x\right) - y}
double f(double x, double y) {
        double r784514 = x;
        double r784515 = y;
        double r784516 = r784514 - r784515;
        double r784517 = 2.0;
        double r784518 = r784514 + r784515;
        double r784519 = r784517 - r784518;
        double r784520 = r784516 / r784519;
        return r784520;
}

double f(double x, double y) {
        double r784521 = x;
        double r784522 = y;
        double r784523 = r784521 - r784522;
        double r784524 = 2.0;
        double r784525 = r784524 - r784521;
        double r784526 = r784525 - r784522;
        double r784527 = r784523 / r784526;
        return r784527;
}

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. Simplified0.0

    \[\leadsto \color{blue}{\frac{x - y}{\left(2 - x\right) - y}}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019196 +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))))