Average Error: 0.1 → 0.1
Time: 11.4s
Precision: 64
\[\left(x \cdot y + z\right) \cdot y + t\]
\[y \cdot \left(z + x \cdot y\right) + t\]
\left(x \cdot y + z\right) \cdot y + t
y \cdot \left(z + x \cdot y\right) + t
double f(double x, double y, double z, double t) {
        double r133553 = x;
        double r133554 = y;
        double r133555 = r133553 * r133554;
        double r133556 = z;
        double r133557 = r133555 + r133556;
        double r133558 = r133557 * r133554;
        double r133559 = t;
        double r133560 = r133558 + r133559;
        return r133560;
}

double f(double x, double y, double z, double t) {
        double r133561 = y;
        double r133562 = z;
        double r133563 = x;
        double r133564 = r133563 * r133561;
        double r133565 = r133562 + r133564;
        double r133566 = r133561 * r133565;
        double r133567 = t;
        double r133568 = r133566 + r133567;
        return r133568;
}

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

    \[\left(x \cdot y + z\right) \cdot y + t\]
  2. Using strategy rm
  3. Applied flip-+18.3

    \[\leadsto \color{blue}{\frac{\left(x \cdot y\right) \cdot \left(x \cdot y\right) - z \cdot z}{x \cdot y - z}} \cdot y + t\]
  4. Using strategy rm
  5. Applied *-un-lft-identity18.3

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

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

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

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

Reproduce

herbie shell --seed 2019174 
(FPCore (x y z t)
  :name "Language.Haskell.HsColour.ColourHighlight:unbase from hscolour-1.23"
  (+ (* (+ (* x y) z) y) t))