Average Error: 0.0 → 0.3
Time: 2.0s
Precision: 64
\[\frac{x + y}{10}\]
\[\frac{1}{\frac{10}{x + y}}\]
\frac{x + y}{10}
\frac{1}{\frac{10}{x + y}}
double f(double x, double y) {
        double r6243 = x;
        double r6244 = y;
        double r6245 = r6243 + r6244;
        double r6246 = 10.0;
        double r6247 = r6245 / r6246;
        return r6247;
}

double f(double x, double y) {
        double r6248 = 1.0;
        double r6249 = 10.0;
        double r6250 = x;
        double r6251 = y;
        double r6252 = r6250 + r6251;
        double r6253 = r6249 / r6252;
        double r6254 = r6248 / r6253;
        return r6254;
}

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}{10}\]
  2. Using strategy rm
  3. Applied clear-num0.3

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

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

Reproduce

herbie shell --seed 2020089 +o rules:numerics
(FPCore (x y)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, A"
  :precision binary64
  (/ (+ x y) 10))