Average Error: 0.0 → 0.0
Time: 13.8s
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 r43116140 = x;
        double r43116141 = y;
        double r43116142 = r43116140 - r43116141;
        double r43116143 = 2.0;
        double r43116144 = r43116140 + r43116141;
        double r43116145 = r43116143 - r43116144;
        double r43116146 = r43116142 / r43116145;
        return r43116146;
}

double f(double x, double y) {
        double r43116147 = x;
        double r43116148 = y;
        double r43116149 = r43116147 - r43116148;
        double r43116150 = 2.0;
        double r43116151 = r43116148 + r43116147;
        double r43116152 = r43116150 - r43116151;
        double r43116153 = r43116149 / r43116152;
        return r43116153;
}

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