Average Error: 0.1 → 0.1
Time: 15.0s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[x + \left(\left(z + 2 \cdot x\right) + 2 \cdot y\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
x + \left(\left(z + 2 \cdot x\right) + 2 \cdot y\right)
double f(double x, double y, double z) {
        double r186182 = x;
        double r186183 = y;
        double r186184 = r186182 + r186183;
        double r186185 = r186184 + r186183;
        double r186186 = r186185 + r186182;
        double r186187 = z;
        double r186188 = r186186 + r186187;
        double r186189 = r186188 + r186182;
        return r186189;
}

double f(double x, double y, double z) {
        double r186190 = x;
        double r186191 = z;
        double r186192 = 2.0;
        double r186193 = r186192 * r186190;
        double r186194 = r186191 + r186193;
        double r186195 = y;
        double r186196 = r186192 * r186195;
        double r186197 = r186194 + r186196;
        double r186198 = r186190 + r186197;
        return r186198;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
  2. Simplified0.1

    \[\leadsto \color{blue}{x + \left(z + 2 \cdot \left(x + y\right)\right)}\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.1

    \[\leadsto x + \left(z + \color{blue}{\left(2 \cdot x + 2 \cdot y\right)}\right)\]
  5. Applied associate-+r+0.1

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

    \[\leadsto x + \left(\left(z + 2 \cdot x\right) + 2 \cdot y\right)\]

Reproduce

herbie shell --seed 2019303 
(FPCore (x y z)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendInside from plot-0.2.3.4"
  :precision binary64
  (+ (+ (+ (+ (+ x y) y) x) z) x))