Average Error: 0.0 → 0.0
Time: 4.1s
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 r199026 = x;
        double r199027 = y;
        double r199028 = r199026 + r199027;
        double r199029 = 1.0;
        double r199030 = r199027 + r199029;
        double r199031 = r199028 / r199030;
        return r199031;
}

double f(double x, double y) {
        double r199032 = x;
        double r199033 = y;
        double r199034 = r199032 + r199033;
        double r199035 = 1.0;
        double r199036 = r199035 + r199033;
        double r199037 = r199034 / r199036;
        return r199037;
}

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