Average Error: 59.9 → 16.5
Time: 38.0s
Precision: binary64
Cost: 42636
\[\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 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-23}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right), 0\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;{\left(\frac{d}{D} \cdot \frac{c0}{w \cdot \sqrt{h}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot {\left(\frac{D \cdot M}{d}\right)}^{2}, 0\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 (* d d)) (* (* w h) (* D D))))
        (t_1 (* (/ c0 (* 2.0 w)) (+ t_0 (sqrt (- (* t_0 t_0) (* M M)))))))
   (if (<= t_1 -1e-23)
     (* d (* (/ d D) (/ c0 (* D (/ w (/ (/ c0 w) h))))))
     (if (<= t_1 0.0)
       (fma 0.25 (* h (* M (* (/ D d) (* M (/ D d))))) 0.0)
       (if (<= t_1 INFINITY)
         (pow (* (/ d D) (/ c0 (* w (sqrt h)))) 2.0)
         (fma 0.25 (* h (pow (/ (* D M) d) 2.0)) 0.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 * (d * d)) / ((w * h) * (D * D));
	double t_1 = (c0 / (2.0 * w)) * (t_0 + sqrt(((t_0 * t_0) - (M * M))));
	double tmp;
	if (t_1 <= -1e-23) {
		tmp = d * ((d / D) * (c0 / (D * (w / ((c0 / w) / h)))));
	} else if (t_1 <= 0.0) {
		tmp = fma(0.25, (h * (M * ((D / d) * (M * (D / d))))), 0.0);
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = pow(((d / D) * (c0 / (w * sqrt(h)))), 2.0);
	} else {
		tmp = fma(0.25, (h * pow(((D * M) / d), 2.0)), 0.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(Float64(c0 * Float64(d * d)) / Float64(Float64(w * h) * Float64(D * D)))
	t_1 = Float64(Float64(c0 / Float64(2.0 * w)) * Float64(t_0 + sqrt(Float64(Float64(t_0 * t_0) - Float64(M * M)))))
	tmp = 0.0
	if (t_1 <= -1e-23)
		tmp = Float64(d * Float64(Float64(d / D) * Float64(c0 / Float64(D * Float64(w / Float64(Float64(c0 / w) / h))))));
	elseif (t_1 <= 0.0)
		tmp = fma(0.25, Float64(h * Float64(M * Float64(Float64(D / d) * Float64(M * Float64(D / d))))), 0.0);
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(d / D) * Float64(c0 / Float64(w * sqrt(h)))) ^ 2.0;
	else
		tmp = fma(0.25, Float64(h * (Float64(Float64(D * M) / d) ^ 2.0)), 0.0);
	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[(N[(c0 * N[(d * d), $MachinePrecision]), $MachinePrecision] / N[(N[(w * h), $MachinePrecision] * N[(D * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(c0 / N[(2.0 * w), $MachinePrecision]), $MachinePrecision] * N[(t$95$0 + N[Sqrt[N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(M * M), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-23], N[(d * N[(N[(d / D), $MachinePrecision] * N[(c0 / N[(D * N[(w / N[(N[(c0 / w), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(0.25 * N[(h * N[(M * N[(N[(D / d), $MachinePrecision] * N[(M * N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 0.0), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Power[N[(N[(d / D), $MachinePrecision] * N[(c0 / N[(w * N[Sqrt[h], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], N[(0.25 * N[(h * N[Power[N[(N[(D * M), $MachinePrecision] / d), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] + 0.0), $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 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\
t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-23}:\\
\;\;\;\;d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\right)\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\mathsf{fma}\left(0.25, h \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right), 0\right)\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;{\left(\frac{d}{D} \cdot \frac{c0}{w \cdot \sqrt{h}}\right)}^{2}\\

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


\end{array}

Error

Derivation

  1. Split input into 4 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.9999999999999996e-24

    1. Initial program 53.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. Simplified57.9

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{4}, M \cdot \left(-M\right)\right)}\right)} \]
      Proof
      (*.f64 (/.f64 (/.f64 c0 2) w) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 w (*.f64 h (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 c0 (*.f64 2 w))) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 w (*.f64 h (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 w h) (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) (Rewrite<= metadata-eval (+.f64 3 1)))) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (Rewrite<= pow-plus_binary64 (*.f64 (pow.f64 (/.f64 d D) 3) (/.f64 d D)))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (Rewrite=> unpow3_binary64 (*.f64 (*.f64 (/.f64 d D) (/.f64 d D)) (/.f64 d D))) (/.f64 d D))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d d) (*.f64 D D))) (/.f64 d D)) (/.f64 d D))) (*.f64 M (neg.f64 M)))))): 3 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (*.f64 (/.f64 d D) (/.f64 d D))))) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D)))) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 M M))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 c0 (*.f64 w h))) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M))))): 2 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D))) (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M))))): 0 points increase in error, 7 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D)))) (*.f64 M M))))): 4 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))))) (*.f64 M M))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (*.f64 d d) (/.f64 c0 (*.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 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (*.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 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (Rewrite=> associate-*l/_binary64 (/.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 points increase in error, 2 points decrease in error
    3. Taylor expanded in c0 around inf 56.0

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

      \[\leadsto \color{blue}{\left(\frac{d}{D \cdot D} \cdot d\right) \cdot \frac{c0 \cdot c0}{w \cdot \left(w \cdot h\right)}} \]
      Proof
      (*.f64 (*.f64 (/.f64 d (*.f64 D D)) d) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (/.f64 d (Rewrite<= unpow2_binary64 (pow.f64 D 2))) d) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/r/_binary64 (/.f64 d (/.f64 (pow.f64 D 2) d))) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 1 points increase in error, 3 points decrease in error
      (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 d d) (pow.f64 D 2))) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 10 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) (pow.f64 D 2)) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c0 2)) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (pow.f64 c0 2) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 w w) h)))): 2 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (pow.f64 c0 2) (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 w 2)) h))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 d 2) (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)))): 5 points increase in error, 9 points decrease in error
    5. Taylor expanded in d around 0 56.0

      \[\leadsto \color{blue}{\frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}} \]
    6. Simplified35.7

      \[\leadsto \color{blue}{d \cdot \left(\frac{d}{D \cdot w} \cdot \frac{c0}{\left(w \cdot h\right) \cdot \frac{D}{c0}}\right)} \]
      Proof
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 c0 (*.f64 (*.f64 w h) (/.f64 D c0))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 c0 (*.f64 (Rewrite<= *-commutative_binary64 (*.f64 h w)) (/.f64 D c0))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 c0 (/.f64 D c0)) (*.f64 h w))))): 23 points increase in error, 15 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 c0 c0) D)) (*.f64 h w)))): 15 points increase in error, 11 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c0 2)) D) (*.f64 h w)))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (Rewrite=> associate-/l/_binary64 (/.f64 (pow.f64 c0 2) (*.f64 (*.f64 h w) D))))): 18 points increase in error, 9 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 (pow.f64 c0 2) (Rewrite<= *-commutative_binary64 (*.f64 D (*.f64 h w)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 (pow.f64 c0 2) (*.f64 D (Rewrite=> *-commutative_binary64 (*.f64 w h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (/.f64 (pow.f64 c0 2) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 D w) h))))): 5 points increase in error, 15 points decrease in error
      (*.f64 d (*.f64 (/.f64 d (*.f64 D w)) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 (pow.f64 c0 2) h) (*.f64 D w))))): 14 points increase in error, 25 points decrease in error
      (*.f64 d (Rewrite<= associate-/r/_binary64 (/.f64 d (/.f64 (*.f64 D w) (/.f64 (/.f64 (pow.f64 c0 2) h) (*.f64 D w)))))): 16 points increase in error, 22 points decrease in error
      (*.f64 d (/.f64 d (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 D w) (*.f64 D w)) (/.f64 (pow.f64 c0 2) h))))): 30 points increase in error, 5 points decrease in error
      (*.f64 d (/.f64 d (/.f64 (Rewrite<= unswap-sqr_binary64 (*.f64 (*.f64 D D) (*.f64 w w))) (/.f64 (pow.f64 c0 2) h)))): 33 points increase in error, 5 points decrease in error
      (*.f64 d (/.f64 d (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (*.f64 w w)) (/.f64 (pow.f64 c0 2) h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (/.f64 d (/.f64 (*.f64 (pow.f64 D 2) (Rewrite<= unpow2_binary64 (pow.f64 w 2))) (/.f64 (pow.f64 c0 2) h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (/.f64 d (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (*.f64 (pow.f64 D 2) (pow.f64 w 2)) h) (pow.f64 c0 2))))): 5 points increase in error, 9 points decrease in error
      (*.f64 d (/.f64 d (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h))) (pow.f64 c0 2)))): 9 points increase in error, 4 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 d (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2))) d)): 0 points increase in error, 0 points decrease in error
      (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 d d) (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2)))): 37 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 d 2) (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)))): 5 points increase in error, 1 points decrease in error
    7. Taylor expanded in d around 0 56.0

      \[\leadsto \color{blue}{\frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}} \]
    8. Simplified33.8

      \[\leadsto \color{blue}{d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\right)} \]
      Proof
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 c0 (*.f64 D (/.f64 w (/.f64 (/.f64 c0 w) h)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 c0 (*.f64 D (/.f64 w (Rewrite<= associate-/r*_binary64 (/.f64 c0 (*.f64 w h)))))))): 5 points increase in error, 11 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 c0 (*.f64 D (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 w (*.f64 w h)) c0)))))): 18 points increase in error, 11 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 c0 (*.f64 D (/.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 w w) h)) c0))))): 8 points increase in error, 8 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 c0 (*.f64 D (/.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 w 2)) h) c0))))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 c0 (/.f64 (*.f64 (pow.f64 w 2) h) c0)) D)))): 14 points increase in error, 4 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 c0 c0) (*.f64 (pow.f64 w 2) h))) D))): 15 points increase in error, 5 points decrease in error
      (*.f64 d (*.f64 (/.f64 d D) (/.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c0 2)) (*.f64 (pow.f64 w 2) h)) D))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d (/.f64 (pow.f64 c0 2) (*.f64 (pow.f64 w 2) h))) (*.f64 D D)))): 28 points increase in error, 13 points decrease in error
      (*.f64 d (/.f64 (*.f64 d (/.f64 (pow.f64 c0 2) (*.f64 (pow.f64 w 2) h))) (Rewrite<= unpow2_binary64 (pow.f64 D 2)))): 0 points increase in error, 0 points decrease in error
      (*.f64 d (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 d (pow.f64 D 2)) (/.f64 (pow.f64 c0 2) (*.f64 (pow.f64 w 2) h))))): 25 points increase in error, 4 points decrease in error
      (*.f64 d (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h))))): 9 points increase in error, 25 points decrease in error
      (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 (*.f64 d (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h))) d)): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite=> associate-/l*_binary64 (/.f64 d (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2)))) d): 2 points increase in error, 14 points decrease in error
      (Rewrite<= associate-/r/_binary64 (/.f64 d (/.f64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2)) d))): 3 points increase in error, 2 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 d d) (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2)))): 35 points increase in error, 0 points decrease in error
      (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)) (pow.f64 c0 2))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 d 2) (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)))): 5 points increase in error, 1 points decrease in error

    if -9.9999999999999996e-24 < (*.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

    1. Initial program 27.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 in c0 around -inf 34.0

      \[\leadsto \color{blue}{-0.5 \cdot \frac{\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}^{2}}{w} + 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    3. Simplified25.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25, \frac{D}{\frac{d \cdot d}{D}} \cdot \left(\left(h \cdot M\right) \cdot M\right), 0\right)} \]
      Proof
      (fma.f64 1/4 (*.f64 (/.f64 D (/.f64 (*.f64 d d) D)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 D (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) D)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 D D) (pow.f64 d 2))) (*.f64 (*.f64 h M) M)) 0): 28 points increase in error, 2 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (pow.f64 d 2)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (Rewrite<= associate-*r*_binary64 (*.f64 h (*.f64 M M)))) 0): 16 points increase in error, 3 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (*.f64 h (Rewrite<= unpow2_binary64 (pow.f64 M 2)))) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (Rewrite<= associate-/r/_binary64 (/.f64 (pow.f64 D 2) (/.f64 (pow.f64 d 2) (*.f64 h (pow.f64 M 2))))) 0): 7 points increase in error, 7 points decrease in error
      (fma.f64 1/4 (/.f64 (pow.f64 D 2) (/.f64 (pow.f64 d 2) (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 M 2) h)))) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))) 0): 3 points increase in error, 6 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (Rewrite<= div0_binary64 (/.f64 0 (/.f64 w (pow.f64 c0 2))))): 48 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (Rewrite<= metadata-eval (*.f64 -1/2 0)) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (Rewrite<= mul0-lft_binary64 (*.f64 0 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h)))))) (/.f64 w (pow.f64 c0 2)))): 93 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (*.f64 (Rewrite<= metadata-eval (+.f64 -1 1)) (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))))) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (Rewrite<= associate-*r/_binary64 (*.f64 -1/2 (/.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (/.f64 w (pow.f64 c0 2)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (*.f64 -1/2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)))): 0 points increase in error, 1 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))) (*.f64 -1/2 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1/2 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)) (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))))): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr18.8

      \[\leadsto \mathsf{fma}\left(0.25, \color{blue}{0 + h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}}, 0\right) \]
    5. Applied egg-rr18.9

      \[\leadsto \mathsf{fma}\left(0.25, 0 + h \cdot \color{blue}{\left(\left(\left(M \cdot \frac{D}{d}\right) \cdot \frac{D}{d}\right) \cdot M\right)}, 0\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 51.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. Simplified56.6

      \[\leadsto \color{blue}{\frac{\frac{c0}{2}}{w} \cdot \mathsf{fma}\left(d \cdot d, \frac{c0}{w \cdot \left(h \cdot \left(D \cdot D\right)\right)}, \sqrt{\mathsf{fma}\left(\frac{c0}{w \cdot h}, \frac{c0}{w \cdot h} \cdot {\left(\frac{d}{D}\right)}^{4}, M \cdot \left(-M\right)\right)}\right)} \]
      Proof
      (*.f64 (/.f64 (/.f64 c0 2) w) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 w (*.f64 h (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/r*_binary64 (/.f64 c0 (*.f64 2 w))) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 w (*.f64 h (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 w h) (*.f64 D D)))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) 4)) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (pow.f64 (/.f64 d D) (Rewrite<= metadata-eval (+.f64 3 1)))) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (Rewrite<= pow-plus_binary64 (*.f64 (pow.f64 (/.f64 d D) 3) (/.f64 d D)))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (Rewrite=> unpow3_binary64 (*.f64 (*.f64 (/.f64 d D) (/.f64 d D)) (/.f64 d D))) (/.f64 d D))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d d) (*.f64 D D))) (/.f64 d D)) (/.f64 d D))) (*.f64 M (neg.f64 M)))))): 3 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (Rewrite<= associate-*r*_binary64 (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (*.f64 (/.f64 d D) (/.f64 d D))))) (*.f64 M (neg.f64 M)))))): 0 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M (neg.f64 M)))))): 1 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (fma.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D)))) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 M M))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 c0 (*.f64 w h)) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 c0 (*.f64 w h))) (*.f64 (/.f64 (*.f64 d d) (*.f64 D D)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M))))): 2 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (Rewrite<= swap-sqr_binary64 (*.f64 (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D))) (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D))))) (*.f64 M M))))): 0 points increase in error, 7 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (Rewrite<= times-frac_binary64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D)))) (*.f64 (/.f64 c0 (*.f64 w h)) (/.f64 (*.f64 d d) (*.f64 D D)))) (*.f64 M M))))): 4 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (fma.f64 (*.f64 d d) (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (sqrt.f64 (-.f64 (*.f64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))) (Rewrite<= times-frac_binary64 (/.f64 (*.f64 c0 (*.f64 d d)) (*.f64 (*.f64 w h) (*.f64 D D))))) (*.f64 M M))))): 1 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (Rewrite<= fma-def_binary64 (+.f64 (*.f64 (*.f64 d d) (/.f64 c0 (*.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 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 (/.f64 c0 (*.f64 (*.f64 w h) (*.f64 D D))) (*.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 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 c0 (*.f64 2 w)) (+.f64 (Rewrite=> associate-*l/_binary64 (/.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 points increase in error, 2 points decrease in error
    3. Taylor expanded in c0 around inf 54.2

      \[\leadsto \color{blue}{\frac{{d}^{2} \cdot {c0}^{2}}{{D}^{2} \cdot \left({w}^{2} \cdot h\right)}} \]
    4. Simplified52.5

      \[\leadsto \color{blue}{\left(\frac{d}{D \cdot D} \cdot d\right) \cdot \frac{c0 \cdot c0}{w \cdot \left(w \cdot h\right)}} \]
      Proof
      (*.f64 (*.f64 (/.f64 d (*.f64 D D)) d) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (*.f64 (/.f64 d (Rewrite<= unpow2_binary64 (pow.f64 D 2))) d) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (Rewrite<= associate-/r/_binary64 (/.f64 d (/.f64 (pow.f64 D 2) d))) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 1 points increase in error, 3 points decrease in error
      (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 d d) (pow.f64 D 2))) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 10 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) (pow.f64 D 2)) (/.f64 (*.f64 c0 c0) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 c0 2)) (*.f64 w (*.f64 w h)))): 0 points increase in error, 0 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (pow.f64 c0 2) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 w w) h)))): 2 points increase in error, 1 points decrease in error
      (*.f64 (/.f64 (pow.f64 d 2) (pow.f64 D 2)) (/.f64 (pow.f64 c0 2) (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 w 2)) h))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= times-frac_binary64 (/.f64 (*.f64 (pow.f64 d 2) (pow.f64 c0 2)) (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 w 2) h)))): 5 points increase in error, 9 points decrease in error
    5. Applied egg-rr19.6

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

    if +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 64.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 in c0 around -inf 63.5

      \[\leadsto \color{blue}{-0.5 \cdot \frac{\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}^{2}}{w} + 0.25 \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2}}} \]
    3. Simplified28.5

      \[\leadsto \color{blue}{\mathsf{fma}\left(0.25, \frac{D}{\frac{d \cdot d}{D}} \cdot \left(\left(h \cdot M\right) \cdot M\right), 0\right)} \]
      Proof
      (fma.f64 1/4 (*.f64 (/.f64 D (/.f64 (*.f64 d d) D)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 D (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 d 2)) D)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 D D) (pow.f64 d 2))) (*.f64 (*.f64 h M) M)) 0): 28 points increase in error, 2 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (Rewrite<= unpow2_binary64 (pow.f64 D 2)) (pow.f64 d 2)) (*.f64 (*.f64 h M) M)) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (Rewrite<= associate-*r*_binary64 (*.f64 h (*.f64 M M)))) 0): 16 points increase in error, 3 points decrease in error
      (fma.f64 1/4 (*.f64 (/.f64 (pow.f64 D 2) (pow.f64 d 2)) (*.f64 h (Rewrite<= unpow2_binary64 (pow.f64 M 2)))) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (Rewrite<= associate-/r/_binary64 (/.f64 (pow.f64 D 2) (/.f64 (pow.f64 d 2) (*.f64 h (pow.f64 M 2))))) 0): 7 points increase in error, 7 points decrease in error
      (fma.f64 1/4 (/.f64 (pow.f64 D 2) (/.f64 (pow.f64 d 2) (Rewrite=> *-commutative_binary64 (*.f64 (pow.f64 M 2) h)))) 0): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))) 0): 3 points increase in error, 6 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (Rewrite<= div0_binary64 (/.f64 0 (/.f64 w (pow.f64 c0 2))))): 48 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (Rewrite<= metadata-eval (*.f64 -1/2 0)) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (Rewrite<= mul0-lft_binary64 (*.f64 0 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h)))))) (/.f64 w (pow.f64 c0 2)))): 93 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (*.f64 (Rewrite<= metadata-eval (+.f64 -1 1)) (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (/.f64 (*.f64 -1/2 (Rewrite<= distribute-rgt1-in_binary64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))))) (/.f64 w (pow.f64 c0 2)))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (Rewrite<= associate-*r/_binary64 (*.f64 -1/2 (/.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (/.f64 w (pow.f64 c0 2)))))): 0 points increase in error, 0 points decrease in error
      (fma.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2)) (*.f64 -1/2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)))): 0 points increase in error, 1 points decrease in error
      (Rewrite<= fma-def_binary64 (+.f64 (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))) (*.f64 -1/2 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= +-commutative_binary64 (+.f64 (*.f64 -1/2 (/.f64 (*.f64 (+.f64 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))) (*.f64 -1 (/.f64 (pow.f64 d 2) (*.f64 (pow.f64 D 2) (*.f64 w h))))) (pow.f64 c0 2)) w)) (*.f64 1/4 (/.f64 (*.f64 (pow.f64 D 2) (*.f64 (pow.f64 M 2) h)) (pow.f64 d 2))))): 0 points increase in error, 0 points decrease in error
    4. Applied egg-rr14.8

      \[\leadsto \mathsf{fma}\left(0.25, \color{blue}{0 + h \cdot {\left(M \cdot \frac{D}{d}\right)}^{2}}, 0\right) \]
    5. Applied egg-rr14.9

      \[\leadsto \mathsf{fma}\left(0.25, 0 + h \cdot {\color{blue}{\left(\frac{M \cdot D}{d}\right)}}^{2}, 0\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification16.5

    \[\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^{-23}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\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:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right), 0\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 \infty:\\ \;\;\;\;{\left(\frac{d}{D} \cdot \frac{c0}{w \cdot \sqrt{h}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot {\left(\frac{D \cdot M}{d}\right)}^{2}, 0\right)\\ \end{array} \]

Alternatives

Alternative 1
Error17.3
Cost42636
\[\begin{array}{l} t_0 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_1 := \frac{c0}{2 \cdot w} \cdot \left(t_0 + \sqrt{t_0 \cdot t_0 - M \cdot M}\right)\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{-23}:\\ \;\;\;\;d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\right)\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right), 0\right)\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;{\left(\frac{d}{D} \cdot \frac{c0}{w \cdot \sqrt{h}}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \frac{D \cdot \frac{M}{d}}{\frac{d}{D \cdot M}}, 0\right)\\ \end{array} \]
Alternative 2
Error18.1
Cost36556
\[\begin{array}{l} t_0 := d \cdot \left(\frac{d}{D} \cdot \frac{c0}{D \cdot \frac{w}{\frac{\frac{c0}{w}}{h}}}\right)\\ t_1 := \frac{c0 \cdot \left(d \cdot d\right)}{\left(w \cdot h\right) \cdot \left(D \cdot D\right)}\\ t_2 := \frac{c0}{2 \cdot w} \cdot \left(t_1 + \sqrt{t_1 \cdot t_1 - M \cdot M}\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-23}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \left(M \cdot \left(\frac{D}{d} \cdot \left(M \cdot \frac{D}{d}\right)\right)\right), 0\right)\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, h \cdot \frac{D \cdot \frac{M}{d}}{\frac{d}{D \cdot M}}, 0\right)\\ \end{array} \]
Alternative 3
Error20.2
Cost8400
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, \frac{h \cdot M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}, 0\right)\\ \mathbf{if}\;D \cdot D \leq 10^{-207}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \cdot D \leq 5 \cdot 10^{-66}:\\ \;\;\;\;\mathsf{fma}\left(0.25, D \cdot \left(D \cdot \frac{M}{\frac{d}{M} \cdot \frac{d}{h}}\right), 0\right)\\ \mathbf{elif}\;D \cdot D \leq 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \frac{\frac{d}{\frac{D}{d} \cdot \left(h \cdot D\right)}}{w}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 4
Error20.6
Cost8400
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, h \cdot \frac{D \cdot \frac{M}{d}}{\frac{d}{D \cdot M}}, 0\right)\\ \mathbf{if}\;D \cdot D \leq 2 \cdot 10^{-307}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \cdot D \leq 10^{-93}:\\ \;\;\;\;\mathsf{fma}\left(0.25, D \cdot \left(M \cdot \left(\frac{D}{d} \cdot \frac{h}{\frac{d}{M}}\right)\right), 0\right)\\ \mathbf{elif}\;D \cdot D \leq 4 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \frac{\frac{d}{\frac{D}{d} \cdot \left(h \cdot D\right)}}{w}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, \frac{h \cdot M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}, 0\right)\\ \end{array} \]
Alternative 5
Error21.5
Cost8140
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, D \cdot \left(M \cdot \left(\frac{D}{d} \cdot \frac{h}{\frac{d}{M}}\right)\right), 0\right)\\ \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{+153}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+215}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \frac{\frac{d}{\frac{D}{d} \cdot \left(h \cdot D\right)}}{w}\right)\right)\\ \mathbf{elif}\;D \cdot D \leq 10^{+308}:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.25, \frac{D}{d} \cdot \left(\frac{D}{\frac{d}{M}} \cdot \left(h \cdot M\right)\right), 0\right)\\ \end{array} \]
Alternative 6
Error23.6
Cost7624
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, \frac{D \cdot \frac{h \cdot M}{\frac{d}{M}}}{\frac{d}{D}}, 0\right)\\ \mathbf{if}\;D \leq 2.8 \cdot 10^{+76}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \leq 4.5 \cdot 10^{+124}:\\ \;\;\;\;d \cdot \frac{\frac{c0 \cdot \frac{\frac{d}{D}}{w}}{w}}{\frac{h}{\frac{c0}{D}}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 7
Error21.6
Cost7624
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, \frac{D}{d} \cdot \left(\frac{D}{\frac{d}{M}} \cdot \left(h \cdot M\right)\right), 0\right)\\ \mathbf{if}\;D \leq 2.8 \cdot 10^{+76}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \leq 4.5 \cdot 10^{+124}:\\ \;\;\;\;d \cdot \frac{\frac{c0 \cdot \frac{\frac{d}{D}}{w}}{w}}{\frac{h}{\frac{c0}{D}}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Error19.7
Cost7624
\[\begin{array}{l} t_0 := \mathsf{fma}\left(0.25, \frac{h \cdot M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}, 0\right)\\ \mathbf{if}\;D \leq 2.8 \cdot 10^{+76}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;D \leq 4.5 \cdot 10^{+124}:\\ \;\;\;\;d \cdot \frac{\frac{c0 \cdot \frac{\frac{d}{D}}{w}}{w}}{\frac{h}{\frac{c0}{D}}}\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 9
Error32.9
Cost2124
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{+153}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+215}:\\ \;\;\;\;d \cdot \left(\frac{d}{h} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{c0}{w}}{D \cdot D}\right)\right)\\ \mathbf{elif}\;D \cdot D \leq 5 \cdot 10^{+268}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{c0 \cdot 0.5}{\frac{w}{2 \cdot \left(\left(\frac{d}{D} \cdot \frac{d}{D}\right) \cdot \frac{\frac{c0}{h}}{w}\right)}}\\ \end{array} \]
Alternative 10
Error32.1
Cost1608
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{+153}:\\ \;\;\;\;0\\ \mathbf{elif}\;D \cdot D \leq 2 \cdot 10^{+215}:\\ \;\;\;\;d \cdot \left(\frac{d}{h} \cdot \left(\frac{c0}{w} \cdot \frac{\frac{c0}{w}}{D \cdot D}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;0\\ \end{array} \]
Alternative 11
Error32.7
Cost1604
\[\begin{array}{l} \mathbf{if}\;D \cdot D \leq 4 \cdot 10^{+153}:\\ \;\;\;\;0\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{c0}{2}}{w} \cdot \left(2 \cdot \left(c0 \cdot \left(\frac{\frac{d}{D}}{w} \cdot \frac{\frac{d}{D}}{h}\right)\right)\right)\\ \end{array} \]
Alternative 12
Error31.5
Cost64
\[0 \]

Error

Reproduce

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