Average Error: 0.1 → 0.1
Time: 10.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[x \cdot y + 3 \cdot \left(z \cdot z\right)\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
x \cdot y + 3 \cdot \left(z \cdot z\right)
double f(double x, double y, double z) {
        double r32626727 = x;
        double r32626728 = y;
        double r32626729 = r32626727 * r32626728;
        double r32626730 = z;
        double r32626731 = r32626730 * r32626730;
        double r32626732 = r32626729 + r32626731;
        double r32626733 = r32626732 + r32626731;
        double r32626734 = r32626733 + r32626731;
        return r32626734;
}

double f(double x, double y, double z) {
        double r32626735 = x;
        double r32626736 = y;
        double r32626737 = r32626735 * r32626736;
        double r32626738 = 3.0;
        double r32626739 = z;
        double r32626740 = r32626739 * r32626739;
        double r32626741 = r32626738 * r32626740;
        double r32626742 = r32626737 + r32626741;
        return r32626742;
}

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}{x \cdot y + 3 \cdot \left(z \cdot z\right)}\]
  3. Final simplification0.1

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

Reproduce

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

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

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