Average Error: 0.1 → 0.1
Time: 4.4s
Precision: 64
\[\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x\]
\[3 \cdot x + \left(z + 2 \cdot y\right)\]
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
3 \cdot x + \left(z + 2 \cdot y\right)
double f(double x, double y, double z) {
        double r117017 = x;
        double r117018 = y;
        double r117019 = r117017 + r117018;
        double r117020 = r117019 + r117018;
        double r117021 = r117020 + r117017;
        double r117022 = z;
        double r117023 = r117021 + r117022;
        double r117024 = r117023 + r117017;
        return r117024;
}

double f(double x, double y, double z) {
        double r117025 = 3.0;
        double r117026 = x;
        double r117027 = r117025 * r117026;
        double r117028 = z;
        double r117029 = 2.0;
        double r117030 = y;
        double r117031 = r117029 * r117030;
        double r117032 = r117028 + r117031;
        double r117033 = r117027 + r117032;
        return r117033;
}

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

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

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

Reproduce

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