Average Error: 0.1 → 0.1
Time: 13.7s
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 r370418 = x;
        double r370419 = y;
        double r370420 = r370418 * r370419;
        double r370421 = z;
        double r370422 = r370421 * r370421;
        double r370423 = r370420 + r370422;
        double r370424 = r370423 + r370422;
        double r370425 = r370424 + r370422;
        return r370425;
}

double f(double x, double y, double z) {
        double r370426 = 3.0;
        double r370427 = z;
        double r370428 = r370427 * r370427;
        double r370429 = r370426 * r370428;
        double r370430 = x;
        double r370431 = y;
        double r370432 = r370430 * r370431;
        double r370433 = r370429 + r370432;
        return r370433;
}

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 2019298 
(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)))