Average Error: 0.0 → 0.0
Time: 4.6s
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 r8721401 = x;
        double r8721402 = y;
        double r8721403 = r8721401 - r8721402;
        double r8721404 = 1.0;
        double r8721405 = r8721404 - r8721402;
        double r8721406 = r8721403 / r8721405;
        return r8721406;
}

double f(double x, double y) {
        double r8721407 = x;
        double r8721408 = 1.0;
        double r8721409 = y;
        double r8721410 = r8721408 - r8721409;
        double r8721411 = r8721407 / r8721410;
        double r8721412 = r8721409 / r8721410;
        double r8721413 = r8721411 - r8721412;
        return r8721413;
}

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 2019171 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  (/ (- x y) (- 1.0 y)))