Average Error: 0.0 → 0.1
Time: 1.6s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\left(x + y\right) \cdot \frac{1}{y + 1}\]
\frac{x + y}{y + 1}
\left(x + y\right) \cdot \frac{1}{y + 1}
double f(double x, double y) {
        double r321010 = x;
        double r321011 = y;
        double r321012 = r321010 + r321011;
        double r321013 = 1.0;
        double r321014 = r321011 + r321013;
        double r321015 = r321012 / r321014;
        return r321015;
}

double f(double x, double y) {
        double r321016 = x;
        double r321017 = y;
        double r321018 = r321016 + r321017;
        double r321019 = 1.0;
        double r321020 = 1.0;
        double r321021 = r321017 + r321020;
        double r321022 = r321019 / r321021;
        double r321023 = r321018 * r321022;
        return r321023;
}

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. Using strategy rm
  3. Applied div-inv0.1

    \[\leadsto \color{blue}{\left(x + y\right) \cdot \frac{1}{y + 1}}\]
  4. Final simplification0.1

    \[\leadsto \left(x + y\right) \cdot \frac{1}{y + 1}\]

Reproduce

herbie shell --seed 2020100 
(FPCore (x y)
  :name "Data.Colour.SRGB:invTransferFunction from colour-2.3.3"
  :precision binary64
  (/ (+ x y) (+ y 1)))