?

Average Error: 6.3% → 69.2%
Time: 57.3s
Precision: binary64
Cost: 16772.00

?

\[\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} t_0 := \frac{c0}{2 \cdot w}\\ t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ \mathbf{if}\;t_0 \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right) \leq 5 \cdot 10^{+172}:\\ \;\;\;\;t_0 \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{D \cdot \frac{D}{d}} - M\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot {\left(\frac{D}{\frac{d}{M}}\right)}^{2}\right)\\ \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
 (let* ((t_0 (/ c0 (* 2.0 w))) (t_1 (/ (* c0 (* d d)) (* (* w h) (* D D)))))
   (if (<= (* t_0 (+ t_1 (sqrt (- (* t_1 t_1) (* M M))))) 5e+172)
     (* t_0 (- (/ (* (/ d (/ w c0)) (/ 2.0 h)) (* D (/ D d))) M))
     (* 0.25 (* h (pow (/ D (/ d M)) 2.0))))))
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 t_0 = c0 / (2.0 * w);
	double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	double tmp;
	if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= 5e+172) {
		tmp = t_0 * ((((d / (w / c0)) * (2.0 / h)) / (D * (D / d))) - M);
	} else {
		tmp = 0.25 * (h * pow((D / (d / M)), 2.0));
	}
	return tmp;
}
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    code = (c0 / (2.0d0 * w)) * (((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) + sqrt(((((c0 * (d_1 * d_1)) / ((w * h) * (d * d))) * ((c0 * (d_1 * d_1)) / ((w * h) * (d * d)))) - (m * m))))
end function
real(8) function code(c0, w, h, d, d_1, m)
    real(8), intent (in) :: c0
    real(8), intent (in) :: w
    real(8), intent (in) :: h
    real(8), intent (in) :: d
    real(8), intent (in) :: d_1
    real(8), intent (in) :: m
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = c0 / (2.0d0 * w)
    t_1 = (c0 * (d_1 * d_1)) / ((w * h) * (d * d))
    if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (m * m))))) <= 5d+172) then
        tmp = t_0 * ((((d_1 / (w / c0)) * (2.0d0 / h)) / (d * (d / d_1))) - m)
    else
        tmp = 0.25d0 * (h * ((d / (d_1 / m)) ** 2.0d0))
    end if
    code = tmp
end function
public static 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))) + Math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))));
}
public static double code(double c0, double w, double h, double D, double d, double M) {
	double t_0 = c0 / (2.0 * w);
	double t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	double tmp;
	if ((t_0 * (t_1 + Math.sqrt(((t_1 * t_1) - (M * M))))) <= 5e+172) {
		tmp = t_0 * ((((d / (w / c0)) * (2.0 / h)) / (D * (D / d))) - M);
	} else {
		tmp = 0.25 * (h * Math.pow((D / (d / M)), 2.0));
	}
	return tmp;
}
def code(c0, w, h, D, d, M):
	return (c0 / (2.0 * w)) * (((c0 * (d * d)) / ((w * h) * (D * D))) + math.sqrt(((((c0 * (d * d)) / ((w * h) * (D * D))) * ((c0 * (d * d)) / ((w * h) * (D * D)))) - (M * M))))
def code(c0, w, h, D, d, M):
	t_0 = c0 / (2.0 * w)
	t_1 = (c0 * (d * d)) / ((w * h) * (D * D))
	tmp = 0
	if (t_0 * (t_1 + math.sqrt(((t_1 * t_1) - (M * M))))) <= 5e+172:
		tmp = t_0 * ((((d / (w / c0)) * (2.0 / h)) / (D * (D / d))) - M)
	else:
		tmp = 0.25 * (h * math.pow((D / (d / M)), 2.0))
	return tmp
function code(c0, w, h, D, d, M)
	return Float64(Float64(c0 / Float64(2.0 * w)) * Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) + sqrt(Float64(Float64(Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D))) * Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))) - Float64(M * M)))))
end
function code(c0, w, h, D, d, M)
	t_0 = Float64(c0 / Float64(2.0 * w))
	t_1 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	tmp = 0.0
	if (Float64(t_0 * Float64(t_1 + sqrt(Float64(Float64(t_1 * t_1) - Float64(M * M))))) <= 5e+172)
		tmp = Float64(t_0 * Float64(Float64(Float64(Float64(d / Float64(w / c0)) * Float64(2.0 / h)) / Float64(D * Float64(D / d))) - M));
	else
		tmp = Float64(0.25 * Float64(h * (Float64(D / Float64(d / M)) ^ 2.0)));
	end
	return tmp
end
function tmp = code(c0, w, h, D, d, M)
	tmp = (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))));
end
function tmp_2 = code(c0, w, h, D, d, M)
	t_0 = c0 / (2.0 * w);
	t_1 = (c0 * (d * d)) / ((w * h) * (D * D));
	tmp = 0.0;
	if ((t_0 * (t_1 + sqrt(((t_1 * t_1) - (M * M))))) <= 5e+172)
		tmp = t_0 * ((((d / (w / c0)) * (2.0 / h)) / (D * (D / d))) - M);
	else
		tmp = 0.25 * (h * ((D / (d / M)) ^ 2.0));
	end
	tmp_2 = tmp;
end
code[c0_, w_, h_, D_, d_, M_] := N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[Sqrt[N[(N[(N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[c0_, w_, h_, D_, d_, M_] := Block[{t$95$0 = N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(t$95$0 * N[(t$95$1 + N[Sqrt[N[(N[(t$95$1 * t$95$1), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e+172], N[(t$95$0 * N[(N[(N[(N[(d / N[(w / c0), $MachinePrecision]), $MachinePrecision] * N[(2.0 / h), $MachinePrecision]), $MachinePrecision] / N[(D * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - M), $MachinePrecision]), $MachinePrecision], N[(0.25 * N[(h * N[Power[N[(D / N[(d / M), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\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}
t_0 := \frac{c0}{2 \cdot w}\\
t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
\mathbf{if}\;t_0 \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right) \leq 5 \cdot 10^{+172}:\\
\;\;\;\;t_0 \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{D \cdot \frac{D}{d}} - M\right)\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 2 regimes
  2. if (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M))))) < 5.0000000000000001e172

    1. Initial program 44.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. Simplified32.5

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, M\right) \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, -M\right)}\right)} \]
      Proof

      [Start]44.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) \]

      times-frac [=>]32.7

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{w \cdot h} \cdot \frac{d \cdot d}{D \cdot D}} + \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) \]

      fma-def [=>]28.7

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d \cdot d}{D \cdot D}, \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)} \]

      times-frac [=>]27.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \color{blue}{\frac{d}{D} \cdot \frac{d}{D}}, \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) \]

      difference-of-squares [=>]27.4

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{d}{D} \cdot \frac{d}{D}, \sqrt{\color{blue}{\left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} + M\right) \cdot \left(\frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)} - M\right)}}\right) \]
    3. Applied egg-rr39.1

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

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left({\left(\frac{d}{D}\right)}^{2} \cdot \left(\frac{c0}{w \cdot h} \cdot 2\right) - M\right)} \]
      Proof

      [Start]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - \left(M - \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)\right) \]

      associate--r- [=>]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - M\right) + \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right)} \]

      +-commutative [<=]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} + \left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - M\right)\right)} \]

      *-rgt-identity [<=]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot 1} + \left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2} - M\right)\right) \]

      associate--l+ [<=]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(\left(\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot 1 + \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) - M\right)} \]

      *-rgt-identity [<=]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left(\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot 1 + \color{blue}{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot 1}\right) - M\right) \]

      distribute-lft-out [=>]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}\right) \cdot \left(1 + 1\right)} - M\right) \]

      *-commutative [=>]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left({\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{w \cdot h}\right)} \cdot \left(1 + 1\right) - M\right) \]

      metadata-eval [=>]39.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\left({\left(\frac{d}{D}\right)}^{2} \cdot \frac{c0}{w \cdot h}\right) \cdot \color{blue}{2} - M\right) \]

      associate-*l* [=>]39.0

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{{\left(\frac{d}{D}\right)}^{2} \cdot \left(\frac{c0}{w \cdot h} \cdot 2\right)} - M\right) \]
    5. Applied egg-rr37.5

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(\frac{\frac{d}{D}}{D} \cdot d\right)} \cdot \left(\frac{c0}{w \cdot h} \cdot 2\right) - M\right) \]
    6. Applied egg-rr47.0

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{\frac{-d}{D} \cdot \left(d \cdot \frac{2}{\frac{w}{c0} \cdot h}\right)}{-D}} - M\right) \]
    7. Simplified44.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\left(1 \cdot \frac{D}{d}\right) \cdot D}} - M\right) \]
      Proof

      [Start]47.0

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{-d}{D} \cdot \left(d \cdot \frac{2}{\frac{w}{c0} \cdot h}\right)}{-D} - M\right) \]

      *-commutative [=>]47.0

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\color{blue}{\left(d \cdot \frac{2}{\frac{w}{c0} \cdot h}\right) \cdot \frac{-d}{D}}}{-D} - M\right) \]

      associate-/l* [=>]42.8

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{d \cdot \frac{2}{\frac{w}{c0} \cdot h}}{\frac{-D}{\frac{-d}{D}}}} - M\right) \]

      associate-*r/ [=>]43.0

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\color{blue}{\frac{d \cdot 2}{\frac{w}{c0} \cdot h}}}{\frac{-D}{\frac{-d}{D}}} - M\right) \]

      times-frac [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\color{blue}{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}}{\frac{-D}{\frac{-d}{D}}} - M\right) \]

      associate-/r/ [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\color{blue}{\frac{-D}{-d} \cdot D}} - M\right) \]

      neg-mul-1 [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\frac{\color{blue}{-1 \cdot D}}{-d} \cdot D} - M\right) \]

      metadata-eval [<=]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\frac{\color{blue}{\left(-1\right)} \cdot D}{-d} \cdot D} - M\right) \]

      neg-mul-1 [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\frac{\left(-1\right) \cdot D}{\color{blue}{-1 \cdot d}} \cdot D} - M\right) \]

      metadata-eval [<=]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\frac{\left(-1\right) \cdot D}{\color{blue}{\left(-1\right)} \cdot d} \cdot D} - M\right) \]

      times-frac [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\color{blue}{\left(\frac{-1}{-1} \cdot \frac{D}{d}\right)} \cdot D} - M\right) \]

      metadata-eval [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\left(\frac{\color{blue}{-1}}{-1} \cdot \frac{D}{d}\right) \cdot D} - M\right) \]

      metadata-eval [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\left(\frac{-1}{\color{blue}{-1}} \cdot \frac{D}{d}\right) \cdot D} - M\right) \]

      metadata-eval [=>]44.1

      \[ \frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{\left(\color{blue}{1} \cdot \frac{D}{d}\right) \cdot D} - M\right) \]

    if 5.0000000000000001e172 < (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 M M)))))

    1. Initial program 0.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. Simplified0.6

      \[\leadsto \color{blue}{\frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{D \cdot \left(h \cdot D\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \left(\frac{d}{D} \cdot {\left(\frac{d}{D}\right)}^{3}\right) \cdot \frac{c0}{w \cdot h}, -M \cdot M\right)}\right)} \]
      Proof

      [Start]0.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) \]

      associate-*l/ [<=]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\frac{c0}{\left(w \cdot h\right) \cdot \left(D \cdot D\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) \]

      *-commutative [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \left(\color{blue}{\left(d \cdot d\right) \cdot \frac{c0}{\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) \]

      fma-def [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(d \cdot d, \frac{c0}{\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)} \]

      associate-*l* [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{\color{blue}{w \cdot \left(h \cdot \left(D \cdot D\right)\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) \]

      associate-/r* [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \color{blue}{\frac{\frac{c0}{w}}{h \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) \]

      associate-*r* [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{\left(h \cdot D\right) \cdot D}}, \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) \]

      *-commutative [=>]0.3

      \[ \frac{c0}{2 \cdot w} \cdot \mathsf{fma}\left(d \cdot d, \frac{\frac{c0}{w}}{\color{blue}{D \cdot \left(h \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) \]
    3. Taylor expanded in c0 around -inf 2.3

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)} \]
    4. Simplified45.1

      \[\leadsto \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{\frac{w \cdot \left(h \cdot \left(M \cdot M\right)\right)}{{\left(\frac{d}{D}\right)}^{2}}}{c0}, c0 \cdot 0\right)} \]
      Proof

      [Start]2.3

      \[ \frac{c0}{2 \cdot w} \cdot \left(0.5 \cdot \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0} + -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right) \]

      fma-def [=>]2.3

      \[ \frac{c0}{2 \cdot w} \cdot \color{blue}{\mathsf{fma}\left(0.5, \frac{{D}^{2} \cdot \left(w \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot c0}, -1 \cdot \left(\left(\frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)} + -1 \cdot \frac{{d}^{2}}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot c0\right)\right)} \]
    5. Applied egg-rr34.4

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

      \[\leadsto \color{blue}{\frac{\left(\left(-c0\right) \cdot \frac{0.5}{c0}\right) \cdot {\left(\frac{M \cdot \sqrt{w \cdot h}}{d} \cdot D\right)}^{2}}{w \cdot -2}} \]
      Proof

      [Start]34.4

      \[ \frac{\left(\frac{0.5}{c0} \cdot {\left(\frac{\sqrt{w \cdot h} \cdot M}{\frac{d}{D}}\right)}^{2}\right) \cdot \left(-c0\right)}{w \cdot -2} \]

      *-commutative [<=]34.4

      \[ \frac{\color{blue}{\left(-c0\right) \cdot \left(\frac{0.5}{c0} \cdot {\left(\frac{\sqrt{w \cdot h} \cdot M}{\frac{d}{D}}\right)}^{2}\right)}}{w \cdot -2} \]

      associate-*r* [=>]36.0

      \[ \frac{\color{blue}{\left(\left(-c0\right) \cdot \frac{0.5}{c0}\right) \cdot {\left(\frac{\sqrt{w \cdot h} \cdot M}{\frac{d}{D}}\right)}^{2}}}{w \cdot -2} \]

      associate-/r/ [=>]36.0

      \[ \frac{\left(\left(-c0\right) \cdot \frac{0.5}{c0}\right) \cdot {\color{blue}{\left(\frac{\sqrt{w \cdot h} \cdot M}{d} \cdot D\right)}}^{2}}{w \cdot -2} \]

      *-commutative [=>]36.0

      \[ \frac{\left(\left(-c0\right) \cdot \frac{0.5}{c0}\right) \cdot {\left(\frac{\color{blue}{M \cdot \sqrt{w \cdot h}}}{d} \cdot D\right)}^{2}}{w \cdot -2} \]
    7. Applied egg-rr36.3

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c0}{c0} \cdot \left({\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2} \cdot \frac{-0.5}{w}\right)} \]
    8. Simplified36.4

      \[\leadsto \color{blue}{0.25 \cdot \frac{{\left(\left(\frac{D}{d} \cdot M\right) \cdot \sqrt{h \cdot w}\right)}^{2}}{w}} \]
      Proof

      [Start]36.3

      \[ \frac{-0.5 \cdot c0}{c0} \cdot \left({\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2} \cdot \frac{-0.5}{w}\right) \]

      *-commutative [=>]36.3

      \[ \frac{-0.5 \cdot c0}{c0} \cdot \color{blue}{\left(\frac{-0.5}{w} \cdot {\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}\right)} \]

      associate-*r* [=>]36.3

      \[ \color{blue}{\left(\frac{-0.5 \cdot c0}{c0} \cdot \frac{-0.5}{w}\right) \cdot {\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}} \]

      associate-*r/ [=>]36.3

      \[ \color{blue}{\frac{\frac{-0.5 \cdot c0}{c0} \cdot -0.5}{w}} \cdot {\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2} \]

      associate-/r/ [<=]36.2

      \[ \color{blue}{\frac{\frac{-0.5 \cdot c0}{c0} \cdot -0.5}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}}} \]

      associate-/l* [=>]36.2

      \[ \frac{\color{blue}{\frac{-0.5}{\frac{c0}{c0}}} \cdot -0.5}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      *-inverses [=>]36.2

      \[ \frac{\frac{-0.5}{\color{blue}{1}} \cdot -0.5}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      metadata-eval [=>]36.2

      \[ \frac{\color{blue}{-0.5} \cdot -0.5}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      metadata-eval [=>]36.2

      \[ \frac{\color{blue}{0.25}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      metadata-eval [<=]36.2

      \[ \frac{\color{blue}{\frac{-0.5}{-2}}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      metadata-eval [<=]36.2

      \[ \frac{\frac{-0.5}{\color{blue}{-2 \cdot 1}}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      *-inverses [<=]36.2

      \[ \frac{\frac{-0.5}{-2 \cdot \color{blue}{\frac{c0}{c0}}}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      associate-/l/ [<=]36.2

      \[ \frac{\color{blue}{\frac{\frac{-0.5}{\frac{c0}{c0}}}{-2}}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      associate-/l* [<=]36.2

      \[ \frac{\frac{\color{blue}{\frac{-0.5 \cdot c0}{c0}}}{-2}}{\frac{w}{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}} \]

      associate-/l* [<=]36.3

      \[ \color{blue}{\frac{\frac{\frac{-0.5 \cdot c0}{c0}}{-2} \cdot {\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}{w}} \]

      associate-*r/ [<=]36.3

      \[ \color{blue}{\frac{\frac{-0.5 \cdot c0}{c0}}{-2} \cdot \frac{{\left(\frac{D}{\frac{\frac{d}{M}}{\sqrt{w \cdot h}}}\right)}^{2}}{w}} \]
    9. Applied egg-rr52.5

      \[\leadsto 0.25 \cdot \color{blue}{\left(e^{\mathsf{log1p}\left({\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h \cdot w}{w}\right)} - 1\right)} \]
    10. Simplified73.2

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

      [Start]52.5

      \[ 0.25 \cdot \left(e^{\mathsf{log1p}\left({\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h \cdot w}{w}\right)} - 1\right) \]

      expm1-def [=>]61.4

      \[ 0.25 \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left({\left(D \cdot \frac{M}{d}\right)}^{2} \cdot \frac{h \cdot w}{w}\right)\right)} \]

      expm1-log1p [=>]64.5

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

      *-commutative [=>]64.5

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

      *-rgt-identity [<=]64.5

      \[ 0.25 \cdot \left(\color{blue}{\left(\frac{h \cdot w}{w} \cdot 1\right)} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) \]

      associate-*l/ [=>]64.5

      \[ 0.25 \cdot \left(\color{blue}{\frac{\left(h \cdot w\right) \cdot 1}{w}} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) \]

      associate-*r/ [<=]64.5

      \[ 0.25 \cdot \left(\color{blue}{\left(\left(h \cdot w\right) \cdot \frac{1}{w}\right)} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) \]

      associate-*l* [=>]73.2

      \[ 0.25 \cdot \left(\color{blue}{\left(h \cdot \left(w \cdot \frac{1}{w}\right)\right)} \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right) \]

      associate-*l* [=>]73.2

      \[ 0.25 \cdot \color{blue}{\left(h \cdot \left(\left(w \cdot \frac{1}{w}\right) \cdot {\left(D \cdot \frac{M}{d}\right)}^{2}\right)\right)} \]

      rgt-mult-inverse [=>]73.2

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

      *-lft-identity [=>]73.2

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

      associate-*r/ [=>]73.2

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

      associate-/l* [=>]73.2

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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) \leq 5 \cdot 10^{+172}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{\frac{d}{\frac{w}{c0}} \cdot \frac{2}{h}}{D \cdot \frac{D}{d}} - M\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(h \cdot {\left(\frac{D}{\frac{d}{M}}\right)}^{2}\right)\\ \end{array} \]

Alternatives

Alternative 1
Error61.2%
Cost2264.00
\[\begin{array}{l} t_0 := \frac{1}{4 \cdot \left(\frac{d}{\left(D \cdot M\right) \cdot \left(D \cdot M\right)} \cdot \frac{d}{h}\right)}\\ \mathbf{if}\;d \leq -3.2 \cdot 10^{+137}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -7.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{0.25 \cdot \left(\left(M \cdot M\right) \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq -8 \cdot 10^{-152}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -2.45 \cdot 10^{-197}:\\ \;\;\;\;\frac{c0}{2 \cdot w} \cdot \left(\frac{d \cdot \frac{2}{h \cdot \frac{w}{c0}}}{D \cdot \frac{D}{d}} - M\right)\\ \mathbf{elif}\;d \leq 1.55 \cdot 10^{-296}:\\ \;\;\;\;c0 \cdot \left(\frac{\frac{0.25}{w}}{c0} \cdot \left(\left(D \cdot \left(h \cdot \frac{w}{d}\right)\right) \cdot \left(D \cdot \frac{M}{\frac{d}{M}}\right)\right)\right)\\ \mathbf{elif}\;d \leq 5.2 \cdot 10^{-203}:\\ \;\;\;\;\frac{1}{\frac{2 \cdot w}{\left(\left(\frac{D}{d} \cdot \frac{D}{d}\right) \cdot \left(M \cdot \left(\left(w \cdot h\right) \cdot M\right)\right)\right) \cdot 0.5}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 2
Error61.7%
Cost1617.00
\[\begin{array}{l} t_0 := \frac{1}{4 \cdot \left(\frac{d}{\left(D \cdot M\right) \cdot \left(D \cdot M\right)} \cdot \frac{d}{h}\right)}\\ \mathbf{if}\;d \leq -2.8 \cdot 10^{+138}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;d \leq -9.5 \cdot 10^{+22}:\\ \;\;\;\;\frac{0.25 \cdot \left(\left(M \cdot M\right) \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq -8.5 \cdot 10^{-129} \lor \neg \left(d \leq 1.8 \cdot 10^{-199}\right):\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(\frac{M \cdot \left(h \cdot M\right)}{d} \cdot \frac{D \cdot D}{d}\right)\\ \end{array} \]
Alternative 3
Error54.8%
Cost1356.00
\[\begin{array}{l} \mathbf{if}\;d \leq -6.3 \cdot 10^{+136}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \leq -1.06 \cdot 10^{-43}:\\ \;\;\;\;0.25 \cdot \frac{\left(D \cdot D\right) \cdot \left(h \cdot \left(M \cdot M\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 3.5 \cdot 10^{+212}:\\ \;\;\;\;0.25 \cdot \left(\frac{M \cdot \left(h \cdot M\right)}{d} \cdot \frac{D \cdot D}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 4
Error53.0%
Cost1224.00
\[\begin{array}{l} \mathbf{if}\;d \leq -1.25 \cdot 10^{-56}:\\ \;\;\;\;\frac{0.25 \cdot \left(\left(M \cdot M\right) \cdot \left(D \cdot \left(h \cdot D\right)\right)\right)}{d \cdot d}\\ \mathbf{elif}\;d \leq 2.4 \cdot 10^{+212}:\\ \;\;\;\;0.25 \cdot \left(\frac{M \cdot \left(h \cdot M\right)}{d} \cdot \frac{D \cdot D}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 5
Error55.7%
Cost1220.00
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 7.5 \cdot 10^{+276}:\\ \;\;\;\;0.25 \cdot \left(\frac{M \cdot \left(h \cdot M\right)}{d} \cdot \frac{D \cdot D}{d}\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 6
Error50.5%
Cost64.00
\[0 \]

Error

Reproduce?

herbie shell --seed 2023093 
(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))))))