Average Error: 0.0 → 0.0
Time: 770.0ms
Precision: 64
\[x - \left(y \cdot 4\right) \cdot z\]
\[x - y \cdot \left(4 \cdot z\right)\]
x - \left(y \cdot 4\right) \cdot z
x - y \cdot \left(4 \cdot z\right)
double f(double x, double y, double z) {
        double r235409 = x;
        double r235410 = y;
        double r235411 = 4.0;
        double r235412 = r235410 * r235411;
        double r235413 = z;
        double r235414 = r235412 * r235413;
        double r235415 = r235409 - r235414;
        return r235415;
}

double f(double x, double y, double z) {
        double r235416 = x;
        double r235417 = y;
        double r235418 = 4.0;
        double r235419 = z;
        double r235420 = r235418 * r235419;
        double r235421 = r235417 * r235420;
        double r235422 = r235416 - r235421;
        return r235422;
}

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.0

    \[x - \left(y \cdot 4\right) \cdot z\]
  2. Using strategy rm
  3. Applied associate-*l*0.0

    \[\leadsto x - \color{blue}{y \cdot \left(4 \cdot z\right)}\]
  4. Final simplification0.0

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

Reproduce

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