Average Error: 0.0 → 0.0
Time: 7.7s
Precision: 64
\[\frac{x - y}{2 - \left(x + y\right)}\]
\[\frac{x - y}{2 - \left(y + x\right)}\]
\frac{x - y}{2 - \left(x + y\right)}
\frac{x - y}{2 - \left(y + x\right)}
double f(double x, double y) {
        double r41597169 = x;
        double r41597170 = y;
        double r41597171 = r41597169 - r41597170;
        double r41597172 = 2.0;
        double r41597173 = r41597169 + r41597170;
        double r41597174 = r41597172 - r41597173;
        double r41597175 = r41597171 / r41597174;
        return r41597175;
}

double f(double x, double y) {
        double r41597176 = x;
        double r41597177 = y;
        double r41597178 = r41597176 - r41597177;
        double r41597179 = 2.0;
        double r41597180 = r41597177 + r41597176;
        double r41597181 = r41597179 - r41597180;
        double r41597182 = r41597178 / r41597181;
        return r41597182;
}

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

Reproduce

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