Average Error: 0.1 → 0.1
Time: 7.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 + \left(2 \cdot x\right) \cdot \left(y + z\right)\right) + x \cdot t\]
x \cdot \left(\left(\left(\left(y + z\right) + z\right) + y\right) + t\right) + y \cdot 5
\left(y \cdot 5 + \left(2 \cdot x\right) \cdot \left(y + z\right)\right) + x \cdot t
double f(double x, double y, double z, double t) {
        double r118579 = x;
        double r118580 = y;
        double r118581 = z;
        double r118582 = r118580 + r118581;
        double r118583 = r118582 + r118581;
        double r118584 = r118583 + r118580;
        double r118585 = t;
        double r118586 = r118584 + r118585;
        double r118587 = r118579 * r118586;
        double r118588 = 5.0;
        double r118589 = r118580 * r118588;
        double r118590 = r118587 + r118589;
        return r118590;
}

double f(double x, double y, double z, double t) {
        double r118591 = y;
        double r118592 = 5.0;
        double r118593 = r118591 * r118592;
        double r118594 = 2.0;
        double r118595 = x;
        double r118596 = r118594 * r118595;
        double r118597 = z;
        double r118598 = r118591 + r118597;
        double r118599 = r118596 * r118598;
        double r118600 = r118593 + r118599;
        double r118601 = t;
        double r118602 = r118595 * r118601;
        double r118603 = r118600 + r118602;
        return r118603;
}

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 distribute-lft-in0.1

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

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

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

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

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

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

Reproduce

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