Average Error: 59.6 → 27.2
Time: 19.0s
Precision: binary64
Cost: 1409
\[\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)\]
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 9.05100518124077 \cdot 10^{+73}:\\ \;\;\;\;0.25 \cdot \left(\frac{\left(\left(D \cdot D\right) \cdot h\right) \cdot M}{d} \cdot \frac{M}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot \left(D \cdot h\right)\right)\right)}{d \cdot d}\\ \end{array}\]
\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)
\begin{array}{l}
\mathbf{if}\;D \cdot D \leq 9.05100518124077 \cdot 10^{+73}:\\
\;\;\;\;0.25 \cdot \left(\frac{\left(\left(D \cdot D\right) \cdot h\right) \cdot M}{d} \cdot \frac{M}{d}\right)\\

\mathbf{else}:\\
\;\;\;\;0.25 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot \left(D \cdot h\right)\right)\right)}{d \cdot d}\\

\end{array}
(FPCore (c0 w h D d M)
 :precision binary64
 (*
  (/ 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))))))
(FPCore (c0 w h D d M)
 :precision binary64
 (if (<= (* D D) 9.05100518124077e+73)
   (* 0.25 (* (/ (* (* (* D D) h) M) d) (/ M d)))
   (* 0.25 (/ (* M (* M (* D (* D h)))) (* d d)))))
double code(double c0, double w, double h, double D, double d, double M) {
	return (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)));
}
double code(double c0, double w, double h, double D, double d, double M) {
	double tmp;
	if ((D * D) <= 9.05100518124077e+73) {
		tmp = 0.25 * (((((D * D) * h) * M) / d) * (M / d));
	} else {
		tmp = 0.25 * ((M * (M * (D * (D * h)))) / (d * d));
	}
	return tmp;
}

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

Alternatives

Alternative 1
Error62.9
Cost34688
\[\frac{c0}{2 \cdot w} \cdot \sqrt[3]{{\left(\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} + \sqrt{\frac{c0}{h \cdot w} \cdot \frac{c0 \cdot {d}^{4}}{\left(h \cdot w\right) \cdot {D}^{4}} - M \cdot M}\right)}^{3}}\]
Alternative 2
Error63.3
Cost34624
\[\frac{c0}{2 \cdot w} \cdot \log \left(e^{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} + \sqrt{\frac{c0}{h \cdot w} \cdot \frac{c0 \cdot {d}^{4}}{\left(h \cdot w\right) \cdot {D}^{4}} - M \cdot M}}\right)\]
Alternative 3
Error60.4
Cost30656
\[\frac{c0}{2 \cdot w} \cdot \left(\sqrt{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} - M \cdot M} + \sqrt[3]{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}} \cdot \left(\sqrt[3]{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}} \cdot \sqrt[3]{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}}\right)\right)\]
Alternative 4
Error56.8
Cost26304
\[e^{\log \left(h \cdot 0.25\right) + 2 \cdot \left(\log \left(D \cdot M\right) - \log d\right)}\]
Alternative 5
Error56.8
Cost26304
\[0.25 \cdot e^{2 \cdot \left(\log \left(D \cdot M\right) - \log d\right) + \log h}\]
Alternative 6
Error41.2
Cost23744
\[\sqrt[3]{\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0} \cdot \left(0.25 \cdot \frac{c0}{w}\right)} \cdot \left(\sqrt[3]{\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0} \cdot \left(0.25 \cdot \frac{c0}{w}\right)} \cdot \sqrt[3]{\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0} \cdot \left(0.25 \cdot \frac{c0}{w}\right)}\right)\]
Alternative 7
Error60.7
Cost22528
\[\frac{c0}{2 \cdot w} \cdot \left(\sqrt[3]{{\left(\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right)}^{3}} + \sqrt{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} - M \cdot M}\right)\]
Alternative 8
Error48.5
Cost22080
\[\frac{c0}{2 \cdot w} \cdot \frac{M \cdot M}{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} - \sqrt{\frac{c0}{h \cdot w} \cdot \frac{c0 \cdot {d}^{4}}{\left(h \cdot w\right) \cdot {D}^{4}} - M \cdot M}}\]
Alternative 9
Error35.4
Cost21952
\[0.25 \cdot \left(\sqrt[3]{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d}} \cdot \left(\sqrt[3]{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d}} \cdot \sqrt[3]{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d}}\right)\right)\]
Alternative 10
Error35.4
Cost21440
\[0.25 \cdot \frac{\sqrt[3]{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)} \cdot \left(\sqrt[3]{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)} \cdot \sqrt[3]{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}\right)}{d \cdot d}\]
Alternative 11
Error35.4
Cost20928
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot \left(\sqrt[3]{h \cdot \left(D \cdot D\right)} \cdot \left(\sqrt[3]{h \cdot \left(D \cdot D\right)} \cdot \sqrt[3]{h \cdot \left(D \cdot D\right)}\right)\right)}{d \cdot d}\]
Alternative 12
Error38.6
Cost20608
\[\log \left({\left(e^{\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}}\right)}^{\left(0.25 \cdot \frac{c0}{w}\right)}\right)\]
Alternative 13
Error35.4
Cost20416
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot \left(\left(\sqrt[3]{h} \cdot \sqrt[3]{h}\right) \cdot \left(\left(D \cdot D\right) \cdot \sqrt[3]{h}\right)\right)}{d \cdot d}\]
Alternative 14
Error35.6
Cost20096
\[\frac{\log \left({\left(e^{h \cdot \left(D \cdot D\right)}\right)}^{\left(M \cdot M\right)}\right)}{d \cdot d} \cdot 0.25\]
Alternative 15
Error52.6
Cost20032
\[0.25 \cdot \frac{e^{\log h + 2 \cdot \log \left(D \cdot M\right)}}{d \cdot d}\]
Alternative 16
Error61.9
Cost15616
\[\frac{c0}{2 \cdot w} \cdot \left(\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} + \sqrt{\frac{c0}{h \cdot w} \cdot \left(\frac{c0}{h \cdot w} \cdot \left(\frac{d}{D} \cdot {\left(\frac{d}{D}\right)}^{3}\right)\right) - M \cdot M}\right)\]
Alternative 17
Error52.1
Cost14528
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{\left(\left(M \cdot M\right) \cdot \left(\left(D \cdot \sqrt{h}\right) \cdot \left(D \cdot \sqrt{h}\right)\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 18
Error43.5
Cost14464
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{w \cdot \left(\left(M \cdot M\right) \cdot \sqrt[3]{{\left(h \cdot \left(D \cdot D\right)\right)}^{3}}\right)}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 19
Error46.5
Cost14400
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{\left(\left(M \cdot M\right) \cdot e^{\log \left(h \cdot \left(D \cdot D\right)\right)}\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 20
Error42.7
Cost14400
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot e^{\log \left(\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)}\right)\]
Alternative 21
Error48.9
Cost13888
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot \left(\left(D \cdot \sqrt{h}\right) \cdot \left(D \cdot \sqrt{h}\right)\right)}{d \cdot d}\]
Alternative 22
Error47.3
Cost13888
\[0.25 \cdot \frac{M \cdot \left(M \cdot \left(\left(D \cdot \sqrt{h}\right) \cdot \left(D \cdot \sqrt{h}\right)\right)\right)}{d \cdot d}\]
Alternative 23
Error42.5
Cost13760
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot e^{\log \left(h \cdot \left(D \cdot D\right)\right)}}{d \cdot d}\]
Alternative 24
Error38.5
Cost13760
\[0.25 \cdot \frac{M \cdot e^{\log \left(\left(h \cdot \left(D \cdot D\right)\right) \cdot M\right)}}{d \cdot d}\]
Alternative 25
Error60.8
Cost9664
\[\frac{c0}{2 \cdot w} \cdot \left(\sqrt{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} - M \cdot M} + \frac{c0}{h \cdot w} \cdot \frac{d \cdot d}{D \cdot D}\right)\]
Alternative 26
Error59.6
Cost9664
\[\frac{c0}{2 \cdot w} \cdot \left(\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} + \sqrt{\frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)} - M \cdot M}\right)\]
Alternative 27
Error62.5
Cost7936
\[\frac{c0}{2 \cdot w} \cdot \left(\sqrt{-M \cdot M} + \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right)\]
Alternative 28
Error51.4
Cost7040
\[\frac{c0}{2 \cdot w} \cdot \sqrt{-M \cdot M}\]
Alternative 29
Error41.3
Cost1728
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \left(\left(\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w\right) \cdot \frac{1}{\left(d \cdot d\right) \cdot c0}\right)\right)\]
Alternative 30
Error38.0
Cost1600
\[\frac{c0 \cdot \left(0.5 \cdot \frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)}{2 \cdot w}\]
Alternative 31
Error41.2
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 32
Error39.9
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{\left(\left(M \cdot M\right) \cdot \left(D \cdot \left(h \cdot D\right)\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 33
Error39.3
Cost1600
\[\frac{c0 \cdot \left(0.5 \cdot \left(\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w\right)\right)}{\left(2 \cdot w\right) \cdot \left(\left(d \cdot d\right) \cdot c0\right)}\]
Alternative 34
Error41.2
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{w \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 35
Error39.0
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{\left(M \cdot \left(\left(h \cdot \left(D \cdot D\right)\right) \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0}\right)\]
Alternative 36
Error39.8
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{w}{\frac{c0}{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d}}}\right)\]
Alternative 37
Error42.7
Cost1600
\[\frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \left(\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d} \cdot \frac{w}{c0}\right)\right)\]
Alternative 38
Error41.2
Cost1472
\[\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0} \cdot \left(0.25 \cdot \frac{c0}{w}\right)\]
Alternative 39
Error38.0
Cost1472
\[c0 \cdot \left(\frac{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w}{\left(d \cdot d\right) \cdot c0} \cdot \frac{0.25}{w}\right)\]
Alternative 40
Error41.1
Cost1472
\[\frac{\left(\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)\right) \cdot w\right) \cdot \left(0.25 \cdot \frac{c0}{w}\right)}{\left(d \cdot d\right) \cdot c0}\]
Alternative 41
Error59.5
Cost1344
\[\frac{c0}{2 \cdot w} \cdot \left(2 \cdot \frac{\left(d \cdot d\right) \cdot c0}{\left(D \cdot D\right) \cdot \left(h \cdot w\right)}\right)\]
Alternative 42
Error30.2
Cost960
\[0.25 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}{d \cdot d}\]
Alternative 43
Error33.5
Cost960
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot \left(D \cdot \left(h \cdot D\right)\right)}{d \cdot d}\]
Alternative 44
Error32.5
Cost960
\[0.25 \cdot \frac{M \cdot \left(\left(h \cdot \left(D \cdot D\right)\right) \cdot M\right)}{d \cdot d}\]
Alternative 45
Error35.1
Cost960
\[0.25 \cdot \frac{h \cdot \left(\left(D \cdot D\right) \cdot \left(M \cdot M\right)\right)}{d \cdot d}\]
Alternative 46
Error32.4
Cost960
\[0.25 \cdot \frac{\left(M \cdot M\right) \cdot \frac{h \cdot \left(D \cdot D\right)}{d}}{d}\]
Alternative 47
Error33.1
Cost960
\[0.25 \cdot \frac{h \cdot \left(D \cdot D\right)}{\frac{d}{\frac{M \cdot M}{d}}}\]
Alternative 48
Error32.5
Cost960
\[0.25 \cdot \left(\frac{h \cdot \left(D \cdot D\right)}{d} \cdot \frac{M \cdot M}{d}\right)\]
Alternative 49
Error32.0
Cost960
\[0.25 \cdot \frac{M \cdot \left(\left(D \cdot D\right) \cdot \left(h \cdot M\right)\right)}{d \cdot d}\]
Alternative 50
Error28.2
Cost960
\[0.25 \cdot \frac{M \cdot \frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot M}{d}}{d}\]
Alternative 51
Error29.0
Cost960
\[0.25 \cdot \frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot M}{\frac{d}{\frac{M}{d}}}\]
Alternative 52
Error27.6
Cost960
\[0.25 \cdot \left(\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot M}{d} \cdot \frac{M}{d}\right)\]
Alternative 53
Error35.4
Cost960
\[0.25 \cdot \frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d}\]
Alternative 54
Error61.9
Cost64
\[1\]
Alternative 55
Error31.4
Cost64
\[0\]
Alternative 56
Error61.9
Cost64
\[-1\]

Error

Derivation

  1. Split input into 2 regimes
  2. if (*.f64 D D) < 9.05100518124077008e73

    1. Initial program 59.9

      \[\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 37.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{w \cdot \left({M}^{2} \cdot \left({D}^{2} \cdot h\right)\right)}{c0 \cdot {d}^{2}}\right)}\]
    3. Simplified37.6

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{w \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \left(D \cdot D\right)\right)\right)}{c0 \cdot \left(d \cdot d\right)}\right)}\]
    4. Taylor expanded around 0 31.0

      \[\leadsto \color{blue}{0.25 \cdot \frac{{M}^{2} \cdot \left({D}^{2} \cdot h\right)}{{d}^{2}}}\]
    5. Simplified31.0

      \[\leadsto \color{blue}{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d} \cdot 0.25}\]
    6. Using strategy rm
    7. Applied associate-*r*_binary64_101027.4

      \[\leadsto \frac{\color{blue}{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot M\right) \cdot M}}{d \cdot d} \cdot 0.25\]
    8. Simplified27.4

      \[\leadsto \frac{\color{blue}{\left(M \cdot \left(h \cdot \left(D \cdot D\right)\right)\right)} \cdot M}{d \cdot d} \cdot 0.25\]
    9. Using strategy rm
    10. Applied times-frac_binary64_107622.4

      \[\leadsto \color{blue}{\left(\frac{M \cdot \left(h \cdot \left(D \cdot D\right)\right)}{d} \cdot \frac{M}{d}\right)} \cdot 0.25\]
    11. Simplified22.4

      \[\leadsto \color{blue}{0.25 \cdot \left(\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot M}{d} \cdot \frac{M}{d}\right)}\]

    if 9.05100518124077008e73 < (*.f64 D D)

    1. Initial program 58.6

      \[\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 52.0

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{w \cdot \left({M}^{2} \cdot \left({D}^{2} \cdot h\right)\right)}{c0 \cdot {d}^{2}}\right)}\]
    3. Simplified52.0

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{w \cdot \left(\left(M \cdot M\right) \cdot \left(h \cdot \left(D \cdot D\right)\right)\right)}{c0 \cdot \left(d \cdot d\right)}\right)}\]
    4. Taylor expanded around 0 48.4

      \[\leadsto \color{blue}{0.25 \cdot \frac{{M}^{2} \cdot \left({D}^{2} \cdot h\right)}{{d}^{2}}}\]
    5. Simplified48.4

      \[\leadsto \color{blue}{\frac{\left(h \cdot \left(D \cdot D\right)\right) \cdot \left(M \cdot M\right)}{d \cdot d} \cdot 0.25}\]
    6. Using strategy rm
    7. Applied associate-*r*_binary64_101047.6

      \[\leadsto \frac{\color{blue}{\left(\left(h \cdot \left(D \cdot D\right)\right) \cdot M\right) \cdot M}}{d \cdot d} \cdot 0.25\]
    8. Simplified47.6

      \[\leadsto \frac{\color{blue}{\left(M \cdot \left(h \cdot \left(D \cdot D\right)\right)\right)} \cdot M}{d \cdot d} \cdot 0.25\]
    9. Using strategy rm
    10. Applied associate-*r*_binary64_101041.5

      \[\leadsto \frac{\left(M \cdot \color{blue}{\left(\left(h \cdot D\right) \cdot D\right)}\right) \cdot M}{d \cdot d} \cdot 0.25\]
    11. Simplified41.5

      \[\leadsto \color{blue}{0.25 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}{d \cdot d}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification27.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;D \cdot D \leq 9.05100518124077 \cdot 10^{+73}:\\ \;\;\;\;0.25 \cdot \left(\frac{\left(\left(D \cdot D\right) \cdot h\right) \cdot M}{d} \cdot \frac{M}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \frac{M \cdot \left(M \cdot \left(D \cdot \left(D \cdot h\right)\right)\right)}{d \cdot d}\\ \end{array}\]

Reproduce

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