Average Error: 0.1 → 0.1
Time: 18.9s
Precision: 64
\[x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5\]
\[\left(y \cdot 5 + t \cdot x\right) + \left(x + x\right) \cdot \left(z + y\right)\]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\left(y \cdot 5 + t \cdot x\right) + \left(x + x\right) \cdot \left(z + y\right)
double f(double x, double y, double z, double t) {
        double r141977 = x;
        double r141978 = y;
        double r141979 = z;
        double r141980 = r141978 + r141979;
        double r141981 = r141980 + r141979;
        double r141982 = r141981 + r141978;
        double r141983 = t;
        double r141984 = r141982 + r141983;
        double r141985 = r141977 * r141984;
        double r141986 = 5.0;
        double r141987 = r141978 * r141986;
        double r141988 = r141985 + r141987;
        return r141988;
}

double f(double x, double y, double z, double t) {
        double r141989 = y;
        double r141990 = 5.0;
        double r141991 = r141989 * r141990;
        double r141992 = t;
        double r141993 = x;
        double r141994 = r141992 * r141993;
        double r141995 = r141991 + r141994;
        double r141996 = r141993 + r141993;
        double r141997 = z;
        double r141998 = r141997 + r141989;
        double r141999 = r141996 * r141998;
        double r142000 = r141995 + r141999;
        return r142000;
}

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

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

    \[\leadsto \color{blue}{\left(t \cdot x + \left(x + x\right) \cdot \left(z + y\right)\right)} + y \cdot 5\]
  4. Using strategy rm
  5. Applied distribute-rgt-in0.1

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

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

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

Reproduce

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