Average Error: 0.1 → 0.1
Time: 2.4s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[3 \cdot {z}^{2} + x \cdot y\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
3 \cdot {z}^{2} + x \cdot y
double f(double x, double y, double z) {
        double r543553 = x;
        double r543554 = y;
        double r543555 = r543553 * r543554;
        double r543556 = z;
        double r543557 = r543556 * r543556;
        double r543558 = r543555 + r543557;
        double r543559 = r543558 + r543557;
        double r543560 = r543559 + r543557;
        return r543560;
}

double f(double x, double y, double z) {
        double r543561 = 3.0;
        double r543562 = z;
        double r543563 = 2.0;
        double r543564 = pow(r543562, r543563);
        double r543565 = r543561 * r543564;
        double r543566 = x;
        double r543567 = y;
        double r543568 = r543566 * r543567;
        double r543569 = r543565 + r543568;
        return r543569;
}

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. Taylor expanded around 0 0.1

    \[\leadsto \color{blue}{3 \cdot {z}^{2} + x \cdot y}\]
  4. Final simplification0.1

    \[\leadsto 3 \cdot {z}^{2} + x \cdot y\]

Reproduce

herbie shell --seed 2020025 
(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)))