Average Error: 0.0 → 0.1
Time: 11.0s
Precision: 64
\[\frac{x + y}{y + 1}\]
\[\frac{1}{\frac{y + 1}{x + y}}\]
\frac{x + y}{y + 1}
\frac{1}{\frac{y + 1}{x + y}}
double f(double x, double y) {
        double r310302 = x;
        double r310303 = y;
        double r310304 = r310302 + r310303;
        double r310305 = 1.0;
        double r310306 = r310303 + r310305;
        double r310307 = r310304 / r310306;
        return r310307;
}

double f(double x, double y) {
        double r310308 = 1.0;
        double r310309 = y;
        double r310310 = 1.0;
        double r310311 = r310309 + r310310;
        double r310312 = x;
        double r310313 = r310312 + r310309;
        double r310314 = r310311 / r310313;
        double r310315 = r310308 / r310314;
        return r310315;
}

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

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

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

Reproduce

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