Average Error: 0.0 → 0.0
Time: 6.6s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\frac{x + y}{1 + y}\]
\frac{x + y}{y + 1}
\frac{x + y}{1 + y}
double f(double x, double y) {
        double r141697 = x;
        double r141698 = y;
        double r141699 = r141697 + r141698;
        double r141700 = 1.0;
        double r141701 = r141698 + r141700;
        double r141702 = r141699 / r141701;
        return r141702;
}

double f(double x, double y) {
        double r141703 = x;
        double r141704 = y;
        double r141705 = r141703 + r141704;
        double r141706 = 1.0;
        double r141707 = r141706 + r141704;
        double r141708 = r141705 / r141707;
        return r141708;
}

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}{y + 1}\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019179 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  (/ (+ x y) (+ y 1.0)))