Average Error: 0.0 → 0.0
Time: 15.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 r2196945 = x;
        double r2196946 = y;
        double r2196947 = r2196945 + r2196946;
        double r2196948 = z;
        double r2196949 = r2196947 * r2196948;
        return r2196949;
}

double f(double x, double y, double z) {
        double r2196950 = z;
        double r2196951 = y;
        double r2196952 = r2196950 * r2196951;
        double r2196953 = x;
        double r2196954 = r2196953 * r2196950;
        double r2196955 = r2196952 + r2196954;
        return r2196955;
}

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-sqrt32.0

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

    \[\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 2019173 
(FPCore (x y z)
  :name "Text.Parsec.Token:makeTokenParser from parsec-3.1.9, B"
  (* (+ x y) z))