Average Error: 0.0 → 0.0
Time: 4.0s
Precision: 64
\[\frac{x - y}{1 - y}\]
\[\frac{x - y}{1 - y}\]
\frac{x - y}{1 - y}
\frac{x - y}{1 - y}
double f(double x, double y) {
        double r167803 = x;
        double r167804 = y;
        double r167805 = r167803 - r167804;
        double r167806 = 1.0;
        double r167807 = r167806 - r167804;
        double r167808 = r167805 / r167807;
        return r167808;
}

double f(double x, double y) {
        double r167809 = x;
        double r167810 = y;
        double r167811 = r167809 - r167810;
        double r167812 = 1.0;
        double r167813 = r167812 - r167810;
        double r167814 = r167811 / r167813;
        return r167814;
}

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 clear-num0.1

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

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

Reproduce

herbie shell --seed 2019304 
(FPCore (x y)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, C"
  :precision binary64
  (/ (- x y) (- 1 y)))