Average Error: 0.0 → 0.0
Time: 6.8s
Precision: 64
\[\frac{x - y}{1 - y}\]
\[\frac{x}{1 - y} - \frac{y}{1 - y}\]
\frac{x - y}{1 - y}
\frac{x}{1 - y} - \frac{y}{1 - y}
double f(double x, double y) {
        double r8186135 = x;
        double r8186136 = y;
        double r8186137 = r8186135 - r8186136;
        double r8186138 = 1.0;
        double r8186139 = r8186138 - r8186136;
        double r8186140 = r8186137 / r8186139;
        return r8186140;
}

double f(double x, double y) {
        double r8186141 = x;
        double r8186142 = 1.0;
        double r8186143 = y;
        double r8186144 = r8186142 - r8186143;
        double r8186145 = r8186141 / r8186144;
        double r8186146 = r8186143 / r8186144;
        double r8186147 = r8186145 - r8186146;
        return r8186147;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\frac{x - y}{1 - y}\]
  2. Using strategy rm
  3. Applied div-sub0.0

    \[\leadsto \color{blue}{\frac{x}{1 - y} - \frac{y}{1 - y}}\]
  4. Final simplification0.0

    \[\leadsto \frac{x}{1 - y} - \frac{y}{1 - y}\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  (/ (- x y) (- 1.0 y)))