Average Error: 0.1 → 0.1
Time: 3.9s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[3 \cdot \left(z \cdot z\right) + x \cdot y\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
3 \cdot \left(z \cdot z\right) + x \cdot y
double f(double x, double y, double z) {
        double r607506 = x;
        double r607507 = y;
        double r607508 = r607506 * r607507;
        double r607509 = z;
        double r607510 = r607509 * r607509;
        double r607511 = r607508 + r607510;
        double r607512 = r607511 + r607510;
        double r607513 = r607512 + r607510;
        return r607513;
}

double f(double x, double y, double z) {
        double r607514 = 3.0;
        double r607515 = z;
        double r607516 = r607515 * r607515;
        double r607517 = r607514 * r607516;
        double r607518 = x;
        double r607519 = y;
        double r607520 = r607518 * r607519;
        double r607521 = r607517 + r607520;
        return r607521;
}

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

Target

Original0.1
Target0.1
Herbie0.1
\[\left(3 \cdot z\right) \cdot z + y \cdot x\]

Derivation

  1. Initial program 0.1

    \[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
  2. Simplified0.1

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

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

Reproduce

herbie shell --seed 2020020 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, A"
  :precision binary64

  :herbie-target
  (+ (* (* 3 z) z) (* y x))

  (+ (+ (+ (* x y) (* z z)) (* z z)) (* z z)))