Average Error: 0.0 → 0.0
Time: 7.6s
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 r38795930 = x;
        double r38795931 = y;
        double r38795932 = r38795930 - r38795931;
        double r38795933 = 2.0;
        double r38795934 = r38795930 + r38795931;
        double r38795935 = r38795933 - r38795934;
        double r38795936 = r38795932 / r38795935;
        return r38795936;
}

double f(double x, double y) {
        double r38795937 = x;
        double r38795938 = y;
        double r38795939 = r38795937 - r38795938;
        double r38795940 = 2.0;
        double r38795941 = r38795938 + r38795937;
        double r38795942 = r38795940 - r38795941;
        double r38795943 = r38795939 / r38795942;
        return r38795943;
}

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