Average Error: 0.1 → 0.1
Time: 6.8s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[2 \cdot y + \left(z + 3 \cdot x\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
2 \cdot y + \left(z + 3 \cdot x\right)
double f(double x, double y, double z) {
        double r3619982 = x;
        double r3619983 = y;
        double r3619984 = r3619982 + r3619983;
        double r3619985 = r3619984 + r3619983;
        double r3619986 = r3619985 + r3619982;
        double r3619987 = z;
        double r3619988 = r3619986 + r3619987;
        double r3619989 = r3619988 + r3619982;
        return r3619989;
}

double f(double x, double y, double z) {
        double r3619990 = 2.0;
        double r3619991 = y;
        double r3619992 = r3619990 * r3619991;
        double r3619993 = z;
        double r3619994 = 3.0;
        double r3619995 = x;
        double r3619996 = r3619994 * r3619995;
        double r3619997 = r3619993 + r3619996;
        double r3619998 = r3619992 + r3619997;
        return r3619998;
}

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 + \left(\left(y + x\right) + \left(y + x\right)\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 2 \cdot y + \left(z + 3 \cdot x\right)\]

Reproduce

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