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 r204680 = x;
        double r204681 = y;
        double r204682 = r204680 + r204681;
        double r204683 = r204682 + r204681;
        double r204684 = r204683 + r204680;
        double r204685 = z;
        double r204686 = r204684 + r204685;
        double r204687 = r204686 + r204680;
        return r204687;
}

double f(double x, double y, double z) {
        double r204688 = 3.0;
        double r204689 = x;
        double r204690 = r204688 * r204689;
        double r204691 = z;
        double r204692 = r204690 + r204691;
        double r204693 = 2.0;
        double r204694 = y;
        double r204695 = r204693 * r204694;
        double r204696 = r204692 + r204695;
        return r204696;
}

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))