Average Error: 0.1 → 0.1
Time: 8.4s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[\left(3 \cdot x + z\right) + 2 \cdot y\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\left(3 \cdot x + z\right) + 2 \cdot y
double f(double x, double y, double z) {
        double r187577 = x;
        double r187578 = y;
        double r187579 = r187577 + r187578;
        double r187580 = r187579 + r187578;
        double r187581 = r187580 + r187577;
        double r187582 = z;
        double r187583 = r187581 + r187582;
        double r187584 = r187583 + r187577;
        return r187584;
}

double f(double x, double y, double z) {
        double r187585 = 3.0;
        double r187586 = x;
        double r187587 = r187585 * r187586;
        double r187588 = z;
        double r187589 = r187587 + r187588;
        double r187590 = 2.0;
        double r187591 = y;
        double r187592 = r187590 * r187591;
        double r187593 = r187589 + r187592;
        return r187593;
}

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. Taylor expanded around 0 0.1

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

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

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

Reproduce

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