Average Error: 0.0 → 0.0
Time: 12.5s
Precision: 64
\[\left(x + y\right) \cdot z\]
\[z \cdot y + x \cdot z\]
\left(x + y\right) \cdot z
z \cdot y + x \cdot z
double f(double x, double y, double z) {
        double r973520 = x;
        double r973521 = y;
        double r973522 = r973520 + r973521;
        double r973523 = z;
        double r973524 = r973522 * r973523;
        return r973524;
}

double f(double x, double y, double z) {
        double r973525 = z;
        double r973526 = y;
        double r973527 = r973525 * r973526;
        double r973528 = x;
        double r973529 = r973528 * r973525;
        double r973530 = r973527 + r973529;
        return r973530;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(x + y\right) \cdot z\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt31.5

    \[\leadsto \left(x + y\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)}\]
  4. Applied associate-*r*31.5

    \[\leadsto \color{blue}{\left(\left(x + y\right) \cdot \sqrt{z}\right) \cdot \sqrt{z}}\]
  5. Taylor expanded around inf 0.0

    \[\leadsto \color{blue}{z \cdot y + x \cdot z}\]
  6. Final simplification0.0

    \[\leadsto z \cdot y + x \cdot z\]

Reproduce

herbie shell --seed 2019158 
(FPCore (x y z)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, B"
  (* (+ x y) z))