Average Error: 3.8 → 3.8
Time: 20.9s
Precision: 64
\[q + d \cdot \left(g - r \cdot s\right)\]
\[q + d \cdot \left(g - r \cdot s\right)\]
q + d \cdot \left(g - r \cdot s\right)
q + d \cdot \left(g - r \cdot s\right)
double f(double q, double d, double g, double r, double s) {
        double r3569457 = q;
        double r3569458 = d;
        double r3569459 = g;
        double r3569460 = r;
        double r3569461 = s;
        double r3569462 = r3569460 * r3569461;
        double r3569463 = r3569459 - r3569462;
        double r3569464 = r3569458 * r3569463;
        double r3569465 = r3569457 + r3569464;
        return r3569465;
}

double f(double q, double d, double g, double r, double s) {
        double r3569466 = q;
        double r3569467 = d;
        double r3569468 = g;
        double r3569469 = r;
        double r3569470 = s;
        double r3569471 = r3569469 * r3569470;
        double r3569472 = r3569468 - r3569471;
        double r3569473 = r3569467 * r3569472;
        double r3569474 = r3569466 + r3569473;
        return r3569474;
}

Error

Bits error versus q

Bits error versus d

Bits error versus g

Bits error versus r

Bits error versus s

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.8

    \[q + d \cdot \left(g - r \cdot s\right)\]
  2. Final simplification3.8

    \[\leadsto q + d \cdot \left(g - r \cdot s\right)\]

Reproduce

herbie shell --seed 1 
(FPCore (q d g r s)
  :name "q+d*(g-r*s)"
  :precision binary64
  (+ q (* d (- g (* r s)))))