Average Error: 0.1 → 0.1
Time: 20.4s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
double f(double x, double y, double z) {
        double r350042 = x;
        double r350043 = y;
        double r350044 = r350042 * r350043;
        double r350045 = z;
        double r350046 = r350045 * r350045;
        double r350047 = r350044 + r350046;
        double r350048 = r350047 + r350046;
        double r350049 = r350048 + r350046;
        return r350049;
}

double f(double x, double y, double z) {
        double r350050 = x;
        double r350051 = y;
        double r350052 = r350050 * r350051;
        double r350053 = z;
        double r350054 = r350053 * r350053;
        double r350055 = r350052 + r350054;
        double r350056 = r350055 + r350054;
        double r350057 = r350056 + r350054;
        return r350057;
}

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. Final simplification0.1

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

Reproduce

herbie shell --seed 2019303 +o rules:numerics
(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)))