Average Error: 13.4 → 0.2
Time: 12.4s
Precision: 64
\[w \cdot \left(\left(v - m\right) \cdot \left(v - m\right)\right)\]
\[\left(\left(v - m\right) \cdot w\right) \cdot \left(v - m\right)\]
w \cdot \left(\left(v - m\right) \cdot \left(v - m\right)\right)
\left(\left(v - m\right) \cdot w\right) \cdot \left(v - m\right)
double f(double w, double v, double m) {
        double r3485445 = w;
        double r3485446 = v;
        double r3485447 = m;
        double r3485448 = r3485446 - r3485447;
        double r3485449 = r3485448 * r3485448;
        double r3485450 = r3485445 * r3485449;
        return r3485450;
}

double f(double w, double v, double m) {
        double r3485451 = v;
        double r3485452 = m;
        double r3485453 = r3485451 - r3485452;
        double r3485454 = w;
        double r3485455 = r3485453 * r3485454;
        double r3485456 = r3485455 * r3485453;
        return r3485456;
}

Error

Bits error versus w

Bits error versus v

Bits error versus m

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 13.4

    \[w \cdot \left(\left(v - m\right) \cdot \left(v - m\right)\right)\]
  2. Using strategy rm
  3. Applied associate-*r*0.2

    \[\leadsto \color{blue}{\left(w \cdot \left(v - m\right)\right) \cdot \left(v - m\right)}\]
  4. Simplified0.2

    \[\leadsto \color{blue}{\left(\left(v - m\right) \cdot w\right)} \cdot \left(v - m\right)\]
  5. Final simplification0.2

    \[\leadsto \left(\left(v - m\right) \cdot w\right) \cdot \left(v - m\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (w v m)
  :name "w * ((v - m) * (v -m))"
  :precision binary64
  (* w (* (- v m) (- v m))))