Average Error: 0.1 → 0.1
Time: 17.1s
Precision: 64
\[\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z\]
\[\left(x \cdot y + z \cdot z\right) + 2 \cdot {z}^{2}\]
\left(\left(x \cdot y + z \cdot z\right) + z \cdot z\right) + z \cdot z
\left(x \cdot y + z \cdot z\right) + 2 \cdot {z}^{2}
double f(double x, double y, double z) {
        double r338190 = x;
        double r338191 = y;
        double r338192 = r338190 * r338191;
        double r338193 = z;
        double r338194 = r338193 * r338193;
        double r338195 = r338192 + r338194;
        double r338196 = r338195 + r338194;
        double r338197 = r338196 + r338194;
        return r338197;
}

double f(double x, double y, double z) {
        double r338198 = x;
        double r338199 = y;
        double r338200 = r338198 * r338199;
        double r338201 = z;
        double r338202 = r338201 * r338201;
        double r338203 = r338200 + r338202;
        double r338204 = 2.0;
        double r338205 = pow(r338201, r338204);
        double r338206 = r338204 * r338205;
        double r338207 = r338203 + r338206;
        return r338207;
}

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. Using strategy rm
  3. Applied associate-+l+0.1

    \[\leadsto \color{blue}{\left(x \cdot y + z \cdot z\right) + \left(z \cdot z + z \cdot z\right)}\]
  4. Simplified0.1

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

    \[\leadsto \left(x \cdot y + z \cdot z\right) + 2 \cdot {z}^{2}\]

Reproduce

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