Average Error: 0.0 → 0.0
Time: 14.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 r42134136 = x;
        double r42134137 = y;
        double r42134138 = r42134136 - r42134137;
        double r42134139 = 2.0;
        double r42134140 = r42134136 + r42134137;
        double r42134141 = r42134139 - r42134140;
        double r42134142 = r42134138 / r42134141;
        return r42134142;
}

double f(double x, double y) {
        double r42134143 = x;
        double r42134144 = y;
        double r42134145 = r42134143 - r42134144;
        double r42134146 = 2.0;
        double r42134147 = r42134144 + r42134143;
        double r42134148 = r42134146 - r42134147;
        double r42134149 = r42134145 / r42134148;
        return r42134149;
}

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