?

Average Accuracy: 6.6% → 68.2%
Time: 43.9s
Precision: binary64
Cost: 43341

?

\[\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}{w \cdot h}\\ t_1 := {\left(\frac{d}{D}\right)}^{2}\\ t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_3 := \frac{c0}{2 \cdot w} \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;\frac{1}{\frac{2 \cdot w}{c0 \cdot \mathsf{fma}\left(t_0, t_1, \mathsf{hypot}\left(t_0 \cdot t_1, M\right)\right)}}\\ \mathbf{elif}\;t_3 \leq 0 \lor \neg \left(t_3 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\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 (* w h)))
        (t_1 (pow (/ d D) 2.0))
        (t_2 (/ (* c0 (* d d)) (* (* w h) (* D D))))
        (t_3 (* (/ c0 (* 2.0 w)) (+ t_2 (sqrt (- (* t_2 t_2) (* M M)))))))
   (if (<= t_3 -1e-212)
     (/ 1.0 (/ (* 2.0 w) (* c0 (fma t_0 t_1 (hypot (* t_0 t_1) M)))))
     (if (or (<= t_3 0.0) (not (<= t_3 INFINITY)))
       (* 0.25 (* M (* M (* (/ D d) (* h (/ D d))))))
       (exp
        (log
         (*
          (/ (* 2.0 (* d (* c0 d))) (* D (* (* w h) D)))
          (/ (* c0 0.5) w))))))))
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 / (w * h);
	double t_1 = pow((d / D), 2.0);
	double t_2 = (c0 * (d * d)) / ((w * h) * (D * D));
	double t_3 = (c0 / (2.0 * w)) * (t_2 + sqrt(((t_2 * t_2) - (M * M))));
	double tmp;
	if (t_3 <= -1e-212) {
		tmp = 1.0 / ((2.0 * w) / (c0 * fma(t_0, t_1, hypot((t_0 * t_1), M))));
	} else if ((t_3 <= 0.0) || !(t_3 <= ((double) INFINITY))) {
		tmp = 0.25 * (M * (M * ((D / d) * (h * (D / d)))));
	} else {
		tmp = exp(log((((2.0 * (d * (c0 * d))) / (D * ((w * h) * D))) * ((c0 * 0.5) / w))));
	}
	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(w * h))
	t_1 = Float64(d / D) ^ 2.0
	t_2 = Float64(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	t_3 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_2 + sqrt(Float64(Float64(t_2 * t_2) - Float64(M * M)))))
	tmp = 0.0
	if (t_3 <= -1e-212)
		tmp = Float64(1.0 / Float64(Float64(2.0 * w) / Float64(c0 * fma(t_0, t_1, hypot(Float64(t_0 * t_1), M)))));
	elseif ((t_3 <= 0.0) || !(t_3 <= Inf))
		tmp = Float64(0.25 * Float64(M * Float64(M * Float64(Float64(D / d) * Float64(h * Float64(D / d))))));
	else
		tmp = exp(log(Float64(Float64(Float64(2.0 * Float64(d * Float64(c0 * d))) / Float64(D * Float64(Float64(w * h) * D))) * Float64(Float64(c0 * 0.5) / w))));
	end
	return 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[(w * h), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[(d / D), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$2 + N[Sqrt[N[(N[(t$95$2 * t$95$2), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-212], N[(1.0 / N[(N[(2.0 * w), $MachinePrecision] / N[(c0 * N[(t$95$0 * t$95$1 + N[Sqrt[N[(t$95$0 * t$95$1), $MachinePrecision] ^ 2 + M ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$3, 0.0], N[Not[LessEqual[t$95$3, Infinity]], $MachinePrecision]], N[(0.25 * N[(M * N[(M * N[(N[(D / d), $MachinePrecision] * N[(h * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Exp[N[Log[N[(N[(N[(2.0 * N[(d * N[(c0 * d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(D * N[(N[(w * h), $MachinePrecision] * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(c0 * 0.5), $MachinePrecision] / w), $MachinePrecision]), $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}{w \cdot h}\\
t_1 := {\left(\frac{d}{D}\right)}^{2}\\
t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_3 := \frac{c0}{2 \cdot w} \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{-212}:\\
\;\;\;\;\frac{1}{\frac{2 \cdot w}{c0 \cdot \mathsf{fma}\left(t_0, t_1, \mathsf{hypot}\left(t_0 \cdot t_1, M\right)\right)}}\\

\mathbf{elif}\;t_3 \leq 0 \lor \neg \left(t_3 \leq \infty\right):\\
\;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\

\mathbf{else}:\\
\;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\


\end{array}

Error?

Derivation?

  1. Split input into 3 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))))) < -9.99999999999999954e-213

    1. Initial program 21.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. Simplified19.5%

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

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

      times-frac [=>]18.1

      \[ \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-neg [=>]18.1

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

      times-frac [=>]18.1

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

      times-frac [=>]19.5

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

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

      [Start]19.5

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

      associate-*l/ [=>]18.8

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

      clear-num [=>]18.8

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

      *-commutative [=>]18.8

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

      fma-def [=>]18.8

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

    if -9.99999999999999954e-213 < (*.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))))) < -0.0 or +inf.0 < (*.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 4.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. Simplified1.8%

      \[\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]4.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/ [<=]3.4

      \[ \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 [=>]3.4

      \[ \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 [=>]2.5

      \[ \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* [=>]2.1

      \[ \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* [=>]2.1

      \[ \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* [=>]2.0

      \[ \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 [=>]2.0

      \[ \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 5.9%

      \[\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. Simplified50.2%

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

      [Start]5.9

      \[ \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 [=>]5.9

      \[ \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. Taylor expanded in c0 around 0 48.0%

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

      \[\leadsto \color{blue}{0.25 \cdot \frac{D \cdot D}{\frac{\frac{d \cdot d}{h}}{M \cdot M}}} \]
      Proof

      [Start]48.0

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

      *-commutative [<=]48.0

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

      associate-/l* [=>]48.0

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

      unpow2 [=>]48.0

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

      unpow2 [=>]48.0

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

      unpow2 [=>]48.0

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

      associate-/r* [=>]48.0

      \[ 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{\frac{d \cdot d}{h}}{M \cdot M}}} \]
    7. Applied egg-rr56.4%

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

      [Start]48.0

      \[ 0.25 \cdot \frac{D \cdot D}{\frac{\frac{d \cdot d}{h}}{M \cdot M}} \]

      add-cube-cbrt [=>]47.9

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

      times-frac [=>]52.7

      \[ 0.25 \cdot \frac{D \cdot D}{\color{blue}{\frac{\sqrt[3]{\frac{d \cdot d}{h}} \cdot \sqrt[3]{\frac{d \cdot d}{h}}}{M} \cdot \frac{\sqrt[3]{\frac{d \cdot d}{h}}}{M}}} \]

      pow2 [=>]52.7

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

      associate-/l* [=>]52.7

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

      associate-/r/ [=>]52.7

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

      associate-/l* [=>]56.4

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

      associate-/r/ [=>]56.4

      \[ 0.25 \cdot \frac{D \cdot D}{\frac{{\left(\sqrt[3]{\frac{d}{h} \cdot d}\right)}^{2}}{M} \cdot \frac{\sqrt[3]{\color{blue}{\frac{d}{h} \cdot d}}}{M}} \]
    8. Taylor expanded in D around 0 48.0%

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

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

      [Start]48.0

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

      *-commutative [<=]48.0

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

      unpow2 [=>]48.0

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

      unpow2 [=>]48.0

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

      associate-*r* [=>]48.9

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

      associate-/l* [=>]48.1

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

      unpow2 [=>]48.1

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

      associate-*r/ [<=]51.2

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

      *-commutative [=>]51.2

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

      associate-*r/ [<=]51.3

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

      associate-*l* [=>]56.7

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

      times-frac [=>]69.5

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

      associate-/r/ [=>]72.5

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

    if -0.0 < (*.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))))) < +inf.0

    1. Initial program 23.7%

      \[\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. Applied egg-rr23.9%

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

      [Start]23.7

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

      add-exp-log [=>]22.1

      \[ \color{blue}{e^{\log \left(\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)\right)}} \]

      *-commutative [=>]22.1

      \[ e^{\log \color{blue}{\left(\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) \cdot \frac{c0}{2 \cdot w}\right)}} \]
    3. Taylor expanded in c0 around inf 32.0%

      \[\leadsto e^{\log \left(\color{blue}{\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)} \]
    4. Simplified44.2%

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

      [Start]32.0

      \[ e^{\log \left(\left(2 \cdot \frac{{d}^{2} \cdot c0}{{D}^{2} \cdot \left(w \cdot h\right)}\right) \cdot \frac{c0 \cdot 0.5}{w}\right)} \]

      associate-*r/ [=>]32.0

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

      unpow2 [=>]32.0

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

      associate-*l* [=>]39.3

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

      *-commutative [<=]39.3

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

      unpow2 [=>]39.3

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

      associate-*l* [=>]44.2

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

      *-commutative [=>]44.2

      \[ e^{\log \left(\frac{2 \cdot \left(d \cdot \left(d \cdot c0\right)\right)}{D \cdot \left(D \cdot \color{blue}{\left(w \cdot h\right)}\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.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 -1 \cdot 10^{-212}:\\ \;\;\;\;\frac{1}{\frac{2 \cdot w}{c0 \cdot \mathsf{fma}\left(\frac{c0}{w \cdot h}, {\left(\frac{d}{D}\right)}^{2}, \mathsf{hypot}\left(\frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{2}, M\right)\right)}}\\ \mathbf{elif}\;\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 0 \lor \neg \left(\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 \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Accuracy68.3%
Cost43341
\[\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)}\\ t_2 := t_0 \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;t_0 \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \left(d \cdot \frac{d}{D \cdot D}\right)\right)\right)\\ \mathbf{elif}\;t_2 \leq 0 \lor \neg \left(t_2 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\ \end{array} \]
Alternative 2
Accuracy68.6%
Cost43341
\[\begin{array}{l} t_0 := {\left(\frac{d}{D}\right)}^{2} \cdot \frac{\frac{c0}{w}}{h}\\ t_1 := \frac{c0}{2 \cdot w}\\ t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_3 := t_1 \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;t_1 \cdot \left(t_0 + t_0\right)\\ \mathbf{elif}\;t_3 \leq 0 \lor \neg \left(t_3 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\ \end{array} \]
Alternative 3
Accuracy68.6%
Cost43341
\[\begin{array}{l} t_0 := \frac{c0}{w \cdot h}\\ t_1 := {\left(\frac{d}{D}\right)}^{2}\\ t_2 := 0.5 \cdot \frac{c0}{w}\\ t_3 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_4 := \frac{c0}{2 \cdot w} \cdot \left(t_3 + \sqrt{t_3 \cdot t_3 - M \cdot M}\right)\\ \mathbf{if}\;t_4 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;\mathsf{hypot}\left(t_0 \cdot t_1, M\right) \cdot t_2 + t_0 \cdot \left(t_1 \cdot t_2\right)\\ \mathbf{elif}\;t_4 \leq 0 \lor \neg \left(t_4 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\ \end{array} \]
Alternative 4
Accuracy68.2%
Cost43341
\[\begin{array}{l} t_0 := \frac{c0}{w \cdot h}\\ t_1 := {\left(\frac{d}{D}\right)}^{2}\\ t_2 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_3 := \frac{c0}{2 \cdot w} \cdot \left(t_2 + \sqrt{t_2 \cdot t_2 - M \cdot M}\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;\frac{\frac{c0 \cdot \mathsf{fma}\left(t_0, t_1, \mathsf{hypot}\left(t_0 \cdot t_1, M\right)\right)}{w}}{2}\\ \mathbf{elif}\;t_3 \leq 0 \lor \neg \left(t_3 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;e^{\log \left(\frac{2 \cdot \left(d \cdot \left(c0 \cdot d\right)\right)}{D \cdot \left(\left(w \cdot h\right) \cdot D\right)} \cdot \frac{c0 \cdot 0.5}{w}\right)}\\ \end{array} \]
Alternative 5
Accuracy67.7%
Cost30541
\[\begin{array}{l} t_0 := c0 \cdot \left(d \cdot d\right)\\ t_1 := \left(w \cdot h\right) \cdot \left(D \cdot D\right)\\ t_2 := \frac{c0}{2 \cdot w}\\ t_3 := \frac{t_0}{t_1}\\ t_4 := t_2 \cdot \left(t_3 + \sqrt{t_3 \cdot t_3 - M \cdot M}\right)\\ \mathbf{if}\;t_4 \leq -1 \cdot 10^{-212}:\\ \;\;\;\;t_2 \cdot \left(2 \cdot \left(\frac{c0}{w \cdot h} \cdot \left(d \cdot \frac{d}{D \cdot D}\right)\right)\right)\\ \mathbf{elif}\;t_4 \leq 0 \lor \neg \left(t_4 \leq \infty\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_2 \cdot \frac{2 \cdot t_0}{t_1}\\ \end{array} \]
Alternative 6
Accuracy62.2%
Cost1481
\[\begin{array}{l} \mathbf{if}\;d \cdot d \leq 0 \lor \neg \left(d \cdot d \leq 5 \cdot 10^{+226}\right):\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{\frac{d}{M}}}{\frac{d}{h}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \frac{D \cdot M}{\frac{\frac{d \cdot d}{h}}{M}}\right)\\ \end{array} \]
Alternative 7
Accuracy66.1%
Cost1481
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 10^{-203} \lor \neg \left(D \cdot D \leq 2 \cdot 10^{+146}\right):\\ \;\;\;\;0.25 \cdot \left(M \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(h \cdot \frac{D}{d}\right)\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{\frac{d}{M}}}{\frac{d}{h}}\right)\right)\\ \end{array} \]
Alternative 8
Accuracy53.6%
Cost1480
\[\begin{array}{l} \mathbf{if}\;M \cdot M \leq 2.3 \cdot 10^{-183}:\\ \;\;\;\;0\\ \mathbf{elif}\;M \cdot M \leq 7.5 \cdot 10^{+212}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot \frac{h}{d \cdot d}\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 9
Accuracy55.9%
Cost1480
\[\begin{array}{l} \mathbf{if}\;d \cdot d \leq 2.7 \cdot 10^{-247}:\\ \;\;\;\;0\\ \mathbf{elif}\;d \cdot d \leq 6 \cdot 10^{+299}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \left(h \cdot M\right)}{d \cdot d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 10
Accuracy59.8%
Cost1224
\[\begin{array}{l} \mathbf{if}\;d \leq -8 \cdot 10^{+165}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{\frac{M}{\frac{d}{M}}}{\frac{d}{h}}\right)\right)\\ \mathbf{elif}\;d \leq -1.86 \cdot 10^{-149}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \left(h \cdot M\right)}{d \cdot d}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \left(M \cdot \frac{h}{d}\right)}{d}\right)\right)\\ \end{array} \]
Alternative 11
Accuracy59.8%
Cost960
\[0.25 \cdot \left(D \cdot \left(D \cdot \frac{M \cdot \left(M \cdot \frac{h}{d}\right)}{d}\right)\right) \]
Alternative 12
Accuracy49.8%
Cost64
\[0 \]

Error

Reproduce?

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