Average Error: 0.1 → 0.1
Time: 12.3s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot x + \left(2 \cdot y + \left(z + x\right)\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot x + \left(2 \cdot y + \left(z + x\right)\right)
double f(double x, double y, double z) {
        double r215323 = x;
        double r215324 = y;
        double r215325 = r215323 + r215324;
        double r215326 = r215325 + r215324;
        double r215327 = r215326 + r215323;
        double r215328 = z;
        double r215329 = r215327 + r215328;
        double r215330 = r215329 + r215323;
        return r215330;
}

double f(double x, double y, double z) {
        double r215331 = 2.0;
        double r215332 = x;
        double r215333 = r215331 * r215332;
        double r215334 = y;
        double r215335 = r215331 * r215334;
        double r215336 = z;
        double r215337 = r215336 + r215332;
        double r215338 = r215335 + r215337;
        double r215339 = r215333 + r215338;
        return r215339;
}

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}{2 \cdot \left(x + y\right) + \left(z + x\right)}\]
  3. Using strategy rm
  4. Applied distribute-lft-in0.1

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

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

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

Reproduce

herbie shell --seed 2020047 
(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))