Average Error: 0.1 → 0.1
Time: 6.2s
Precision: 64
\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5\]
\[y \cdot 5 + \left(2 \cdot \left(z + y\right) + t\right) \cdot x\]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
y \cdot 5 + \left(2 \cdot \left(z + y\right) + t\right) \cdot x
double f(double x, double y, double z, double t) {
        double r154907 = x;
        double r154908 = y;
        double r154909 = z;
        double r154910 = r154908 + r154909;
        double r154911 = r154910 + r154909;
        double r154912 = r154911 + r154908;
        double r154913 = t;
        double r154914 = r154912 + r154913;
        double r154915 = r154907 * r154914;
        double r154916 = 5.0;
        double r154917 = r154908 * r154916;
        double r154918 = r154915 + r154917;
        return r154918;
}

double f(double x, double y, double z, double t) {
        double r154919 = y;
        double r154920 = 5.0;
        double r154921 = r154919 * r154920;
        double r154922 = 2.0;
        double r154923 = z;
        double r154924 = r154923 + r154919;
        double r154925 = r154922 * r154924;
        double r154926 = t;
        double r154927 = r154925 + r154926;
        double r154928 = x;
        double r154929 = r154927 * r154928;
        double r154930 = r154921 + r154929;
        return r154930;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.1

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5\]
  4. Applied associate-*l*0.1

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

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

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

Reproduce

herbie shell --seed 2019362 
(FPCore (x y z t)
  :name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendOutside from plot-0.2.3.4, B"
  :precision binary64
  (+ (* x (+ (+ (+ (+ y z) z) y) t)) (* y 5)))