Average Error: 59.0 → 33.8
Time: 29.0s
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)\]
\[c0 \cdot 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)
c0 \cdot 0
double f(double c0, double w, double h, double D, double d, double M) {
        double r114142 = c0;
        double r114143 = 2.0;
        double r114144 = w;
        double r114145 = r114143 * r114144;
        double r114146 = r114142 / r114145;
        double r114147 = d;
        double r114148 = r114147 * r114147;
        double r114149 = r114142 * r114148;
        double r114150 = h;
        double r114151 = r114144 * r114150;
        double r114152 = D;
        double r114153 = r114152 * r114152;
        double r114154 = r114151 * r114153;
        double r114155 = r114149 / r114154;
        double r114156 = r114155 * r114155;
        double r114157 = M;
        double r114158 = r114157 * r114157;
        double r114159 = r114156 - r114158;
        double r114160 = sqrt(r114159);
        double r114161 = r114155 + r114160;
        double r114162 = r114146 * r114161;
        return r114162;
}

double f(double c0, double __attribute__((unused)) w, double __attribute__((unused)) h, double __attribute__((unused)) D, double __attribute__((unused)) d, double __attribute__((unused)) M) {
        double r114163 = c0;
        double r114164 = 0.0;
        double r114165 = r114163 * r114164;
        return r114165;
}

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.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)\]
  2. Taylor expanded around inf 35.8

    \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{0}\]
  3. Using strategy rm
  4. Applied div-inv35.8

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

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

    \[\leadsto c0 \cdot \color{blue}{0}\]
  7. Final simplification33.8

    \[\leadsto c0 \cdot 0\]

Reproduce

herbie shell --seed 2019196 
(FPCore (c0 w h D d M)
  :name "Henrywood and Agarwal, Equation (13)"
  (* (/ c0 (* 2.0 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))))))