Average Error: 0.0 → 0.0
Time: 12.1s
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 r40779817 = x;
        double r40779818 = y;
        double r40779819 = r40779817 - r40779818;
        double r40779820 = 2.0;
        double r40779821 = r40779817 + r40779818;
        double r40779822 = r40779820 - r40779821;
        double r40779823 = r40779819 / r40779822;
        return r40779823;
}

double f(double x, double y) {
        double r40779824 = x;
        double r40779825 = y;
        double r40779826 = r40779824 - r40779825;
        double r40779827 = 2.0;
        double r40779828 = r40779825 + r40779824;
        double r40779829 = r40779827 - r40779828;
        double r40779830 = r40779826 / r40779829;
        return r40779830;
}

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 2019163 
(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))))