Average Error: 0.1 → 0.1
Time: 15.9s
Precision: 64
\[\left(x \cdot y + z\right) \cdot y + t\]
\[\left(\left(x \cdot y\right) \cdot y + z \cdot y\right) + t\]
\left(x \cdot y + z\right) \cdot y + t
\left(\left(x \cdot y\right) \cdot y + z \cdot y\right) + t
double f(double x, double y, double z, double t) {
        double r115311 = x;
        double r115312 = y;
        double r115313 = r115311 * r115312;
        double r115314 = z;
        double r115315 = r115313 + r115314;
        double r115316 = r115315 * r115312;
        double r115317 = t;
        double r115318 = r115316 + r115317;
        return r115318;
}

double f(double x, double y, double z, double t) {
        double r115319 = x;
        double r115320 = y;
        double r115321 = r115319 * r115320;
        double r115322 = r115321 * r115320;
        double r115323 = z;
        double r115324 = r115323 * r115320;
        double r115325 = r115322 + r115324;
        double r115326 = t;
        double r115327 = r115325 + r115326;
        return r115327;
}

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

    \[\leadsto \color{blue}{\left(x \cdot {y}^{2} + z \cdot y\right)} + t\]
  3. Using strategy rm
  4. Applied unpow24.1

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

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

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

Reproduce

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