Average Error: 0.1 → 0.1
Time: 7.7s
Precision: 64
\[x - \left(y \cdot 4.0\right) \cdot z\]
\[\left(\left(4.0 \cdot y\right) \cdot z + x\right) \cdot \frac{x - \left(4.0 \cdot y\right) \cdot z}{\left(4.0 \cdot y\right) \cdot z + x}\]
x - \left(y \cdot 4.0\right) \cdot z
\left(\left(4.0 \cdot y\right) \cdot z + x\right) \cdot \frac{x - \left(4.0 \cdot y\right) \cdot z}{\left(4.0 \cdot y\right) \cdot z + x}
double f(double x, double y, double z) {
        double r4846321 = x;
        double r4846322 = y;
        double r4846323 = 4.0;
        double r4846324 = r4846322 * r4846323;
        double r4846325 = z;
        double r4846326 = r4846324 * r4846325;
        double r4846327 = r4846321 - r4846326;
        return r4846327;
}

double f(double x, double y, double z) {
        double r4846328 = 4.0;
        double r4846329 = y;
        double r4846330 = r4846328 * r4846329;
        double r4846331 = z;
        double r4846332 = r4846330 * r4846331;
        double r4846333 = x;
        double r4846334 = r4846332 + r4846333;
        double r4846335 = r4846333 - r4846332;
        double r4846336 = r4846335 / r4846334;
        double r4846337 = r4846334 * r4846336;
        return r4846337;
}

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

Derivation

  1. Initial program 0.1

    \[x - \left(y \cdot 4.0\right) \cdot z\]
  2. Using strategy rm
  3. Applied flip--27.7

    \[\leadsto \color{blue}{\frac{x \cdot x - \left(\left(y \cdot 4.0\right) \cdot z\right) \cdot \left(\left(y \cdot 4.0\right) \cdot z\right)}{x + \left(y \cdot 4.0\right) \cdot z}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity27.7

    \[\leadsto \frac{x \cdot x - \left(\left(y \cdot 4.0\right) \cdot z\right) \cdot \left(\left(y \cdot 4.0\right) \cdot z\right)}{\color{blue}{1 \cdot \left(x + \left(y \cdot 4.0\right) \cdot z\right)}}\]
  6. Applied difference-of-squares27.6

    \[\leadsto \frac{\color{blue}{\left(x + \left(y \cdot 4.0\right) \cdot z\right) \cdot \left(x - \left(y \cdot 4.0\right) \cdot z\right)}}{1 \cdot \left(x + \left(y \cdot 4.0\right) \cdot z\right)}\]
  7. Applied times-frac0.1

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

    \[\leadsto \color{blue}{\left(x + \left(y \cdot 4.0\right) \cdot z\right)} \cdot \frac{x - \left(y \cdot 4.0\right) \cdot z}{x + \left(y \cdot 4.0\right) \cdot z}\]
  9. Final simplification0.1

    \[\leadsto \left(\left(4.0 \cdot y\right) \cdot z + x\right) \cdot \frac{x - \left(4.0 \cdot y\right) \cdot z}{\left(4.0 \cdot y\right) \cdot z + x}\]

Reproduce

herbie shell --seed 2019156 
(FPCore (x y z)
  :name "Diagrams.Solve.Polynomial:quadForm from diagrams-solve-0.1, A"
  (- x (* (* y 4.0) z)))