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 r6129 = x;
        double r6130 = y;
        double r6131 = r6129 + r6130;
        double r6132 = 10.0;
        double r6133 = r6131 / r6132;
        return r6133;
}

double f(double x, double y) {
        double r6134 = 1.0;
        double r6135 = 10.0;
        double r6136 = x;
        double r6137 = y;
        double r6138 = r6136 + r6137;
        double r6139 = r6135 / r6138;
        double r6140 = r6134 / r6139;
        return r6140;
}

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 
(FPCore (x y)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, A"
  :precision binary64
  (/ (+ x y) 10))