Average Error: 0.0 → 0.0
Time: 8.5s
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 r205950 = x;
        double r205951 = y;
        double r205952 = r205950 + r205951;
        double r205953 = 1.0;
        double r205954 = r205951 + r205953;
        double r205955 = r205952 / r205954;
        return r205955;
}

double f(double x, double y) {
        double r205956 = x;
        double r205957 = y;
        double r205958 = r205956 + r205957;
        double r205959 = 1.0;
        double r205960 = r205959 + r205957;
        double r205961 = r205958 / r205960;
        return r205961;
}

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 2019196 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  (/ (+ x y) (+ y 1.0)))