Average Error: 0.0 → 0.0
Time: 16.4s
Precision: 64
\[\frac{x - y}{2.0 - \left(x + y\right)}\]
\[\frac{x - y}{2.0 - \left(y + x\right)}\]
\frac{x - y}{2.0 - \left(x + y\right)}
\frac{x - y}{2.0 - \left(y + x\right)}
double f(double x, double y) {
        double r41565709 = x;
        double r41565710 = y;
        double r41565711 = r41565709 - r41565710;
        double r41565712 = 2.0;
        double r41565713 = r41565709 + r41565710;
        double r41565714 = r41565712 - r41565713;
        double r41565715 = r41565711 / r41565714;
        return r41565715;
}

double f(double x, double y) {
        double r41565716 = x;
        double r41565717 = y;
        double r41565718 = r41565716 - r41565717;
        double r41565719 = 2.0;
        double r41565720 = r41565717 + r41565716;
        double r41565721 = r41565719 - r41565720;
        double r41565722 = r41565718 / r41565721;
        return r41565722;
}

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

Derivation

  1. Initial program 0.0

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

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

Reproduce

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