Average Error: 0.0 → 0.0
Time: 27.1s
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 r31798707 = x;
        double r31798708 = y;
        double r31798709 = r31798707 - r31798708;
        double r31798710 = 2.0;
        double r31798711 = r31798707 + r31798708;
        double r31798712 = r31798710 - r31798711;
        double r31798713 = r31798709 / r31798712;
        return r31798713;
}

double f(double x, double y) {
        double r31798714 = x;
        double r31798715 = y;
        double r31798716 = r31798714 - r31798715;
        double r31798717 = 2.0;
        double r31798718 = r31798715 + r31798714;
        double r31798719 = r31798717 - r31798718;
        double r31798720 = r31798716 / r31798719;
        return r31798720;
}

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 +o rules:numerics
(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))))