Average Error: 0.0 → 0.0
Time: 20.9s
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 r724943 = x;
        double r724944 = y;
        double r724945 = r724943 + r724944;
        double r724946 = z;
        double r724947 = r724945 * r724946;
        return r724947;
}

double f(double x, double y, double z) {
        double r724948 = z;
        double r724949 = y;
        double r724950 = r724948 * r724949;
        double r724951 = x;
        double r724952 = r724951 * r724948;
        double r724953 = r724950 + r724952;
        return r724953;
}

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.2

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

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