Average Error: 0.0 → 0.0
Time: 15.0s
Precision: 64
\[\frac{x + y}{10}\]
\[\frac{x}{10} + \frac{y}{10}\]
\frac{x + y}{10}
\frac{x}{10} + \frac{y}{10}
double f(double x, double y) {
        double r11594 = x;
        double r11595 = y;
        double r11596 = r11594 + r11595;
        double r11597 = 10.0;
        double r11598 = r11596 / r11597;
        return r11598;
}

double f(double x, double y) {
        double r11599 = x;
        double r11600 = 10.0;
        double r11601 = r11599 / r11600;
        double r11602 = y;
        double r11603 = r11602 / r11600;
        double r11604 = r11601 + r11603;
        return r11604;
}

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. Using strategy rm
  5. Applied associate-/r/0.4

    \[\leadsto \color{blue}{\frac{1}{10} \cdot \left(x + y\right)}\]
  6. Using strategy rm
  7. Applied distribute-lft-in0.4

    \[\leadsto \color{blue}{\frac{1}{10} \cdot x + \frac{1}{10} \cdot y}\]
  8. Simplified0.2

    \[\leadsto \color{blue}{\frac{x}{10}} + \frac{1}{10} \cdot y\]
  9. Simplified0.0

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

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

Reproduce

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