Average Error: 0.0 → 0.1
Time: 9.6s
Precision: 64
\[\frac{x - y}{2 - \left(x + y\right)}\]
\[\frac{1}{\frac{2 - \left(y + x\right)}{x - y}}\]
\frac{x - y}{2 - \left(x + y\right)}
\frac{1}{\frac{2 - \left(y + x\right)}{x - y}}
double f(double x, double y) {
        double r928218 = x;
        double r928219 = y;
        double r928220 = r928218 - r928219;
        double r928221 = 2.0;
        double r928222 = r928218 + r928219;
        double r928223 = r928221 - r928222;
        double r928224 = r928220 / r928223;
        return r928224;
}

double f(double x, double y) {
        double r928225 = 1.0;
        double r928226 = 2.0;
        double r928227 = y;
        double r928228 = x;
        double r928229 = r928227 + r928228;
        double r928230 = r928226 - r928229;
        double r928231 = r928228 - r928227;
        double r928232 = r928230 / r928231;
        double r928233 = r928225 / r928232;
        return r928233;
}

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.1
\[\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. Simplified0.0

    \[\leadsto \color{blue}{\frac{x - y}{\left(2 - x\right) - y}}\]
  3. Using strategy rm
  4. Applied clear-num0.1

    \[\leadsto \color{blue}{\frac{1}{\frac{\left(2 - x\right) - y}{x - y}}}\]
  5. Simplified0.1

    \[\leadsto \frac{1}{\color{blue}{\frac{2 - \left(x + y\right)}{x - y}}}\]
  6. Final simplification0.1

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

Reproduce

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