Average Error: 0.1 → 0.1
Time: 34.8s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[z \cdot \left(z \cdot 3\right) + x \cdot y\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
z \cdot \left(z \cdot 3\right) + x \cdot y
double f(double x, double y, double z) {
        double r27793008 = x;
        double r27793009 = y;
        double r27793010 = r27793008 * r27793009;
        double r27793011 = z;
        double r27793012 = r27793011 * r27793011;
        double r27793013 = r27793010 + r27793012;
        double r27793014 = r27793013 + r27793012;
        double r27793015 = r27793014 + r27793012;
        return r27793015;
}

double f(double x, double y, double z) {
        double r27793016 = z;
        double r27793017 = 3.0;
        double r27793018 = r27793016 * r27793017;
        double r27793019 = r27793016 * r27793018;
        double r27793020 = x;
        double r27793021 = y;
        double r27793022 = r27793020 * r27793021;
        double r27793023 = r27793019 + r27793022;
        return r27793023;
}

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.0 \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}{\left(z \cdot z\right) \cdot 3 + x \cdot y}\]
  3. Using strategy rm
  4. Applied associate-*l*0.1

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

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

Reproduce

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