Average Error: 0.1 → 0.1
Time: 12.8s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot \left(x + y\right) + \left(z + x\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot \left(x + y\right) + \left(z + x\right)
double f(double x, double y, double z) {
        double r96764 = x;
        double r96765 = y;
        double r96766 = r96764 + r96765;
        double r96767 = r96766 + r96765;
        double r96768 = r96767 + r96764;
        double r96769 = z;
        double r96770 = r96768 + r96769;
        double r96771 = r96770 + r96764;
        return r96771;
}

double f(double x, double y, double z) {
        double r96772 = 2.0;
        double r96773 = x;
        double r96774 = y;
        double r96775 = r96773 + r96774;
        double r96776 = r96772 * r96775;
        double r96777 = z;
        double r96778 = r96777 + r96773;
        double r96779 = r96776 + r96778;
        return r96779;
}

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. Using strategy rm
  3. Applied *-un-lft-identity0.1

    \[\leadsto \left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + \color{blue}{1 \cdot x}\]
  4. Applied *-un-lft-identity0.1

    \[\leadsto \color{blue}{1 \cdot \left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right)} + 1 \cdot x\]
  5. Applied distribute-lft-out0.1

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

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

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

Reproduce

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