Average Error: 59.3 → 33.9
Time: 31.9s
Precision: 64
\[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
\[0\]
\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)
0
double f(double c0, double w, double h, double D, double d, double M) {
        double r148076 = c0;
        double r148077 = 2.0;
        double r148078 = w;
        double r148079 = r148077 * r148078;
        double r148080 = r148076 / r148079;
        double r148081 = d;
        double r148082 = r148081 * r148081;
        double r148083 = r148076 * r148082;
        double r148084 = h;
        double r148085 = r148078 * r148084;
        double r148086 = D;
        double r148087 = r148086 * r148086;
        double r148088 = r148085 * r148087;
        double r148089 = r148083 / r148088;
        double r148090 = r148089 * r148089;
        double r148091 = M;
        double r148092 = r148091 * r148091;
        double r148093 = r148090 - r148092;
        double r148094 = sqrt(r148093);
        double r148095 = r148089 + r148094;
        double r148096 = r148080 * r148095;
        return r148096;
}

double f(double __attribute__((unused)) c0, double __attribute__((unused)) w, double __attribute__((unused)) h, double __attribute__((unused)) D, double __attribute__((unused)) d, double __attribute__((unused)) M) {
        double r148097 = 0.0;
        return r148097;
}

Error

Bits error versus c0

Bits error versus w

Bits error versus h

Bits error versus D

Bits error versus d

Bits error versus M

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 59.3

    \[\frac{c0}{2 \cdot w} \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + \sqrt{\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} \cdot \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M \cdot M}\right)\]
  2. Taylor expanded around inf 35.7

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{0}\]
  3. Using strategy rm
  4. Applied add-sqr-sqrt35.7

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\sqrt{0} \cdot \sqrt{0}\right)}\]
  5. Applied associate-*r*35.7

    \[\leadsto \color{blue}{\left(\frac{c0}{2 \cdot w} \cdot \sqrt{0}\right) \cdot \sqrt{0}}\]
  6. Simplified33.9

    \[\leadsto \color{blue}{0} \cdot \sqrt{0}\]
  7. Final simplification33.9

    \[\leadsto 0\]

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(FPCore (c0 w h D d M)
  :name "Henrywood and Agarwal, Equation (13)"
  :precision binary64
  (* (/ c0 (* 2 w)) (+ (/ (* c0 (* d d)) (* (* w h) (* D D))) (sqrt (- (* (/ (* c0 (* d d)) (* (* w h) (* D D))) (/ (* c0 (* d d)) (* (* w h) (* D D)))) (* M M))))))