Henrywood and Agarwal, Equation (9a)

Percentage Accurate: 81.5% → 89.3%
Time: 17.5s
Alternatives: 17
Speedup: 1.8×

Specification

?
\[\begin{array}{l} \\ w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d):
	return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d)
	return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)))))
end
function tmp = code(w0, M, D, h, l, d)
	tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))));
end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 17 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))
double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * sqrt((1.0 - (pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    code = w0 * sqrt((1.0d0 - ((((m * d) / (2.0d0 * d_1)) ** 2.0d0) * (h / l))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
	return w0 * Math.sqrt((1.0 - (Math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))));
}
def code(w0, M, D, h, l, d):
	return w0 * math.sqrt((1.0 - (math.pow(((M * D) / (2.0 * d)), 2.0) * (h / l))))
function code(w0, M, D, h, l, d)
	return Float64(w0 * sqrt(Float64(1.0 - Float64((Float64(Float64(M * D) / Float64(2.0 * d)) ^ 2.0) * Float64(h / l)))))
end
function tmp = code(w0, M, D, h, l, d)
	tmp = w0 * sqrt((1.0 - ((((M * D) / (2.0 * d)) ^ 2.0) * (h / l))));
end
code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 - N[(N[Power[N[(N[(M * D), $MachinePrecision] / N[(2.0 * d), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision] * N[(h / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}}
\end{array}

Alternative 1: 89.3% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M \cdot D}{d}\\ w0 \cdot \sqrt{1 - \frac{t\_0 \cdot h}{\ell \cdot \frac{4}{t\_0}}} \end{array} \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (let* ((t_0 (/ (* M D) d)))
   (* w0 (sqrt (- 1.0 (/ (* t_0 h) (* l (/ 4.0 t_0))))))))
double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = (M * D) / d;
	return w0 * sqrt((1.0 - ((t_0 * h) / (l * (4.0 / t_0)))));
}
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    real(8) :: t_0
    t_0 = (m * d) / d_1
    code = w0 * sqrt((1.0d0 - ((t_0 * h) / (l * (4.0d0 / t_0)))))
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = (M * D) / d;
	return w0 * Math.sqrt((1.0 - ((t_0 * h) / (l * (4.0 / t_0)))));
}
def code(w0, M, D, h, l, d):
	t_0 = (M * D) / d
	return w0 * math.sqrt((1.0 - ((t_0 * h) / (l * (4.0 / t_0)))))
function code(w0, M, D, h, l, d)
	t_0 = Float64(Float64(M * D) / d)
	return Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(t_0 * h) / Float64(l * Float64(4.0 / t_0))))))
end
function tmp = code(w0, M, D, h, l, d)
	t_0 = (M * D) / d;
	tmp = w0 * sqrt((1.0 - ((t_0 * h) / (l * (4.0 / t_0)))));
end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(N[(M * D), $MachinePrecision] / d), $MachinePrecision]}, N[(w0 * N[Sqrt[N[(1.0 - N[(N[(t$95$0 * h), $MachinePrecision] / N[(l * N[(4.0 / t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \frac{M \cdot D}{d}\\
w0 \cdot \sqrt{1 - \frac{t\_0 \cdot h}{\ell \cdot \frac{4}{t\_0}}}
\end{array}
\end{array}
Derivation
  1. Initial program 80.3%

    \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
    2. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
    3. unpow2N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
    4. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
    5. times-fracN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    9. associate-/r*N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    11. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    12. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    13. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    14. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    15. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
    16. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
  4. Applied egg-rr88.4%

    \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
  5. Step-by-step derivation
    1. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}\right)\right)\right)\right) \]
    2. associate-/l/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{M}{\frac{d}{D}}}{\frac{1}{h} \cdot 2}\right)\right)\right)\right) \]
    3. frac-timesN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
    4. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
    5. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
    6. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
    9. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{*.f64}\left(\left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}\right), \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
  6. Applied egg-rr88.7%

    \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{M}{\frac{d}{D}}}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{0.5} \cdot \frac{2}{h}}}} \]
  7. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), \left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}\right)\right)\right)\right)\right) \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), \left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}\right)\right)\right)\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}\right)\right)\right)\right)\right) \]
    4. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \left(\frac{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2}{h}\right)\right)\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2\right), h\right)\right)\right)\right)\right) \]
    6. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}} \cdot \frac{1}{\frac{1}{2}}\right) \cdot 2\right), h\right)\right)\right)\right)\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}} \cdot 2\right) \cdot 2\right), h\right)\right)\right)\right)\right) \]
    8. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}} \cdot \left(2 \cdot 2\right)\right), h\right)\right)\right)\right)\right) \]
    9. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}} \cdot 4\right), h\right)\right)\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}} \cdot \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell}{\frac{M}{\frac{d}{D}}}\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    12. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \frac{1}{\frac{M}{\frac{d}{D}}}\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    13. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\frac{\frac{d}{D}}{M}\right)\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    15. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\left(\frac{d}{D}\right), M\right)\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    16. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, D\right), M\right)\right), \left(\mathsf{neg}\left(-4\right)\right)\right), h\right)\right)\right)\right)\right) \]
    17. metadata-eval88.8%

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(\mathsf{/.f64}\left(d, D\right), M\right)\right), 4\right), h\right)\right)\right)\right)\right) \]
  8. Applied egg-rr88.8%

    \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{M}{\frac{d}{D}}}{\frac{\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4}{h}}}} \]
  9. Step-by-step derivation
    1. associate-/r/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{\frac{d}{D}}}{\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4} \cdot h\right)\right)\right)\right) \]
    2. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{\frac{d}{D}} \cdot h}{\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4}\right)\right)\right)\right) \]
    3. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}} \cdot h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    5. associate-/r/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{M}{d} \cdot D\right), h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    6. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{M \cdot D}{d}\right), h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot D\right), d\right), h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \left(\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4\right)\right)\right)\right)\right) \]
    9. associate-*l*N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \left(\ell \cdot \left(\frac{\frac{d}{D}}{M} \cdot 4\right)\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \left(\frac{\frac{d}{D}}{M} \cdot 4\right)\right)\right)\right)\right)\right) \]
    11. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \left(\frac{1}{\frac{M}{\frac{d}{D}}} \cdot 4\right)\right)\right)\right)\right)\right) \]
    12. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \left(\frac{1 \cdot 4}{\frac{M}{\frac{d}{D}}}\right)\right)\right)\right)\right)\right) \]
    13. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \left(\frac{4}{\frac{M}{\frac{d}{D}}}\right)\right)\right)\right)\right)\right) \]
    14. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(4, \left(\frac{M}{\frac{d}{D}}\right)\right)\right)\right)\right)\right)\right) \]
    15. associate-/r/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(4, \left(\frac{M}{d} \cdot D\right)\right)\right)\right)\right)\right)\right) \]
    16. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(4, \left(\frac{M \cdot D}{d}\right)\right)\right)\right)\right)\right)\right) \]
    17. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(4, \mathsf{/.f64}\left(\left(M \cdot D\right), d\right)\right)\right)\right)\right)\right)\right) \]
    18. *-lowering-*.f6488.1%

      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right), h\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, D\right), d\right)\right)\right)\right)\right)\right)\right) \]
  10. Applied egg-rr88.1%

    \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{M \cdot D}{d} \cdot h}{\ell \cdot \frac{4}{\frac{M \cdot D}{d}}}}} \]
  11. Add Preprocessing

Alternative 2: 83.6% accurate, 1.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \mathbf{if}\;\ell \leq -1.2 \cdot 10^{-94}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{-64}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (let* ((t_0
         (*
          w0
          (sqrt
           (+ 1.0 (/ (* (* M h) (/ (/ M (/ d D)) -4.0)) (* l (/ d D))))))))
   (if (<= l -1.2e-94)
     t_0
     (if (<= l 5e-64)
       (*
        w0
        (sqrt (+ 1.0 (/ (* h (/ (/ (* M (* M D)) (* d -4.0)) (/ d D))) l))))
       t_0))))
double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
	double tmp;
	if (l <= -1.2e-94) {
		tmp = t_0;
	} else if (l <= 5e-64) {
		tmp = w0 * sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
real(8) function code(w0, m, d, h, l, d_1)
    real(8), intent (in) :: w0
    real(8), intent (in) :: m
    real(8), intent (in) :: d
    real(8), intent (in) :: h
    real(8), intent (in) :: l
    real(8), intent (in) :: d_1
    real(8) :: t_0
    real(8) :: tmp
    t_0 = w0 * sqrt((1.0d0 + (((m * h) * ((m / (d_1 / d)) / (-4.0d0))) / (l * (d_1 / d)))))
    if (l <= (-1.2d-94)) then
        tmp = t_0
    else if (l <= 5d-64) then
        tmp = w0 * sqrt((1.0d0 + ((h * (((m * (m * d)) / (d_1 * (-4.0d0))) / (d_1 / d))) / l)))
    else
        tmp = t_0
    end if
    code = tmp
end function
public static double code(double w0, double M, double D, double h, double l, double d) {
	double t_0 = w0 * Math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
	double tmp;
	if (l <= -1.2e-94) {
		tmp = t_0;
	} else if (l <= 5e-64) {
		tmp = w0 * Math.sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
	} else {
		tmp = t_0;
	}
	return tmp;
}
def code(w0, M, D, h, l, d):
	t_0 = w0 * math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))))
	tmp = 0
	if l <= -1.2e-94:
		tmp = t_0
	elif l <= 5e-64:
		tmp = w0 * math.sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)))
	else:
		tmp = t_0
	return tmp
function code(w0, M, D, h, l, d)
	t_0 = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(M * h) * Float64(Float64(M / Float64(d / D)) / -4.0)) / Float64(l * Float64(d / D))))))
	tmp = 0.0
	if (l <= -1.2e-94)
		tmp = t_0;
	elseif (l <= 5e-64)
		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(h * Float64(Float64(Float64(M * Float64(M * D)) / Float64(d * -4.0)) / Float64(d / D))) / l))));
	else
		tmp = t_0;
	end
	return tmp
end
function tmp_2 = code(w0, M, D, h, l, d)
	t_0 = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
	tmp = 0.0;
	if (l <= -1.2e-94)
		tmp = t_0;
	elseif (l <= 5e-64)
		tmp = w0 * sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
	else
		tmp = t_0;
	end
	tmp_2 = tmp;
end
code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(M * h), $MachinePrecision] * N[(N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -1.2e-94], t$95$0, If[LessEqual[l, 5e-64], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(h * N[(N[(N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d * -4.0), $MachinePrecision]), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\
\mathbf{if}\;\ell \leq -1.2 \cdot 10^{-94}:\\
\;\;\;\;t\_0\\

\mathbf{elif}\;\ell \leq 5 \cdot 10^{-64}:\\
\;\;\;\;w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -1.2e-94 or 5.00000000000000033e-64 < l

    1. Initial program 85.9%

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
    2. Simplified81.1%

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      17. /-lowering-/.f6482.2%

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
    5. Applied egg-rr82.2%

      \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
    6. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}\right)\right)\right)\right) \]
      2. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\ell \cdot \frac{d}{D}}\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      4. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot \frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(h \cdot M\right) \cdot \frac{D \cdot M}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      8. associate-/r*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{D \cdot M}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M \cdot D}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      10. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{d} \cdot D}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      11. associate-/r/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{\frac{d}{D}}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      13. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
      15. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{d}{D}\right)\right)\right)\right)\right)\right) \]
      16. /-lowering-/.f6487.6%

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(d, D\right)\right)\right)\right)\right)\right) \]
    7. Applied egg-rr87.6%

      \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{\left(h \cdot M\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}} \]

    if -1.2e-94 < l < 5.00000000000000033e-64

    1. Initial program 70.2%

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
    2. Simplified65.9%

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
      2. associate-*l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
      6. associate-/l*N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
      7. clear-numN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
      8. un-div-invN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      10. associate-/l/N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      14. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      15. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      16. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
      17. /-lowering-/.f6476.0%

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
    5. Applied egg-rr76.0%

      \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification83.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.2 \cdot 10^{-94}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{-64}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 66.2% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 3.6 \cdot 10^{-159}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 4.8 \cdot 10^{+76}:\\ \;\;\;\;\mathsf{fma}\left(D, w0 \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}\\ \end{array} \end{array} \]
(FPCore (w0 M D h l d)
 :precision binary64
 (if (<= M 3.6e-159)
   w0
   (if (<= M 4.8e+76)
     (fma D (* w0 (/ D (/ (/ (* d (* d l)) h) (* M (* M -0.125))))) w0)
     (* w0 (sqrt (/ (* D (/ (* h (* -0.25 (* M M))) d)) (/ l (/ D d))))))))
double code(double w0, double M, double D, double h, double l, double d) {
	double tmp;
	if (M <= 3.6e-159) {
		tmp = w0;
	} else if (M <= 4.8e+76) {
		tmp = fma(D, (w0 * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))), w0);
	} else {
		tmp = w0 * sqrt(((D * ((h * (-0.25 * (M * M))) / d)) / (l / (D / d))));
	}
	return tmp;
}
function code(w0, M, D, h, l, d)
	tmp = 0.0
	if (M <= 3.6e-159)
		tmp = w0;
	elseif (M <= 4.8e+76)
		tmp = fma(D, Float64(w0 * Float64(D / Float64(Float64(Float64(d * Float64(d * l)) / h) / Float64(M * Float64(M * -0.125))))), w0);
	else
		tmp = Float64(w0 * sqrt(Float64(Float64(D * Float64(Float64(h * Float64(-0.25 * Float64(M * M))) / d)) / Float64(l / Float64(D / d)))));
	end
	return tmp
end
code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 3.6e-159], w0, If[LessEqual[M, 4.8e+76], N[(D * N[(w0 * N[(D / N[(N[(N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision] / N[(M * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + w0), $MachinePrecision], N[(w0 * N[Sqrt[N[(N[(D * N[(N[(h * N[(-0.25 * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / N[(l / N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;M \leq 3.6 \cdot 10^{-159}:\\
\;\;\;\;w0\\

\mathbf{elif}\;M \leq 4.8 \cdot 10^{+76}:\\
\;\;\;\;\mathsf{fma}\left(D, w0 \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}, w0\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if M < 3.60000000000000021e-159

    1. Initial program 84.8%

      \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
    2. Simplified79.6%

      \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
    3. Add Preprocessing
    4. Taylor expanded in h around 0

      \[\leadsto \color{blue}{w0} \]
    5. Step-by-step derivation
      1. Simplified70.6%

        \[\leadsto \color{blue}{w0} \]

      if 3.60000000000000021e-159 < M < 4.8e76

      1. Initial program 76.7%

        \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
      2. Simplified76.5%

        \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
      3. Add Preprocessing
      4. Taylor expanded in h around 0

        \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
      5. Step-by-step derivation
        1. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
        2. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
        3. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
        6. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
        7. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
        9. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
        10. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
        11. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
        15. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
        17. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
        18. *-lowering-*.f6460.7%

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
      6. Simplified60.7%

        \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
      7. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto w0 \cdot \left(\left(D \cdot D\right) \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell} + \color{blue}{1}\right) \]
        2. distribute-rgt-inN/A

          \[\leadsto \left(\left(D \cdot D\right) \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot w0 + \color{blue}{1 \cdot w0} \]
        3. associate-*l*N/A

          \[\leadsto \left(D \cdot \left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)\right) \cdot w0 + 1 \cdot w0 \]
        4. associate-*l*N/A

          \[\leadsto D \cdot \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot w0\right) + \color{blue}{1} \cdot w0 \]
        5. *-lft-identityN/A

          \[\leadsto D \cdot \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot w0\right) + w0 \]
        6. fma-defineN/A

          \[\leadsto \mathsf{fma}\left(D, \color{blue}{\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot w0}, w0\right) \]
        7. fma-lowering-fma.f64N/A

          \[\leadsto \mathsf{fma.f64}\left(D, \color{blue}{\left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot w0\right)}, w0\right) \]
      8. Applied egg-rr69.5%

        \[\leadsto \color{blue}{\mathsf{fma}\left(D, \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}} \cdot w0, w0\right)} \]

      if 4.8e76 < M

      1. Initial program 70.7%

        \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
      2. Simplified62.0%

        \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
      3. Add Preprocessing
      4. Taylor expanded in h around inf

        \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
      5. Step-by-step derivation
        1. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{-1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
        2. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        3. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{4} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        4. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{-1}{4} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{4} \cdot \left({M}^{2} \cdot h\right)\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        6. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{-1}{4} \cdot {M}^{2}\right) \cdot h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{4} \cdot {M}^{2}\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({M}^{2}\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        9. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(M \cdot M\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        10. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        11. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left(D \cdot D\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
        13. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \ell\right)\right)\right)\right) \]
        14. unpow2N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right) \]
        15. *-lowering-*.f6431.5%

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right) \]
      6. Simplified31.5%

        \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{\left(\left(-0.25 \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell}}} \]
      7. Step-by-step derivation
        1. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right) \cdot D}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
        2. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right) \cdot D}{d \cdot \left(d \cdot \ell\right)}\right)\right)\right) \]
        3. times-fracN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D}{d} \cdot \frac{D}{d \cdot \ell}\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D}{d}\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        5. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        6. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        8. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        9. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\left(\frac{-1}{4} \cdot M\right) \cdot M\right)\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        10. associate-*r*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(h \cdot \left(\frac{-1}{4} \cdot M\right)\right) \cdot M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(h \cdot \left(\frac{-1}{4} \cdot M\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{-1}{4} \cdot M\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot \frac{-1}{4}\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
        15. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \mathsf{/.f64}\left(D, \left(d \cdot \ell\right)\right)\right)\right)\right) \]
        16. *-lowering-*.f6434.8%

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right) \]
      8. Applied egg-rr34.8%

        \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{D \cdot \left(\left(h \cdot \left(M \cdot -0.25\right)\right) \cdot M\right)}{d} \cdot \frac{D}{d \cdot \ell}}} \]
      9. Step-by-step derivation
        1. clear-numN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d} \cdot \frac{1}{\frac{d \cdot \ell}{D}}\right)\right)\right) \]
        2. un-div-invN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d}}{\frac{d \cdot \ell}{D}}\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d}\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        4. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M}{d}\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        5. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M}{d}\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        6. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        7. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(h \cdot \left(\left(M \cdot \frac{-1}{4}\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        8. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\left(M \cdot \frac{-1}{4}\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        9. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\left(\frac{-1}{4} \cdot M\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        10. associate-*l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        11. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \left(M \cdot M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{\ell \cdot d}{D}\right)\right)\right)\right) \]
        14. associate-*r/N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right) \]
        15. clear-numN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\ell \cdot \frac{1}{\frac{D}{d}}\right)\right)\right)\right) \]
        16. un-div-invN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{\ell}{\frac{D}{d}}\right)\right)\right)\right) \]
        17. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \mathsf{/.f64}\left(\ell, \left(\frac{D}{d}\right)\right)\right)\right)\right) \]
        18. /-lowering-/.f6436.6%

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(D, d\right)\right)\right)\right)\right) \]
      10. Applied egg-rr36.6%

        \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}} \]
    6. Recombined 3 regimes into one program.
    7. Final simplification64.2%

      \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 3.6 \cdot 10^{-159}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 4.8 \cdot 10^{+76}:\\ \;\;\;\;\mathsf{fma}\left(D, w0 \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}, w0\right)\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}\\ \end{array} \]
    8. Add Preprocessing

    Alternative 4: 66.3% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 1.6 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 6 \cdot 10^{+79}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}\\ \end{array} \end{array} \]
    (FPCore (w0 M D h l d)
     :precision binary64
     (if (<= M 1.6e-155)
       w0
       (if (<= M 6e+79)
         (* w0 (+ 1.0 (* D (/ D (/ (/ (* d (* d l)) h) (* M (* M -0.125)))))))
         (* w0 (sqrt (/ (* D (/ (* h (* -0.25 (* M M))) d)) (/ l (/ D d))))))))
    double code(double w0, double M, double D, double h, double l, double d) {
    	double tmp;
    	if (M <= 1.6e-155) {
    		tmp = w0;
    	} else if (M <= 6e+79) {
    		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
    	} else {
    		tmp = w0 * sqrt(((D * ((h * (-0.25 * (M * M))) / d)) / (l / (D / d))));
    	}
    	return tmp;
    }
    
    real(8) function code(w0, m, d, h, l, d_1)
        real(8), intent (in) :: w0
        real(8), intent (in) :: m
        real(8), intent (in) :: d
        real(8), intent (in) :: h
        real(8), intent (in) :: l
        real(8), intent (in) :: d_1
        real(8) :: tmp
        if (m <= 1.6d-155) then
            tmp = w0
        else if (m <= 6d+79) then
            tmp = w0 * (1.0d0 + (d * (d / (((d_1 * (d_1 * l)) / h) / (m * (m * (-0.125d0)))))))
        else
            tmp = w0 * sqrt(((d * ((h * ((-0.25d0) * (m * m))) / d_1)) / (l / (d / d_1))))
        end if
        code = tmp
    end function
    
    public static double code(double w0, double M, double D, double h, double l, double d) {
    	double tmp;
    	if (M <= 1.6e-155) {
    		tmp = w0;
    	} else if (M <= 6e+79) {
    		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
    	} else {
    		tmp = w0 * Math.sqrt(((D * ((h * (-0.25 * (M * M))) / d)) / (l / (D / d))));
    	}
    	return tmp;
    }
    
    def code(w0, M, D, h, l, d):
    	tmp = 0
    	if M <= 1.6e-155:
    		tmp = w0
    	elif M <= 6e+79:
    		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))))
    	else:
    		tmp = w0 * math.sqrt(((D * ((h * (-0.25 * (M * M))) / d)) / (l / (D / d))))
    	return tmp
    
    function code(w0, M, D, h, l, d)
    	tmp = 0.0
    	if (M <= 1.6e-155)
    		tmp = w0;
    	elseif (M <= 6e+79)
    		tmp = Float64(w0 * Float64(1.0 + Float64(D * Float64(D / Float64(Float64(Float64(d * Float64(d * l)) / h) / Float64(M * Float64(M * -0.125)))))));
    	else
    		tmp = Float64(w0 * sqrt(Float64(Float64(D * Float64(Float64(h * Float64(-0.25 * Float64(M * M))) / d)) / Float64(l / Float64(D / d)))));
    	end
    	return tmp
    end
    
    function tmp_2 = code(w0, M, D, h, l, d)
    	tmp = 0.0;
    	if (M <= 1.6e-155)
    		tmp = w0;
    	elseif (M <= 6e+79)
    		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
    	else
    		tmp = w0 * sqrt(((D * ((h * (-0.25 * (M * M))) / d)) / (l / (D / d))));
    	end
    	tmp_2 = tmp;
    end
    
    code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 1.6e-155], w0, If[LessEqual[M, 6e+79], N[(w0 * N[(1.0 + N[(D * N[(D / N[(N[(N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision] / N[(M * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(N[(D * N[(N[(h * N[(-0.25 * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision] / N[(l / N[(D / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;M \leq 1.6 \cdot 10^{-155}:\\
    \;\;\;\;w0\\
    
    \mathbf{elif}\;M \leq 6 \cdot 10^{+79}:\\
    \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;w0 \cdot \sqrt{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if M < 1.60000000000000006e-155

      1. Initial program 84.8%

        \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
      2. Simplified79.6%

        \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
      3. Add Preprocessing
      4. Taylor expanded in h around 0

        \[\leadsto \color{blue}{w0} \]
      5. Step-by-step derivation
        1. Simplified70.6%

          \[\leadsto \color{blue}{w0} \]

        if 1.60000000000000006e-155 < M < 5.99999999999999948e79

        1. Initial program 77.4%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified77.2%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Taylor expanded in h around 0

          \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
        5. Step-by-step derivation
          1. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
          3. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
          7. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
          9. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
          11. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
          14. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
          17. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
          18. *-lowering-*.f6462.0%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
        6. Simplified62.0%

          \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
        7. Step-by-step derivation
          1. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(D \cdot \color{blue}{\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right)\right) \]
          2. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot \color{blue}{D}\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right), \color{blue}{D}\right)\right)\right) \]
        8. Applied egg-rr70.5%

          \[\leadsto w0 \cdot \left(1 + \color{blue}{\frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}} \cdot D}\right) \]

        if 5.99999999999999948e79 < M

        1. Initial program 69.3%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified60.3%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Taylor expanded in h around inf

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\color{blue}{\left(\frac{-1}{4} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
        5. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{-1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
          2. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{4} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          3. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{4} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          4. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(\frac{-1}{4} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{4} \cdot \left({M}^{2} \cdot h\right)\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          6. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{-1}{4} \cdot {M}^{2}\right) \cdot h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{4} \cdot {M}^{2}\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left({M}^{2}\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          9. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \left(M \cdot M\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          11. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left(D \cdot D\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
          13. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \ell\right)\right)\right)\right) \]
          14. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right) \]
          15. *-lowering-*.f6430.5%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right) \]
        6. Simplified30.5%

          \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{\left(\left(-0.25 \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell}}} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right) \cdot D}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
          2. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right) \cdot D}{d \cdot \left(d \cdot \ell\right)}\right)\right)\right) \]
          3. times-fracN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D}{d} \cdot \frac{D}{d \cdot \ell}\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\frac{\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D}{d}\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right) \cdot D\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          6. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right) \cdot h\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right)\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          9. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(h \cdot \left(\left(\frac{-1}{4} \cdot M\right) \cdot M\right)\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          10. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\left(h \cdot \left(\frac{-1}{4} \cdot M\right)\right) \cdot M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(h \cdot \left(\frac{-1}{4} \cdot M\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{-1}{4} \cdot M\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \left(M \cdot \frac{-1}{4}\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \left(\frac{D}{d \cdot \ell}\right)\right)\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \mathsf{/.f64}\left(D, \left(d \cdot \ell\right)\right)\right)\right)\right) \]
          16. *-lowering-*.f6434.0%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(M, \frac{-1}{4}\right)\right), M\right)\right), d\right), \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \ell\right)\right)\right)\right)\right) \]
        8. Applied egg-rr34.0%

          \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{D \cdot \left(\left(h \cdot \left(M \cdot -0.25\right)\right) \cdot M\right)}{d} \cdot \frac{D}{d \cdot \ell}}} \]
        9. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d} \cdot \frac{1}{\frac{d \cdot \ell}{D}}\right)\right)\right) \]
          2. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\left(\frac{\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d}}{\frac{d \cdot \ell}{D}}\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\frac{D \cdot \left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right)}{d}\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M}{d}\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \left(\frac{\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M}{d}\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\left(h \cdot \left(M \cdot \frac{-1}{4}\right)\right) \cdot M\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          7. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(h \cdot \left(\left(M \cdot \frac{-1}{4}\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          8. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\left(M \cdot \frac{-1}{4}\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\left(\frac{-1}{4} \cdot M\right) \cdot M\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          10. associate-*l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{-1}{4} \cdot \left(M \cdot M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          11. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \left(M \cdot M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{d \cdot \ell}{D}\right)\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{\ell \cdot d}{D}\right)\right)\right)\right) \]
          14. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right) \]
          15. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\ell \cdot \frac{1}{\frac{D}{d}}\right)\right)\right)\right) \]
          16. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \left(\frac{\ell}{\frac{D}{d}}\right)\right)\right)\right) \]
          17. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \mathsf{/.f64}\left(\ell, \left(\frac{D}{d}\right)\right)\right)\right)\right) \]
          18. /-lowering-/.f6435.9%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{*.f64}\left(\frac{-1}{4}, \mathsf{*.f64}\left(M, M\right)\right)\right), d\right)\right), \mathsf{/.f64}\left(\ell, \mathsf{/.f64}\left(D, d\right)\right)\right)\right)\right) \]
        10. Applied egg-rr35.9%

          \[\leadsto w0 \cdot \sqrt{\color{blue}{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}} \]
      6. Recombined 3 regimes into one program.
      7. Final simplification64.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 1.6 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 6 \cdot 10^{+79}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{\frac{D \cdot \frac{h \cdot \left(-0.25 \cdot \left(M \cdot M\right)\right)}{d}}{\frac{\ell}{\frac{D}{d}}}}\\ \end{array} \]
      8. Add Preprocessing

      Alternative 5: 87.8% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := \frac{M}{\frac{d}{D}}\\ \mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+84}:\\ \;\;\;\;w0 \cdot \sqrt{1 - h \cdot \frac{\frac{t\_0 \cdot t\_0}{4}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\ \end{array} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (let* ((t_0 (/ M (/ d D))))
         (if (<= (/ h l) -5e+84)
           (* w0 (sqrt (- 1.0 (* h (/ (/ (* t_0 t_0) 4.0) l)))))
           (*
            w0
            (sqrt (- 1.0 (* (/ M d) (/ D (/ (* 4.0 (* l (/ (/ d D) M))) h)))))))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	double t_0 = M / (d / D);
      	double tmp;
      	if ((h / l) <= -5e+84) {
      		tmp = w0 * sqrt((1.0 - (h * (((t_0 * t_0) / 4.0) / l))));
      	} else {
      		tmp = w0 * sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	}
      	return tmp;
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          real(8) :: t_0
          real(8) :: tmp
          t_0 = m / (d_1 / d)
          if ((h / l) <= (-5d+84)) then
              tmp = w0 * sqrt((1.0d0 - (h * (((t_0 * t_0) / 4.0d0) / l))))
          else
              tmp = w0 * sqrt((1.0d0 - ((m / d_1) * (d / ((4.0d0 * (l * ((d_1 / d) / m))) / h)))))
          end if
          code = tmp
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	double t_0 = M / (d / D);
      	double tmp;
      	if ((h / l) <= -5e+84) {
      		tmp = w0 * Math.sqrt((1.0 - (h * (((t_0 * t_0) / 4.0) / l))));
      	} else {
      		tmp = w0 * Math.sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	}
      	return tmp;
      }
      
      def code(w0, M, D, h, l, d):
      	t_0 = M / (d / D)
      	tmp = 0
      	if (h / l) <= -5e+84:
      		tmp = w0 * math.sqrt((1.0 - (h * (((t_0 * t_0) / 4.0) / l))))
      	else:
      		tmp = w0 * math.sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))))
      	return tmp
      
      function code(w0, M, D, h, l, d)
      	t_0 = Float64(M / Float64(d / D))
      	tmp = 0.0
      	if (Float64(h / l) <= -5e+84)
      		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(h * Float64(Float64(Float64(t_0 * t_0) / 4.0) / l)))));
      	else
      		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M / d) * Float64(D / Float64(Float64(4.0 * Float64(l * Float64(Float64(d / D) / M))) / h))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w0, M, D, h, l, d)
      	t_0 = M / (d / D);
      	tmp = 0.0;
      	if ((h / l) <= -5e+84)
      		tmp = w0 * sqrt((1.0 - (h * (((t_0 * t_0) / 4.0) / l))));
      	else
      		tmp = w0 * sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[w0_, M_, D_, h_, l_, d_] := Block[{t$95$0 = N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(h / l), $MachinePrecision], -5e+84], N[(w0 * N[Sqrt[N[(1.0 - N[(h * N[(N[(N[(t$95$0 * t$95$0), $MachinePrecision] / 4.0), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M / d), $MachinePrecision] * N[(D / N[(N[(4.0 * N[(l * N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := \frac{M}{\frac{d}{D}}\\
      \mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+84}:\\
      \;\;\;\;w0 \cdot \sqrt{1 - h \cdot \frac{\frac{t\_0 \cdot t\_0}{4}}{\ell}}\\
      
      \mathbf{else}:\\
      \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 h l) < -5.0000000000000001e84

        1. Initial program 65.6%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          2. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          4. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
          5. times-fracN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          9. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          11. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          12. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          13. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
        4. Applied egg-rr73.4%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
        5. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}\right)\right)\right)\right) \]
          2. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\left(\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{M}{\frac{d}{D}}}{2}\right) \cdot \frac{1}{\frac{1}{h}}\right)\right)\right)\right) \]
          3. remove-double-divN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\left(\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{M}{\frac{d}{D}}}{2}\right) \cdot h\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{M}{\frac{d}{D}}}{2}\right), h\right)\right)\right)\right) \]
        6. Applied egg-rr72.1%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}}{4}}{\ell} \cdot h}} \]

        if -5.0000000000000001e84 < (/.f64 h l)

        1. Initial program 85.2%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          2. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          4. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
          5. times-fracN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          9. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          11. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          12. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          13. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
        4. Applied egg-rr93.4%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
        5. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{M}{\frac{d}{D}}}{\frac{1}{h} \cdot 2}\right)\right)\right)\right) \]
          3. frac-timesN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          4. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          5. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{*.f64}\left(\left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}\right), \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
        6. Applied egg-rr93.9%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{M}{\frac{d}{D}}}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{0.5} \cdot \frac{2}{h}}}} \]
        7. Step-by-step derivation
          1. associate-/r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{d} \cdot D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{M}{d} \cdot \frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \left(\frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}\right)\right)\right)\right)\right)\right) \]
          6. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \left(\frac{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2}{h}\right)\right)\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2\right), h\right)\right)\right)\right)\right)\right) \]
        8. Applied egg-rr92.5%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{M}{d} \cdot \frac{D}{\frac{\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4}{h}}}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification87.4%

        \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{h}{\ell} \leq -5 \cdot 10^{+84}:\\ \;\;\;\;w0 \cdot \sqrt{1 - h \cdot \frac{\frac{\frac{M}{\frac{d}{D}} \cdot \frac{M}{\frac{d}{D}}}{4}}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 6: 85.8% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 3 \cdot 10^{+23}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (if (<= d 3e+23)
         (* w0 (sqrt (- 1.0 (* (/ M d) (/ D (/ (* 4.0 (* l (/ (/ d D) M))) h))))))
         (* w0 (sqrt (+ 1.0 (/ (* (* M h) (/ (/ M (/ d D)) -4.0)) (* l (/ d D))))))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 3e+23) {
      		tmp = w0 * sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	} else {
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          real(8) :: tmp
          if (d_1 <= 3d+23) then
              tmp = w0 * sqrt((1.0d0 - ((m / d_1) * (d / ((4.0d0 * (l * ((d_1 / d) / m))) / h)))))
          else
              tmp = w0 * sqrt((1.0d0 + (((m * h) * ((m / (d_1 / d)) / (-4.0d0))) / (l * (d_1 / d)))))
          end if
          code = tmp
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 3e+23) {
      		tmp = w0 * Math.sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	} else {
      		tmp = w0 * Math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      def code(w0, M, D, h, l, d):
      	tmp = 0
      	if d <= 3e+23:
      		tmp = w0 * math.sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))))
      	else:
      		tmp = w0 * math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))))
      	return tmp
      
      function code(w0, M, D, h, l, d)
      	tmp = 0.0
      	if (d <= 3e+23)
      		tmp = Float64(w0 * sqrt(Float64(1.0 - Float64(Float64(M / d) * Float64(D / Float64(Float64(4.0 * Float64(l * Float64(Float64(d / D) / M))) / h))))));
      	else
      		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(M * h) * Float64(Float64(M / Float64(d / D)) / -4.0)) / Float64(l * Float64(d / D))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w0, M, D, h, l, d)
      	tmp = 0.0;
      	if (d <= 3e+23)
      		tmp = w0 * sqrt((1.0 - ((M / d) * (D / ((4.0 * (l * ((d / D) / M))) / h)))));
      	else
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 3e+23], N[(w0 * N[Sqrt[N[(1.0 - N[(N[(M / d), $MachinePrecision] * N[(D / N[(N[(4.0 * N[(l * N[(N[(d / D), $MachinePrecision] / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(M * h), $MachinePrecision] * N[(N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;d \leq 3 \cdot 10^{+23}:\\
      \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\
      
      \mathbf{else}:\\
      \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if d < 3.0000000000000001e23

        1. Initial program 80.2%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          2. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          3. unpow2N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
          4. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
          5. times-fracN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          8. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          9. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          11. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          12. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          13. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
        4. Applied egg-rr87.6%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
        5. Step-by-step derivation
          1. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}} \cdot \frac{\frac{M}{\frac{d}{D}}}{\frac{1}{h} \cdot 2}\right)\right)\right)\right) \]
          3. frac-timesN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          4. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{1 \cdot \frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          5. div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{1}{\frac{\frac{d}{D}}{M}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          6. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{\frac{d}{D}}}{\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)}\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          8. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}} \cdot \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
          10. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), \mathsf{*.f64}\left(\left(\frac{\ell}{\frac{\frac{M}{\frac{d}{D}}}{2}}\right), \left(\frac{1}{h} \cdot 2\right)\right)\right)\right)\right)\right) \]
        6. Applied egg-rr88.2%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{M}{\frac{d}{D}}}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{0.5} \cdot \frac{2}{h}}}} \]
        7. Step-by-step derivation
          1. associate-/r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M}{d} \cdot D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{M}{d} \cdot \frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{M}{d}\right), \left(\frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right)\right) \]
          4. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \left(\frac{D}{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}}\right)\right)\right)\right)\right) \]
          5. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot \frac{2}{h}\right)\right)\right)\right)\right)\right) \]
          6. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \left(\frac{\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2}{h}\right)\right)\right)\right)\right)\right) \]
          7. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(M, d\right), \mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\left(\frac{\frac{\ell}{\frac{M}{\frac{d}{D}}}}{\frac{1}{2}} \cdot 2\right), h\right)\right)\right)\right)\right)\right) \]
        8. Applied egg-rr85.6%

          \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{M}{d} \cdot \frac{D}{\frac{\left(\ell \cdot \frac{\frac{d}{D}}{M}\right) \cdot 4}{h}}}} \]

        if 3.0000000000000001e23 < d

        1. Initial program 80.7%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified75.1%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
          2. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          6. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          8. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          10. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          17. /-lowering-/.f6482.2%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
        5. Applied egg-rr82.2%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
        6. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\ell \cdot \frac{d}{D}}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot \frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(h \cdot M\right) \cdot \frac{D \cdot M}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          8. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{D \cdot M}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M \cdot D}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          10. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{d} \cdot D}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          11. associate-/r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{\frac{d}{D}}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{d}{D}\right)\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f6483.4%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(d, D\right)\right)\right)\right)\right)\right) \]
        7. Applied egg-rr83.4%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{\left(h \cdot M\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification85.0%

        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 3 \cdot 10^{+23}:\\ \;\;\;\;w0 \cdot \sqrt{1 - \frac{M}{d} \cdot \frac{D}{\frac{4 \cdot \left(\ell \cdot \frac{\frac{d}{D}}{M}\right)}{h}}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 7: 81.0% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 9.4 \cdot 10^{-33}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{D}{\frac{\ell}{h}}}{-4} \cdot \frac{M}{\frac{d}{M \cdot D}}}{d}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (if (<= d 9.4e-33)
         (* w0 (sqrt (+ 1.0 (/ (* (/ (/ D (/ l h)) -4.0) (/ M (/ d (* M D)))) d))))
         (* w0 (sqrt (+ 1.0 (/ (* (* M h) (/ (/ M (/ d D)) -4.0)) (* l (/ d D))))))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 9.4e-33) {
      		tmp = w0 * sqrt((1.0 + ((((D / (l / h)) / -4.0) * (M / (d / (M * D)))) / d)));
      	} else {
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          real(8) :: tmp
          if (d_1 <= 9.4d-33) then
              tmp = w0 * sqrt((1.0d0 + ((((d / (l / h)) / (-4.0d0)) * (m / (d_1 / (m * d)))) / d_1)))
          else
              tmp = w0 * sqrt((1.0d0 + (((m * h) * ((m / (d_1 / d)) / (-4.0d0))) / (l * (d_1 / d)))))
          end if
          code = tmp
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 9.4e-33) {
      		tmp = w0 * Math.sqrt((1.0 + ((((D / (l / h)) / -4.0) * (M / (d / (M * D)))) / d)));
      	} else {
      		tmp = w0 * Math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      def code(w0, M, D, h, l, d):
      	tmp = 0
      	if d <= 9.4e-33:
      		tmp = w0 * math.sqrt((1.0 + ((((D / (l / h)) / -4.0) * (M / (d / (M * D)))) / d)))
      	else:
      		tmp = w0 * math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))))
      	return tmp
      
      function code(w0, M, D, h, l, d)
      	tmp = 0.0
      	if (d <= 9.4e-33)
      		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(Float64(D / Float64(l / h)) / -4.0) * Float64(M / Float64(d / Float64(M * D)))) / d))));
      	else
      		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(M * h) * Float64(Float64(M / Float64(d / D)) / -4.0)) / Float64(l * Float64(d / D))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w0, M, D, h, l, d)
      	tmp = 0.0;
      	if (d <= 9.4e-33)
      		tmp = w0 * sqrt((1.0 + ((((D / (l / h)) / -4.0) * (M / (d / (M * D)))) / d)));
      	else
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 9.4e-33], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(N[(D / N[(l / h), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision] * N[(M / N[(d / N[(M * D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(M * h), $MachinePrecision] * N[(N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;d \leq 9.4 \cdot 10^{-33}:\\
      \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{D}{\frac{\ell}{h}}}{-4} \cdot \frac{M}{\frac{d}{M \cdot D}}}{d}}\\
      
      \mathbf{else}:\\
      \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if d < 9.4000000000000004e-33

        1. Initial program 79.9%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified76.0%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\frac{h}{\ell} \cdot D\right) \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), d\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(\frac{h}{\ell} \cdot D\right) \cdot \frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), d\right)\right)\right)\right) \]
          3. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\left(\frac{h}{\ell} \cdot D\right) \cdot \left(M \cdot \left(M \cdot D\right)\right)}{-4 \cdot d}\right), d\right)\right)\right)\right) \]
          4. times-fracN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{\frac{h}{\ell} \cdot D}{-4} \cdot \frac{M \cdot \left(M \cdot D\right)}{d}\right), d\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{h}{\ell} \cdot D}{-4}\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          6. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{h}{\ell} \cdot D\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          7. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{h}{\ell}\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          8. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(D \cdot \frac{1}{\frac{\ell}{h}}\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          9. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{D}{\frac{\ell}{h}}\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          10. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \left(\frac{\ell}{h}\right)\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \left(\frac{M \cdot \left(M \cdot D\right)}{d}\right)\right), d\right)\right)\right)\right) \]
          12. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \left(M \cdot \frac{M \cdot D}{d}\right)\right), d\right)\right)\right)\right) \]
          13. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \left(M \cdot \frac{1}{\frac{d}{M \cdot D}}\right)\right), d\right)\right)\right)\right) \]
          14. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \left(\frac{M}{\frac{d}{M \cdot D}}\right)\right), d\right)\right)\right)\right) \]
          15. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \mathsf{/.f64}\left(M, \left(\frac{d}{M \cdot D}\right)\right)\right), d\right)\right)\right)\right) \]
          16. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, \left(M \cdot D\right)\right)\right)\right), d\right)\right)\right)\right) \]
          17. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, \left(D \cdot M\right)\right)\right)\right), d\right)\right)\right)\right) \]
          18. *-lowering-*.f6479.5%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(D, \mathsf{/.f64}\left(\ell, h\right)\right), -4\right), \mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, \mathsf{*.f64}\left(D, M\right)\right)\right)\right), d\right)\right)\right)\right) \]
        5. Applied egg-rr79.5%

          \[\leadsto w0 \cdot \sqrt{1 + \frac{\color{blue}{\frac{\frac{D}{\frac{\ell}{h}}}{-4} \cdot \frac{M}{\frac{d}{D \cdot M}}}}{d}} \]

        if 9.4000000000000004e-33 < d

        1. Initial program 81.2%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified74.9%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
          2. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          6. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          8. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          10. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          17. /-lowering-/.f6481.4%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
        5. Applied egg-rr81.4%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
        6. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\ell \cdot \frac{d}{D}}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot \frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(h \cdot M\right) \cdot \frac{D \cdot M}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          8. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{D \cdot M}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M \cdot D}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          10. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{d} \cdot D}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          11. associate-/r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{\frac{d}{D}}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{d}{D}\right)\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f6483.6%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(d, D\right)\right)\right)\right)\right)\right) \]
        7. Applied egg-rr83.6%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{\left(h \cdot M\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification80.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 9.4 \cdot 10^{-33}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{\frac{D}{\frac{\ell}{h}}}{-4} \cdot \frac{M}{\frac{d}{M \cdot D}}}{d}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 8: 81.2% accurate, 1.7× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 5.6 \cdot 10^{-33}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot D\right)}{-4}\right)}{d}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (if (<= d 5.6e-33)
         (* w0 (sqrt (+ 1.0 (/ (* (/ h l) (* D (/ (* (/ M d) (* M D)) -4.0))) d))))
         (* w0 (sqrt (+ 1.0 (/ (* (* M h) (/ (/ M (/ d D)) -4.0)) (* l (/ d D))))))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 5.6e-33) {
      		tmp = w0 * sqrt((1.0 + (((h / l) * (D * (((M / d) * (M * D)) / -4.0))) / d)));
      	} else {
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          real(8) :: tmp
          if (d_1 <= 5.6d-33) then
              tmp = w0 * sqrt((1.0d0 + (((h / l) * (d * (((m / d_1) * (m * d)) / (-4.0d0)))) / d_1)))
          else
              tmp = w0 * sqrt((1.0d0 + (((m * h) * ((m / (d_1 / d)) / (-4.0d0))) / (l * (d_1 / d)))))
          end if
          code = tmp
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (d <= 5.6e-33) {
      		tmp = w0 * Math.sqrt((1.0 + (((h / l) * (D * (((M / d) * (M * D)) / -4.0))) / d)));
      	} else {
      		tmp = w0 * Math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	}
      	return tmp;
      }
      
      def code(w0, M, D, h, l, d):
      	tmp = 0
      	if d <= 5.6e-33:
      		tmp = w0 * math.sqrt((1.0 + (((h / l) * (D * (((M / d) * (M * D)) / -4.0))) / d)))
      	else:
      		tmp = w0 * math.sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))))
      	return tmp
      
      function code(w0, M, D, h, l, d)
      	tmp = 0.0
      	if (d <= 5.6e-33)
      		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(h / l) * Float64(D * Float64(Float64(Float64(M / d) * Float64(M * D)) / -4.0))) / d))));
      	else
      		tmp = Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(Float64(M * h) * Float64(Float64(M / Float64(d / D)) / -4.0)) / Float64(l * Float64(d / D))))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w0, M, D, h, l, d)
      	tmp = 0.0;
      	if (d <= 5.6e-33)
      		tmp = w0 * sqrt((1.0 + (((h / l) * (D * (((M / d) * (M * D)) / -4.0))) / d)));
      	else
      		tmp = w0 * sqrt((1.0 + (((M * h) * ((M / (d / D)) / -4.0)) / (l * (d / D)))));
      	end
      	tmp_2 = tmp;
      end
      
      code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 5.6e-33], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(h / l), $MachinePrecision] * N[(D * N[(N[(N[(M / d), $MachinePrecision] * N[(M * D), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(w0 * N[Sqrt[N[(1.0 + N[(N[(N[(M * h), $MachinePrecision] * N[(N[(M / N[(d / D), $MachinePrecision]), $MachinePrecision] / -4.0), $MachinePrecision]), $MachinePrecision] / N[(l * N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;d \leq 5.6 \cdot 10^{-33}:\\
      \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot D\right)}{-4}\right)}{d}}\\
      
      \mathbf{else}:\\
      \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if d < 5.6e-33

        1. Initial program 79.9%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified76.0%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\frac{\left(M \cdot D\right) \cdot M}{d}\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
          2. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\left(\left(M \cdot D\right) \cdot \frac{M}{d}\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
          3. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(M \cdot D\right), \left(\frac{M}{d}\right)\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
          4. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(D \cdot M\right), \left(\frac{M}{d}\right)\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
          5. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, M\right), \left(\frac{M}{d}\right)\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
          6. /-lowering-/.f6478.8%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(h, \ell\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(D, M\right), \mathsf{/.f64}\left(M, d\right)\right), -4\right)\right)\right), d\right)\right)\right)\right) \]
        5. Applied egg-rr78.8%

          \[\leadsto w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\color{blue}{\left(D \cdot M\right) \cdot \frac{M}{d}}}{-4}\right)}{d}} \]

        if 5.6e-33 < d

        1. Initial program 81.2%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified74.9%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
          2. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
          4. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
          5. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          6. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
          7. clear-numN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          8. un-div-invN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          10. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          11. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          12. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          13. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          14. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          15. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          16. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
          17. /-lowering-/.f6481.4%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
        5. Applied egg-rr81.4%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
        6. Step-by-step derivation
          1. associate-*r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}\right)\right)\right)\right) \]
          2. associate-/l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\ell \cdot \frac{d}{D}}\right)\right)\right)\right) \]
          3. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          4. associate-/l*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \left(M \cdot \frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          5. associate-*r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\left(h \cdot M\right) \cdot \frac{D \cdot M}{d \cdot -4}\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          6. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(h \cdot M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          7. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{D \cdot M}{d \cdot -4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          8. associate-/r*N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{D \cdot M}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          9. *-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M \cdot D}{d}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          10. associate-*l/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{d} \cdot D}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          11. associate-/r/N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \left(\frac{\frac{M}{\frac{d}{D}}}{-4}\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          12. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          13. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          14. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \left(\ell \cdot \frac{d}{D}\right)\right)\right)\right)\right) \]
          15. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \left(\frac{d}{D}\right)\right)\right)\right)\right)\right) \]
          16. /-lowering-/.f6483.6%

            \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(h, M\right), \mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), -4\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{/.f64}\left(d, D\right)\right)\right)\right)\right)\right) \]
        7. Applied egg-rr83.6%

          \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{\left(h \cdot M\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}} \]
      3. Recombined 2 regimes into one program.
      4. Final simplification80.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 5.6 \cdot 10^{-33}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M}{d} \cdot \left(M \cdot D\right)}{-4}\right)}{d}}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \sqrt{1 + \frac{\left(M \cdot h\right) \cdot \frac{\frac{M}{\frac{d}{D}}}{-4}}{\ell \cdot \frac{d}{D}}}\\ \end{array} \]
      5. Add Preprocessing

      Alternative 9: 80.1% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (* w0 (sqrt (+ 1.0 (/ (* h (/ (/ (* M (* M D)) (* d -4.0)) (/ d D))) l)))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	return w0 * sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          code = w0 * sqrt((1.0d0 + ((h * (((m * (m * d)) / (d_1 * (-4.0d0))) / (d_1 / d))) / l)))
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	return w0 * Math.sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
      }
      
      def code(w0, M, D, h, l, d):
      	return w0 * math.sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)))
      
      function code(w0, M, D, h, l, d)
      	return Float64(w0 * sqrt(Float64(1.0 + Float64(Float64(h * Float64(Float64(Float64(M * Float64(M * D)) / Float64(d * -4.0)) / Float64(d / D))) / l))))
      end
      
      function tmp = code(w0, M, D, h, l, d)
      	tmp = w0 * sqrt((1.0 + ((h * (((M * (M * D)) / (d * -4.0)) / (d / D))) / l)));
      end
      
      code[w0_, M_, D_, h_, l_, d_] := N[(w0 * N[Sqrt[N[(1.0 + N[(N[(h * N[(N[(N[(M * N[(M * D), $MachinePrecision]), $MachinePrecision] / N[(d * -4.0), $MachinePrecision]), $MachinePrecision] / N[(d / D), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / l), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
      
      \begin{array}{l}
      
      \\
      w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}
      \end{array}
      
      Derivation
      1. Initial program 80.3%

        \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
      2. Simplified75.7%

        \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
      3. Add Preprocessing
      4. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h}{\ell} \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right)\right)\right) \]
        2. associate-*l/N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \left(\frac{h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}}{\ell}\right)\right)\right)\right) \]
        3. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(h \cdot \frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right), \ell\right)\right)\right)\right) \]
        4. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{d}\right)\right), \ell\right)\right)\right)\right) \]
        5. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot D}{d}\right)\right), \ell\right)\right)\right)\right) \]
        6. associate-/l*N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{D}{d}\right)\right), \ell\right)\right)\right)\right) \]
        7. clear-numN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4} \cdot \frac{1}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
        8. un-div-invN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \left(\frac{\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}}{\frac{d}{D}}\right)\right), \ell\right)\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        10. associate-/l/N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\left(\frac{M \cdot \left(M \cdot D\right)}{-4 \cdot d}\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        11. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        12. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot D\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        13. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(D \cdot M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        14. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(-4 \cdot d\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        15. *-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \left(d \cdot -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        16. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \left(\frac{d}{D}\right)\right)\right), \ell\right)\right)\right)\right) \]
        17. /-lowering-/.f6480.0%

          \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(h, \mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(D, M\right)\right), \mathsf{*.f64}\left(d, -4\right)\right), \mathsf{/.f64}\left(d, D\right)\right)\right), \ell\right)\right)\right)\right) \]
      5. Applied egg-rr80.0%

        \[\leadsto w0 \cdot \sqrt{1 + \color{blue}{\frac{h \cdot \frac{\frac{M \cdot \left(D \cdot M\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}}} \]
      6. Final simplification80.0%

        \[\leadsto w0 \cdot \sqrt{1 + \frac{h \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d \cdot -4}}{\frac{d}{D}}}{\ell}} \]
      7. Add Preprocessing

      Alternative 10: 69.3% accurate, 7.0× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 1.7 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 2.15 \cdot 10^{+99}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;w0 + \left(D \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{\frac{d}{M}}\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0}{d}\right)\right)\\ \end{array} \end{array} \]
      (FPCore (w0 M D h l d)
       :precision binary64
       (if (<= M 1.7e-155)
         w0
         (if (<= M 2.15e+99)
           (* w0 (+ 1.0 (* D (/ D (/ (/ (* d (* d l)) h) (* M (* M -0.125)))))))
           (+ w0 (* (* D D) (* (* h (/ M (/ d M))) (* (/ -0.125 l) (/ w0 d))))))))
      double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (M <= 1.7e-155) {
      		tmp = w0;
      	} else if (M <= 2.15e+99) {
      		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
      	} else {
      		tmp = w0 + ((D * D) * ((h * (M / (d / M))) * ((-0.125 / l) * (w0 / d))));
      	}
      	return tmp;
      }
      
      real(8) function code(w0, m, d, h, l, d_1)
          real(8), intent (in) :: w0
          real(8), intent (in) :: m
          real(8), intent (in) :: d
          real(8), intent (in) :: h
          real(8), intent (in) :: l
          real(8), intent (in) :: d_1
          real(8) :: tmp
          if (m <= 1.7d-155) then
              tmp = w0
          else if (m <= 2.15d+99) then
              tmp = w0 * (1.0d0 + (d * (d / (((d_1 * (d_1 * l)) / h) / (m * (m * (-0.125d0)))))))
          else
              tmp = w0 + ((d * d) * ((h * (m / (d_1 / m))) * (((-0.125d0) / l) * (w0 / d_1))))
          end if
          code = tmp
      end function
      
      public static double code(double w0, double M, double D, double h, double l, double d) {
      	double tmp;
      	if (M <= 1.7e-155) {
      		tmp = w0;
      	} else if (M <= 2.15e+99) {
      		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
      	} else {
      		tmp = w0 + ((D * D) * ((h * (M / (d / M))) * ((-0.125 / l) * (w0 / d))));
      	}
      	return tmp;
      }
      
      def code(w0, M, D, h, l, d):
      	tmp = 0
      	if M <= 1.7e-155:
      		tmp = w0
      	elif M <= 2.15e+99:
      		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))))
      	else:
      		tmp = w0 + ((D * D) * ((h * (M / (d / M))) * ((-0.125 / l) * (w0 / d))))
      	return tmp
      
      function code(w0, M, D, h, l, d)
      	tmp = 0.0
      	if (M <= 1.7e-155)
      		tmp = w0;
      	elseif (M <= 2.15e+99)
      		tmp = Float64(w0 * Float64(1.0 + Float64(D * Float64(D / Float64(Float64(Float64(d * Float64(d * l)) / h) / Float64(M * Float64(M * -0.125)))))));
      	else
      		tmp = Float64(w0 + Float64(Float64(D * D) * Float64(Float64(h * Float64(M / Float64(d / M))) * Float64(Float64(-0.125 / l) * Float64(w0 / d)))));
      	end
      	return tmp
      end
      
      function tmp_2 = code(w0, M, D, h, l, d)
      	tmp = 0.0;
      	if (M <= 1.7e-155)
      		tmp = w0;
      	elseif (M <= 2.15e+99)
      		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
      	else
      		tmp = w0 + ((D * D) * ((h * (M / (d / M))) * ((-0.125 / l) * (w0 / d))));
      	end
      	tmp_2 = tmp;
      end
      
      code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 1.7e-155], w0, If[LessEqual[M, 2.15e+99], N[(w0 * N[(1.0 + N[(D * N[(D / N[(N[(N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision] / N[(M * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 + N[(N[(D * D), $MachinePrecision] * N[(N[(h * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.125 / l), $MachinePrecision] * N[(w0 / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      \mathbf{if}\;M \leq 1.7 \cdot 10^{-155}:\\
      \;\;\;\;w0\\
      
      \mathbf{elif}\;M \leq 2.15 \cdot 10^{+99}:\\
      \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;w0 + \left(D \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{\frac{d}{M}}\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0}{d}\right)\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if M < 1.7e-155

        1. Initial program 84.8%

          \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
        2. Simplified79.6%

          \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
        3. Add Preprocessing
        4. Taylor expanded in h around 0

          \[\leadsto \color{blue}{w0} \]
        5. Step-by-step derivation
          1. Simplified70.6%

            \[\leadsto \color{blue}{w0} \]

          if 1.7e-155 < M < 2.1500000000000001e99

          1. Initial program 78.1%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Simplified77.9%

            \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
          3. Add Preprocessing
          4. Taylor expanded in h around 0

            \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
          5. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
            11. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            14. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            16. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
            17. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
            18. *-lowering-*.f6463.1%

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
          6. Simplified63.1%

            \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
          7. Step-by-step derivation
            1. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(D \cdot \color{blue}{\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot \color{blue}{D}\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right), \color{blue}{D}\right)\right)\right) \]
          8. Applied egg-rr71.4%

            \[\leadsto w0 \cdot \left(1 + \color{blue}{\frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}} \cdot D}\right) \]

          if 2.1500000000000001e99 < M

          1. Initial program 67.9%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            2. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            4. div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
            5. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            9. associate-/r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            12. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            13. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr81.9%

            \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
          5. Taylor expanded in M around 0

            \[\leadsto \color{blue}{w0 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}} \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            10. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\ell \cdot \color{blue}{{d}^{2}}}\right)\right)\right) \]
            11. times-fracN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}}\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}\right)}\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(\frac{\color{blue}{{M}^{2} \cdot \left(h \cdot w0\right)}}{{d}^{2}}\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(\left({M}^{2} \cdot \left(h \cdot w0\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right)\right)\right) \]
          7. Simplified43.3%

            \[\leadsto \color{blue}{w0 + \left(D \cdot D\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot d}\right)} \]
          8. Step-by-step derivation
            1. times-fracN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{\ell} \cdot \left(\frac{w0}{d} \cdot \color{blue}{\frac{\left(M \cdot M\right) \cdot h}{d}}\right)\right)\right)\right) \]
            2. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\left(\frac{\frac{-1}{8}}{\ell} \cdot \frac{w0}{d}\right) \cdot \color{blue}{\frac{\left(M \cdot M\right) \cdot h}{d}}\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell} \cdot \frac{w0}{d}\right), \color{blue}{\left(\frac{\left(M \cdot M\right) \cdot h}{d}\right)}\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell}\right), \left(\frac{w0}{d}\right)\right), \left(\frac{\color{blue}{\left(M \cdot M\right) \cdot h}}{d}\right)\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(\frac{w0}{d}\right)\right), \left(\frac{\color{blue}{\left(M \cdot M\right)} \cdot h}{d}\right)\right)\right)\right) \]
            6. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \left(\frac{\left(M \cdot M\right) \cdot \color{blue}{h}}{d}\right)\right)\right)\right) \]
            7. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\right)\right) \]
            8. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \left(h \cdot \color{blue}{\frac{M \cdot M}{d}}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \left(h \cdot \left(M \cdot \color{blue}{\frac{M}{d}}\right)\right)\right)\right)\right) \]
            10. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \mathsf{*.f64}\left(h, \color{blue}{\left(M \cdot \frac{M}{d}\right)}\right)\right)\right)\right) \]
            11. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \mathsf{*.f64}\left(h, \left(M \cdot \frac{1}{\color{blue}{\frac{d}{M}}}\right)\right)\right)\right)\right) \]
            12. un-div-invN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \mathsf{*.f64}\left(h, \left(\frac{M}{\color{blue}{\frac{d}{M}}}\right)\right)\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{/.f64}\left(M, \color{blue}{\left(\frac{d}{M}\right)}\right)\right)\right)\right)\right) \]
            14. /-lowering-/.f6443.9%

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(w0, d\right)\right), \mathsf{*.f64}\left(h, \mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, \color{blue}{M}\right)\right)\right)\right)\right)\right) \]
          9. Applied egg-rr43.9%

            \[\leadsto w0 + \left(D \cdot D\right) \cdot \color{blue}{\left(\left(\frac{-0.125}{\ell} \cdot \frac{w0}{d}\right) \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)} \]
        6. Recombined 3 regimes into one program.
        7. Final simplification66.4%

          \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 1.7 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{elif}\;M \leq 2.15 \cdot 10^{+99}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \mathbf{else}:\\ \;\;\;\;w0 + \left(D \cdot D\right) \cdot \left(\left(h \cdot \frac{M}{\frac{d}{M}}\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0}{d}\right)\right)\\ \end{array} \]
        8. Add Preprocessing

        Alternative 11: 65.8% accurate, 8.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;d \leq 2 \cdot 10^{-77}:\\ \;\;\;\;w0 + \frac{\frac{D \cdot D}{\frac{\ell}{-0.125}} \cdot \left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \end{array} \end{array} \]
        (FPCore (w0 M D h l d)
         :precision binary64
         (if (<= d 2e-77)
           (+ w0 (/ (* (/ (* D D) (/ l -0.125)) (* w0 (* h (/ M (/ d M))))) d))
           (* w0 (+ 1.0 (* D (/ D (/ (/ (* d (* d l)) h) (* M (* M -0.125)))))))))
        double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (d <= 2e-77) {
        		tmp = w0 + ((((D * D) / (l / -0.125)) * (w0 * (h * (M / (d / M))))) / d);
        	} else {
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	}
        	return tmp;
        }
        
        real(8) function code(w0, m, d, h, l, d_1)
            real(8), intent (in) :: w0
            real(8), intent (in) :: m
            real(8), intent (in) :: d
            real(8), intent (in) :: h
            real(8), intent (in) :: l
            real(8), intent (in) :: d_1
            real(8) :: tmp
            if (d_1 <= 2d-77) then
                tmp = w0 + ((((d * d) / (l / (-0.125d0))) * (w0 * (h * (m / (d_1 / m))))) / d_1)
            else
                tmp = w0 * (1.0d0 + (d * (d / (((d_1 * (d_1 * l)) / h) / (m * (m * (-0.125d0)))))))
            end if
            code = tmp
        end function
        
        public static double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (d <= 2e-77) {
        		tmp = w0 + ((((D * D) / (l / -0.125)) * (w0 * (h * (M / (d / M))))) / d);
        	} else {
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	}
        	return tmp;
        }
        
        def code(w0, M, D, h, l, d):
        	tmp = 0
        	if d <= 2e-77:
        		tmp = w0 + ((((D * D) / (l / -0.125)) * (w0 * (h * (M / (d / M))))) / d)
        	else:
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))))
        	return tmp
        
        function code(w0, M, D, h, l, d)
        	tmp = 0.0
        	if (d <= 2e-77)
        		tmp = Float64(w0 + Float64(Float64(Float64(Float64(D * D) / Float64(l / -0.125)) * Float64(w0 * Float64(h * Float64(M / Float64(d / M))))) / d));
        	else
        		tmp = Float64(w0 * Float64(1.0 + Float64(D * Float64(D / Float64(Float64(Float64(d * Float64(d * l)) / h) / Float64(M * Float64(M * -0.125)))))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(w0, M, D, h, l, d)
        	tmp = 0.0;
        	if (d <= 2e-77)
        		tmp = w0 + ((((D * D) / (l / -0.125)) * (w0 * (h * (M / (d / M))))) / d);
        	else
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	end
        	tmp_2 = tmp;
        end
        
        code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[d, 2e-77], N[(w0 + N[(N[(N[(N[(D * D), $MachinePrecision] / N[(l / -0.125), $MachinePrecision]), $MachinePrecision] * N[(w0 * N[(h * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision], N[(w0 * N[(1.0 + N[(D * N[(D / N[(N[(N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision] / N[(M * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;d \leq 2 \cdot 10^{-77}:\\
        \;\;\;\;w0 + \frac{\frac{D \cdot D}{\frac{\ell}{-0.125}} \cdot \left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)}{d}\\
        
        \mathbf{else}:\\
        \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if d < 1.9999999999999999e-77

          1. Initial program 79.7%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            2. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            4. div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
            5. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            9. associate-/r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            12. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            13. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr87.4%

            \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
          5. Taylor expanded in M around 0

            \[\leadsto \color{blue}{w0 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}} \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            10. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\ell \cdot \color{blue}{{d}^{2}}}\right)\right)\right) \]
            11. times-fracN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}}\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}\right)}\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(\frac{\color{blue}{{M}^{2} \cdot \left(h \cdot w0\right)}}{{d}^{2}}\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(\left({M}^{2} \cdot \left(h \cdot w0\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right)\right)\right) \]
          7. Simplified56.5%

            \[\leadsto \color{blue}{w0 + \left(D \cdot D\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot d}\right)} \]
          8. Step-by-step derivation
            1. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\left(\left(D \cdot D\right) \cdot \frac{\frac{-1}{8}}{\ell}\right) \cdot \color{blue}{\frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot d}}\right)\right) \]
            2. associate-/r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\left(\left(D \cdot D\right) \cdot \frac{\frac{-1}{8}}{\ell}\right) \cdot \frac{\frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}}{\color{blue}{d}}\right)\right) \]
            3. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\frac{\left(\left(D \cdot D\right) \cdot \frac{\frac{-1}{8}}{\ell}\right) \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}}{\color{blue}{d}}\right)\right) \]
            4. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{/.f64}\left(\left(\left(\left(D \cdot D\right) \cdot \frac{\frac{-1}{8}}{\ell}\right) \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}\right), \color{blue}{d}\right)\right) \]
          9. Applied egg-rr67.0%

            \[\leadsto w0 + \color{blue}{\frac{\frac{D \cdot D}{\frac{\ell}{-0.125}} \cdot \left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)}{d}} \]

          if 1.9999999999999999e-77 < d

          1. Initial program 81.5%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Simplified76.1%

            \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
          3. Add Preprocessing
          4. Taylor expanded in h around 0

            \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
          5. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
            11. associate-*r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
            13. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            14. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            15. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
            16. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
            17. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
            18. *-lowering-*.f6459.0%

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
          6. Simplified59.0%

            \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
          7. Step-by-step derivation
            1. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(D \cdot \color{blue}{\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right)\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot \color{blue}{D}\right)\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right), \color{blue}{D}\right)\right)\right) \]
          8. Applied egg-rr70.0%

            \[\leadsto w0 \cdot \left(1 + \color{blue}{\frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}} \cdot D}\right) \]
        3. Recombined 2 regimes into one program.
        4. Final simplification68.0%

          \[\leadsto \begin{array}{l} \mathbf{if}\;d \leq 2 \cdot 10^{-77}:\\ \;\;\;\;w0 + \frac{\frac{D \cdot D}{\frac{\ell}{-0.125}} \cdot \left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)}{d}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 12: 66.3% accurate, 8.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;D \leq 9.8 \cdot 10^{+153}:\\ \;\;\;\;w0 + \left(D \cdot D\right) \cdot \frac{\left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right) \cdot \frac{-0.125}{\ell}}{d}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + \frac{-0.125 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\\ \end{array} \end{array} \]
        (FPCore (w0 M D h l d)
         :precision binary64
         (if (<= D 9.8e+153)
           (+ w0 (* (* D D) (/ (* (* w0 (* h (/ M (/ d M)))) (/ -0.125 l)) d)))
           (* w0 (+ 1.0 (/ (* -0.125 (* D (* D (* h (* M M))))) (* d (* d l)))))))
        double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (D <= 9.8e+153) {
        		tmp = w0 + ((D * D) * (((w0 * (h * (M / (d / M)))) * (-0.125 / l)) / d));
        	} else {
        		tmp = w0 * (1.0 + ((-0.125 * (D * (D * (h * (M * M))))) / (d * (d * l))));
        	}
        	return tmp;
        }
        
        real(8) function code(w0, m, d, h, l, d_1)
            real(8), intent (in) :: w0
            real(8), intent (in) :: m
            real(8), intent (in) :: d
            real(8), intent (in) :: h
            real(8), intent (in) :: l
            real(8), intent (in) :: d_1
            real(8) :: tmp
            if (d <= 9.8d+153) then
                tmp = w0 + ((d * d) * (((w0 * (h * (m / (d_1 / m)))) * ((-0.125d0) / l)) / d_1))
            else
                tmp = w0 * (1.0d0 + (((-0.125d0) * (d * (d * (h * (m * m))))) / (d_1 * (d_1 * l))))
            end if
            code = tmp
        end function
        
        public static double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (D <= 9.8e+153) {
        		tmp = w0 + ((D * D) * (((w0 * (h * (M / (d / M)))) * (-0.125 / l)) / d));
        	} else {
        		tmp = w0 * (1.0 + ((-0.125 * (D * (D * (h * (M * M))))) / (d * (d * l))));
        	}
        	return tmp;
        }
        
        def code(w0, M, D, h, l, d):
        	tmp = 0
        	if D <= 9.8e+153:
        		tmp = w0 + ((D * D) * (((w0 * (h * (M / (d / M)))) * (-0.125 / l)) / d))
        	else:
        		tmp = w0 * (1.0 + ((-0.125 * (D * (D * (h * (M * M))))) / (d * (d * l))))
        	return tmp
        
        function code(w0, M, D, h, l, d)
        	tmp = 0.0
        	if (D <= 9.8e+153)
        		tmp = Float64(w0 + Float64(Float64(D * D) * Float64(Float64(Float64(w0 * Float64(h * Float64(M / Float64(d / M)))) * Float64(-0.125 / l)) / d)));
        	else
        		tmp = Float64(w0 * Float64(1.0 + Float64(Float64(-0.125 * Float64(D * Float64(D * Float64(h * Float64(M * M))))) / Float64(d * Float64(d * l)))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(w0, M, D, h, l, d)
        	tmp = 0.0;
        	if (D <= 9.8e+153)
        		tmp = w0 + ((D * D) * (((w0 * (h * (M / (d / M)))) * (-0.125 / l)) / d));
        	else
        		tmp = w0 * (1.0 + ((-0.125 * (D * (D * (h * (M * M))))) / (d * (d * l))));
        	end
        	tmp_2 = tmp;
        end
        
        code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[D, 9.8e+153], N[(w0 + N[(N[(D * D), $MachinePrecision] * N[(N[(N[(w0 * N[(h * N[(M / N[(d / M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(-0.125 / l), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(w0 * N[(1.0 + N[(N[(-0.125 * N[(D * N[(D * N[(h * N[(M * M), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;D \leq 9.8 \cdot 10^{+153}:\\
        \;\;\;\;w0 + \left(D \cdot D\right) \cdot \frac{\left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right) \cdot \frac{-0.125}{\ell}}{d}\\
        
        \mathbf{else}:\\
        \;\;\;\;w0 \cdot \left(1 + \frac{-0.125 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if D < 9.80000000000000003e153

          1. Initial program 82.3%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            2. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            4. div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
            5. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            9. associate-/r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            12. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            13. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr89.2%

            \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
          5. Taylor expanded in M around 0

            \[\leadsto \color{blue}{w0 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}} \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
            2. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right) \]
            3. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right) \]
            4. associate-*r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right) \]
            5. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            7. unpow2N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2} \cdot \ell}\right)\right)\right) \]
            9. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            10. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot \left(h \cdot w0\right)\right)}{\ell \cdot \color{blue}{{d}^{2}}}\right)\right)\right) \]
            11. times-fracN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{\ell} \cdot \color{blue}{\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}}\right)\right)\right) \]
            12. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell}\right), \color{blue}{\left(\frac{{M}^{2} \cdot \left(h \cdot w0\right)}{{d}^{2}}\right)}\right)\right)\right) \]
            13. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(\frac{\color{blue}{{M}^{2} \cdot \left(h \cdot w0\right)}}{{d}^{2}}\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{/.f64}\left(\left({M}^{2} \cdot \left(h \cdot w0\right)\right), \color{blue}{\left({d}^{2}\right)}\right)\right)\right)\right) \]
          7. Simplified57.9%

            \[\leadsto \color{blue}{w0 + \left(D \cdot D\right) \cdot \left(\frac{-0.125}{\ell} \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot d}\right)} \]
          8. Step-by-step derivation
            1. associate-/r*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{\ell} \cdot \frac{\frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}}{\color{blue}{d}}\right)\right)\right) \]
            2. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{\frac{-1}{8}}{\ell} \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}}{\color{blue}{d}}\right)\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{\frac{-1}{8}}{\ell} \cdot \frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}\right), \color{blue}{d}\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{\ell}\right), \left(\frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}\right)\right), d\right)\right)\right) \]
            5. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(\frac{w0 \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d}\right)\right), d\right)\right)\right) \]
            6. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \left(w0 \cdot \frac{\left(M \cdot M\right) \cdot h}{d}\right)\right), d\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \left(\frac{\left(M \cdot M\right) \cdot h}{d}\right)\right)\right), d\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \left(\frac{h \cdot \left(M \cdot M\right)}{d}\right)\right)\right), d\right)\right)\right) \]
            9. associate-/l*N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \left(h \cdot \frac{M \cdot M}{d}\right)\right)\right), d\right)\right)\right) \]
            10. associate-*r/N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \left(h \cdot \left(M \cdot \frac{M}{d}\right)\right)\right)\right), d\right)\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(h, \left(M \cdot \frac{M}{d}\right)\right)\right)\right), d\right)\right)\right) \]
            12. clear-numN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(h, \left(M \cdot \frac{1}{\frac{d}{M}}\right)\right)\right)\right), d\right)\right)\right) \]
            13. un-div-invN/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(h, \left(\frac{M}{\frac{d}{M}}\right)\right)\right)\right), d\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(h, \mathsf{/.f64}\left(M, \left(\frac{d}{M}\right)\right)\right)\right)\right), d\right)\right)\right) \]
            15. /-lowering-/.f6468.5%

              \[\leadsto \mathsf{+.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, \ell\right), \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(h, \mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, M\right)\right)\right)\right)\right), d\right)\right)\right) \]
          9. Applied egg-rr68.5%

            \[\leadsto w0 + \left(D \cdot D\right) \cdot \color{blue}{\frac{\frac{-0.125}{\ell} \cdot \left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right)}{d}} \]

          if 9.80000000000000003e153 < D

          1. Initial program 61.6%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Add Preprocessing
          3. Step-by-step derivation
            1. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left({\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{1}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            2. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{{\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            3. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\frac{\ell}{h}}\right)\right)\right)\right) \]
            4. div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d} \cdot \frac{M \cdot D}{2 \cdot d}}{\ell \cdot \frac{1}{h}}\right)\right)\right)\right) \]
            5. times-fracN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell} \cdot \frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right) \]
            6. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\left(\frac{\frac{M \cdot D}{2 \cdot d}}{\ell}\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            7. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            8. *-commutativeN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d \cdot 2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            9. associate-/r*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\frac{\frac{M \cdot D}{d}}{2}\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            10. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M \cdot D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            11. associate-/l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{D}{d}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            12. clear-numN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \frac{1}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            13. un-div-invN/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{M}{\frac{d}{D}}\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            14. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \left(\frac{d}{D}\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            15. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \left(\frac{\frac{M \cdot D}{2 \cdot d}}{\frac{1}{h}}\right)\right)\right)\right)\right) \]
            16. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{sqrt.f64}\left(\mathsf{\_.f64}\left(1, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(\mathsf{/.f64}\left(M, \mathsf{/.f64}\left(d, D\right)\right), 2\right), \ell\right), \mathsf{/.f64}\left(\left(\frac{M \cdot D}{2 \cdot d}\right), \left(\frac{1}{h}\right)\right)\right)\right)\right)\right) \]
          4. Applied egg-rr81.0%

            \[\leadsto w0 \cdot \sqrt{1 - \color{blue}{\frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\ell} \cdot \frac{\frac{\frac{M}{\frac{d}{D}}}{2}}{\frac{1}{h}}}} \]
          5. Taylor expanded in M around 0

            \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
          6. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
            2. associate-*r/N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right) \]
            3. /-lowering-/.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right) \]
            4. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right) \]
            5. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(\left(D \cdot D\right) \cdot \left({M}^{2} \cdot h\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
            6. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(D \cdot \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right)\right) \]
            7. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \left(D \cdot \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right)\right) \]
            8. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \left({M}^{2} \cdot h\right)\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
            9. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left({M}^{2}\right), h\right)\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
            10. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\left(M \cdot M\right), h\right)\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
            11. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right) \]
            12. unpow2N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), \left(\left(d \cdot d\right) \cdot \ell\right)\right)\right)\right) \]
            13. associate-*l*N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), \left(d \cdot \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right) \]
            14. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right) \]
            15. *-lowering-*.f6464.6%

              \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(D, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right)\right)\right)\right), \mathsf{*.f64}\left(d, \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right) \]
          7. Simplified64.6%

            \[\leadsto w0 \cdot \color{blue}{\left(1 + \frac{-0.125 \cdot \left(D \cdot \left(D \cdot \left(\left(M \cdot M\right) \cdot h\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)} \]
        3. Recombined 2 regimes into one program.
        4. Final simplification68.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;D \leq 9.8 \cdot 10^{+153}:\\ \;\;\;\;w0 + \left(D \cdot D\right) \cdot \frac{\left(w0 \cdot \left(h \cdot \frac{M}{\frac{d}{M}}\right)\right) \cdot \frac{-0.125}{\ell}}{d}\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + \frac{-0.125 \cdot \left(D \cdot \left(D \cdot \left(h \cdot \left(M \cdot M\right)\right)\right)\right)}{d \cdot \left(d \cdot \ell\right)}\right)\\ \end{array} \]
        5. Add Preprocessing

        Alternative 13: 68.3% accurate, 8.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 1.72 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \end{array} \end{array} \]
        (FPCore (w0 M D h l d)
         :precision binary64
         (if (<= M 1.72e-155)
           w0
           (* w0 (+ 1.0 (* D (/ D (/ (/ (* d (* d l)) h) (* M (* M -0.125)))))))))
        double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (M <= 1.72e-155) {
        		tmp = w0;
        	} else {
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	}
        	return tmp;
        }
        
        real(8) function code(w0, m, d, h, l, d_1)
            real(8), intent (in) :: w0
            real(8), intent (in) :: m
            real(8), intent (in) :: d
            real(8), intent (in) :: h
            real(8), intent (in) :: l
            real(8), intent (in) :: d_1
            real(8) :: tmp
            if (m <= 1.72d-155) then
                tmp = w0
            else
                tmp = w0 * (1.0d0 + (d * (d / (((d_1 * (d_1 * l)) / h) / (m * (m * (-0.125d0)))))))
            end if
            code = tmp
        end function
        
        public static double code(double w0, double M, double D, double h, double l, double d) {
        	double tmp;
        	if (M <= 1.72e-155) {
        		tmp = w0;
        	} else {
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	}
        	return tmp;
        }
        
        def code(w0, M, D, h, l, d):
        	tmp = 0
        	if M <= 1.72e-155:
        		tmp = w0
        	else:
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))))
        	return tmp
        
        function code(w0, M, D, h, l, d)
        	tmp = 0.0
        	if (M <= 1.72e-155)
        		tmp = w0;
        	else
        		tmp = Float64(w0 * Float64(1.0 + Float64(D * Float64(D / Float64(Float64(Float64(d * Float64(d * l)) / h) / Float64(M * Float64(M * -0.125)))))));
        	end
        	return tmp
        end
        
        function tmp_2 = code(w0, M, D, h, l, d)
        	tmp = 0.0;
        	if (M <= 1.72e-155)
        		tmp = w0;
        	else
        		tmp = w0 * (1.0 + (D * (D / (((d * (d * l)) / h) / (M * (M * -0.125))))));
        	end
        	tmp_2 = tmp;
        end
        
        code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 1.72e-155], w0, N[(w0 * N[(1.0 + N[(D * N[(D / N[(N[(N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision] / h), $MachinePrecision] / N[(M * N[(M * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;M \leq 1.72 \cdot 10^{-155}:\\
        \;\;\;\;w0\\
        
        \mathbf{else}:\\
        \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if M < 1.71999999999999991e-155

          1. Initial program 84.8%

            \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
          2. Simplified79.6%

            \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
          3. Add Preprocessing
          4. Taylor expanded in h around 0

            \[\leadsto \color{blue}{w0} \]
          5. Step-by-step derivation
            1. Simplified70.6%

              \[\leadsto \color{blue}{w0} \]

            if 1.71999999999999991e-155 < M

            1. Initial program 74.1%

              \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
            2. Simplified70.3%

              \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
            3. Add Preprocessing
            4. Taylor expanded in h around 0

              \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
            5. Step-by-step derivation
              1. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
              3. associate-/l*N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
              4. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
              5. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
              6. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
              7. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
              8. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
              9. associate-*r/N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
              10. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
              11. associate-*r*N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
              12. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
              13. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
              14. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
              15. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
              16. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
              17. unpow2N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
              18. *-lowering-*.f6455.4%

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
            6. Simplified55.4%

              \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
            7. Step-by-step derivation
              1. associate-*l*N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(D \cdot \color{blue}{\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right)\right) \]
              2. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right) \cdot \color{blue}{D}\right)\right)\right) \]
              3. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot \frac{\left(\frac{-1}{8} \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right), \color{blue}{D}\right)\right)\right) \]
            8. Applied egg-rr60.9%

              \[\leadsto w0 \cdot \left(1 + \color{blue}{\frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}} \cdot D}\right) \]
          6. Recombined 2 regimes into one program.
          7. Final simplification66.5%

            \[\leadsto \begin{array}{l} \mathbf{if}\;M \leq 1.72 \cdot 10^{-155}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + D \cdot \frac{D}{\frac{\frac{d \cdot \left(d \cdot \ell\right)}{h}}{M \cdot \left(M \cdot -0.125\right)}}\right)\\ \end{array} \]
          8. Add Preprocessing

          Alternative 14: 67.4% accurate, 8.3× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 1.65 \cdot 10^{-165}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(1 + \left(D \cdot D\right) \cdot \left(\frac{-0.125}{d} \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \ell}\right)\right)\\ \end{array} \end{array} \]
          (FPCore (w0 M D h l d)
           :precision binary64
           (if (<= M 1.65e-165)
             w0
             (* w0 (+ 1.0 (* (* D D) (* (/ -0.125 d) (/ (* M (* M h)) (* d l))))))))
          double code(double w0, double M, double D, double h, double l, double d) {
          	double tmp;
          	if (M <= 1.65e-165) {
          		tmp = w0;
          	} else {
          		tmp = w0 * (1.0 + ((D * D) * ((-0.125 / d) * ((M * (M * h)) / (d * l)))));
          	}
          	return tmp;
          }
          
          real(8) function code(w0, m, d, h, l, d_1)
              real(8), intent (in) :: w0
              real(8), intent (in) :: m
              real(8), intent (in) :: d
              real(8), intent (in) :: h
              real(8), intent (in) :: l
              real(8), intent (in) :: d_1
              real(8) :: tmp
              if (m <= 1.65d-165) then
                  tmp = w0
              else
                  tmp = w0 * (1.0d0 + ((d * d) * (((-0.125d0) / d_1) * ((m * (m * h)) / (d_1 * l)))))
              end if
              code = tmp
          end function
          
          public static double code(double w0, double M, double D, double h, double l, double d) {
          	double tmp;
          	if (M <= 1.65e-165) {
          		tmp = w0;
          	} else {
          		tmp = w0 * (1.0 + ((D * D) * ((-0.125 / d) * ((M * (M * h)) / (d * l)))));
          	}
          	return tmp;
          }
          
          def code(w0, M, D, h, l, d):
          	tmp = 0
          	if M <= 1.65e-165:
          		tmp = w0
          	else:
          		tmp = w0 * (1.0 + ((D * D) * ((-0.125 / d) * ((M * (M * h)) / (d * l)))))
          	return tmp
          
          function code(w0, M, D, h, l, d)
          	tmp = 0.0
          	if (M <= 1.65e-165)
          		tmp = w0;
          	else
          		tmp = Float64(w0 * Float64(1.0 + Float64(Float64(D * D) * Float64(Float64(-0.125 / d) * Float64(Float64(M * Float64(M * h)) / Float64(d * l))))));
          	end
          	return tmp
          end
          
          function tmp_2 = code(w0, M, D, h, l, d)
          	tmp = 0.0;
          	if (M <= 1.65e-165)
          		tmp = w0;
          	else
          		tmp = w0 * (1.0 + ((D * D) * ((-0.125 / d) * ((M * (M * h)) / (d * l)))));
          	end
          	tmp_2 = tmp;
          end
          
          code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 1.65e-165], w0, N[(w0 * N[(1.0 + N[(N[(D * D), $MachinePrecision] * N[(N[(-0.125 / d), $MachinePrecision] * N[(N[(M * N[(M * h), $MachinePrecision]), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;M \leq 1.65 \cdot 10^{-165}:\\
          \;\;\;\;w0\\
          
          \mathbf{else}:\\
          \;\;\;\;w0 \cdot \left(1 + \left(D \cdot D\right) \cdot \left(\frac{-0.125}{d} \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \ell}\right)\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if M < 1.6499999999999999e-165

            1. Initial program 84.8%

              \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
            2. Simplified79.6%

              \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
            3. Add Preprocessing
            4. Taylor expanded in h around 0

              \[\leadsto \color{blue}{w0} \]
            5. Step-by-step derivation
              1. Simplified70.6%

                \[\leadsto \color{blue}{w0} \]

              if 1.6499999999999999e-165 < M

              1. Initial program 74.1%

                \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
              2. Simplified70.3%

                \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
              3. Add Preprocessing
              4. Taylor expanded in h around 0

                \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
              5. Step-by-step derivation
                1. +-lowering-+.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
                2. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
                3. associate-/l*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
                4. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
                5. *-commutativeN/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                6. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
                7. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                9. associate-*r/N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                10. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
                11. associate-*r*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                12. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                13. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                14. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                15. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                16. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
                17. unpow2N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
                18. *-lowering-*.f6455.4%

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
              6. Simplified55.4%

                \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
              7. Step-by-step derivation
                1. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{\color{blue}{\left(d \cdot d\right)} \cdot \ell}\right)\right)\right)\right) \]
                2. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left(\left(M \cdot M\right) \cdot h\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}}\right)\right)\right)\right) \]
                3. times-fracN/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8}}{d} \cdot \color{blue}{\frac{\left(M \cdot M\right) \cdot h}{d \cdot \ell}}\right)\right)\right)\right) \]
                4. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\left(\frac{\frac{-1}{8}}{d}\right), \color{blue}{\left(\frac{\left(M \cdot M\right) \cdot h}{d \cdot \ell}\right)}\right)\right)\right)\right) \]
                5. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \left(\frac{\color{blue}{\left(M \cdot M\right) \cdot h}}{d \cdot \ell}\right)\right)\right)\right)\right) \]
                6. /-lowering-/.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \mathsf{/.f64}\left(\left(\left(M \cdot M\right) \cdot h\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right) \]
                7. associate-*l*N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \mathsf{/.f64}\left(\left(M \cdot \left(M \cdot h\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right) \]
                8. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot h\right)\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right)\right)\right) \]
                9. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right), \left(d \cdot \ell\right)\right)\right)\right)\right)\right) \]
                10. *-lowering-*.f6459.3%

                  \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{8}, d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, h\right)\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right) \]
              8. Applied egg-rr59.3%

                \[\leadsto w0 \cdot \left(1 + \left(D \cdot D\right) \cdot \color{blue}{\left(\frac{-0.125}{d} \cdot \frac{M \cdot \left(M \cdot h\right)}{d \cdot \ell}\right)}\right) \]
            6. Recombined 2 regimes into one program.
            7. Add Preprocessing

            Alternative 15: 64.2% accurate, 9.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 4 \cdot 10^{+43}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(\frac{M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)}{d} \cdot \frac{D \cdot D}{d \cdot \ell}\right)\\ \end{array} \end{array} \]
            (FPCore (w0 M D h l d)
             :precision binary64
             (if (<= M 4e+43)
               w0
               (* w0 (* (/ (* M (* M (* h -0.125))) d) (/ (* D D) (* d l))))))
            double code(double w0, double M, double D, double h, double l, double d) {
            	double tmp;
            	if (M <= 4e+43) {
            		tmp = w0;
            	} else {
            		tmp = w0 * (((M * (M * (h * -0.125))) / d) * ((D * D) / (d * l)));
            	}
            	return tmp;
            }
            
            real(8) function code(w0, m, d, h, l, d_1)
                real(8), intent (in) :: w0
                real(8), intent (in) :: m
                real(8), intent (in) :: d
                real(8), intent (in) :: h
                real(8), intent (in) :: l
                real(8), intent (in) :: d_1
                real(8) :: tmp
                if (m <= 4d+43) then
                    tmp = w0
                else
                    tmp = w0 * (((m * (m * (h * (-0.125d0)))) / d_1) * ((d * d) / (d_1 * l)))
                end if
                code = tmp
            end function
            
            public static double code(double w0, double M, double D, double h, double l, double d) {
            	double tmp;
            	if (M <= 4e+43) {
            		tmp = w0;
            	} else {
            		tmp = w0 * (((M * (M * (h * -0.125))) / d) * ((D * D) / (d * l)));
            	}
            	return tmp;
            }
            
            def code(w0, M, D, h, l, d):
            	tmp = 0
            	if M <= 4e+43:
            		tmp = w0
            	else:
            		tmp = w0 * (((M * (M * (h * -0.125))) / d) * ((D * D) / (d * l)))
            	return tmp
            
            function code(w0, M, D, h, l, d)
            	tmp = 0.0
            	if (M <= 4e+43)
            		tmp = w0;
            	else
            		tmp = Float64(w0 * Float64(Float64(Float64(M * Float64(M * Float64(h * -0.125))) / d) * Float64(Float64(D * D) / Float64(d * l))));
            	end
            	return tmp
            end
            
            function tmp_2 = code(w0, M, D, h, l, d)
            	tmp = 0.0;
            	if (M <= 4e+43)
            		tmp = w0;
            	else
            		tmp = w0 * (((M * (M * (h * -0.125))) / d) * ((D * D) / (d * l)));
            	end
            	tmp_2 = tmp;
            end
            
            code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 4e+43], w0, N[(w0 * N[(N[(N[(M * N[(M * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / d), $MachinePrecision] * N[(N[(D * D), $MachinePrecision] / N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;M \leq 4 \cdot 10^{+43}:\\
            \;\;\;\;w0\\
            
            \mathbf{else}:\\
            \;\;\;\;w0 \cdot \left(\frac{M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)}{d} \cdot \frac{D \cdot D}{d \cdot \ell}\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if M < 4.00000000000000006e43

              1. Initial program 83.4%

                \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
              2. Simplified79.4%

                \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
              3. Add Preprocessing
              4. Taylor expanded in h around 0

                \[\leadsto \color{blue}{w0} \]
              5. Step-by-step derivation
                1. Simplified71.5%

                  \[\leadsto \color{blue}{w0} \]

                if 4.00000000000000006e43 < M

                1. Initial program 69.7%

                  \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
                2. Simplified62.7%

                  \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
                3. Add Preprocessing
                4. Taylor expanded in h around 0

                  \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
                5. Step-by-step derivation
                  1. +-lowering-+.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
                  2. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
                  3. associate-/l*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
                  5. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                  6. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
                  7. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                  9. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                  10. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
                  11. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                  12. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                  13. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                  14. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                  15. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                  16. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
                  17. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
                  18. *-lowering-*.f6449.6%

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
                6. Simplified49.6%

                  \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
                7. Taylor expanded in D around inf

                  \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
                8. Step-by-step derivation
                  1. associate-*r/N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right) \]
                  2. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right) \]
                  3. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                  4. associate-*r*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right) \]
                  5. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \left({D}^{2}\right)\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right) \]
                  6. *-commutativeN/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left({M}^{2} \cdot h\right) \cdot \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({M}^{2} \cdot h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({M}^{2}\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                  9. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot M\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                  10. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                  11. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \left(D \cdot D\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                  12. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                  13. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right) \]
                  14. unpow2N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right) \]
                  15. *-lowering-*.f6427.6%

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right) \]
                9. Simplified27.6%

                  \[\leadsto w0 \cdot \color{blue}{\frac{\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell}} \]
                10. Step-by-step derivation
                  1. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \left(\frac{\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}\right) \cdot \left(D \cdot D\right)}{d \cdot \color{blue}{\left(d \cdot \ell\right)}}\right)\right) \]
                  2. times-fracN/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}}{d} \cdot \color{blue}{\frac{D \cdot D}{d \cdot \ell}}\right)\right) \]
                  3. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\left(\frac{\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}}{d}\right), \color{blue}{\left(\frac{D \cdot D}{d \cdot \ell}\right)}\right)\right) \]
                  4. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}\right), d\right), \left(\frac{\color{blue}{D \cdot D}}{d \cdot \ell}\right)\right)\right) \]
                  5. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{-1}{8}\right)\right), d\right), \left(\frac{\color{blue}{D} \cdot D}{d \cdot \ell}\right)\right)\right) \]
                  6. associate-*l*N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(M \cdot \left(M \cdot \left(h \cdot \frac{-1}{8}\right)\right)\right), d\right), \left(\frac{\color{blue}{D} \cdot D}{d \cdot \ell}\right)\right)\right) \]
                  7. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot \left(h \cdot \frac{-1}{8}\right)\right)\right), d\right), \left(\frac{\color{blue}{D} \cdot D}{d \cdot \ell}\right)\right)\right) \]
                  8. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \left(h \cdot \frac{-1}{8}\right)\right)\right), d\right), \left(\frac{D \cdot D}{d \cdot \ell}\right)\right)\right) \]
                  9. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), d\right), \left(\frac{D \cdot D}{d \cdot \ell}\right)\right)\right) \]
                  10. /-lowering-/.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), d\right), \mathsf{/.f64}\left(\left(D \cdot D\right), \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right) \]
                  11. *-lowering-*.f64N/A

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{d} \cdot \ell\right)\right)\right)\right) \]
                  12. *-lowering-*.f6426.4%

                    \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), d\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right) \]
                11. Applied egg-rr26.4%

                  \[\leadsto w0 \cdot \color{blue}{\left(\frac{M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)}{d} \cdot \frac{D \cdot D}{d \cdot \ell}\right)} \]
              6. Recombined 2 regimes into one program.
              7. Add Preprocessing

              Alternative 16: 64.3% accurate, 9.0× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;M \leq 9 \cdot 10^{+43}:\\ \;\;\;\;w0\\ \mathbf{else}:\\ \;\;\;\;w0 \cdot \left(\left(M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)\right) \cdot \left(D \cdot \frac{D}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\ \end{array} \end{array} \]
              (FPCore (w0 M D h l d)
               :precision binary64
               (if (<= M 9e+43)
                 w0
                 (* w0 (* (* M (* M (* h -0.125))) (* D (/ D (* d (* d l))))))))
              double code(double w0, double M, double D, double h, double l, double d) {
              	double tmp;
              	if (M <= 9e+43) {
              		tmp = w0;
              	} else {
              		tmp = w0 * ((M * (M * (h * -0.125))) * (D * (D / (d * (d * l)))));
              	}
              	return tmp;
              }
              
              real(8) function code(w0, m, d, h, l, d_1)
                  real(8), intent (in) :: w0
                  real(8), intent (in) :: m
                  real(8), intent (in) :: d
                  real(8), intent (in) :: h
                  real(8), intent (in) :: l
                  real(8), intent (in) :: d_1
                  real(8) :: tmp
                  if (m <= 9d+43) then
                      tmp = w0
                  else
                      tmp = w0 * ((m * (m * (h * (-0.125d0)))) * (d * (d / (d_1 * (d_1 * l)))))
                  end if
                  code = tmp
              end function
              
              public static double code(double w0, double M, double D, double h, double l, double d) {
              	double tmp;
              	if (M <= 9e+43) {
              		tmp = w0;
              	} else {
              		tmp = w0 * ((M * (M * (h * -0.125))) * (D * (D / (d * (d * l)))));
              	}
              	return tmp;
              }
              
              def code(w0, M, D, h, l, d):
              	tmp = 0
              	if M <= 9e+43:
              		tmp = w0
              	else:
              		tmp = w0 * ((M * (M * (h * -0.125))) * (D * (D / (d * (d * l)))))
              	return tmp
              
              function code(w0, M, D, h, l, d)
              	tmp = 0.0
              	if (M <= 9e+43)
              		tmp = w0;
              	else
              		tmp = Float64(w0 * Float64(Float64(M * Float64(M * Float64(h * -0.125))) * Float64(D * Float64(D / Float64(d * Float64(d * l))))));
              	end
              	return tmp
              end
              
              function tmp_2 = code(w0, M, D, h, l, d)
              	tmp = 0.0;
              	if (M <= 9e+43)
              		tmp = w0;
              	else
              		tmp = w0 * ((M * (M * (h * -0.125))) * (D * (D / (d * (d * l)))));
              	end
              	tmp_2 = tmp;
              end
              
              code[w0_, M_, D_, h_, l_, d_] := If[LessEqual[M, 9e+43], w0, N[(w0 * N[(N[(M * N[(M * N[(h * -0.125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(D * N[(D / N[(d * N[(d * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;M \leq 9 \cdot 10^{+43}:\\
              \;\;\;\;w0\\
              
              \mathbf{else}:\\
              \;\;\;\;w0 \cdot \left(\left(M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)\right) \cdot \left(D \cdot \frac{D}{d \cdot \left(d \cdot \ell\right)}\right)\right)\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if M < 9e43

                1. Initial program 83.4%

                  \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
                2. Simplified79.4%

                  \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
                3. Add Preprocessing
                4. Taylor expanded in h around 0

                  \[\leadsto \color{blue}{w0} \]
                5. Step-by-step derivation
                  1. Simplified71.5%

                    \[\leadsto \color{blue}{w0} \]

                  if 9e43 < M

                  1. Initial program 69.7%

                    \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
                  2. Simplified62.7%

                    \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
                  3. Add Preprocessing
                  4. Taylor expanded in h around 0

                    \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(1 + \frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
                  5. Step-by-step derivation
                    1. +-lowering-+.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right)\right) \]
                    2. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell} \cdot \color{blue}{\frac{-1}{8}}\right)\right)\right) \]
                    3. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left(\left({D}^{2} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right) \cdot \frac{-1}{8}\right)\right)\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \color{blue}{\left(\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell} \cdot \frac{-1}{8}\right)}\right)\right)\right) \]
                    5. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \left({D}^{2} \cdot \left(\frac{-1}{8} \cdot \color{blue}{\frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left({D}^{2}\right), \color{blue}{\left(\frac{-1}{8} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)}\right)\right)\right) \]
                    7. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\left(D \cdot D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\color{blue}{\frac{-1}{8}} \cdot \frac{{M}^{2} \cdot h}{{d}^{2} \cdot \ell}\right)\right)\right)\right) \]
                    9. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \left(\frac{\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right)\right)\right) \]
                    10. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right)\right)\right) \]
                    11. associate-*r*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot {M}^{2}\right) \cdot h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                    12. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot {M}^{2}\right), h\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right)\right)\right) \]
                    13. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left({M}^{2}\right)\right), h\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                    14. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \left(M \cdot M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                    15. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \left({d}^{2} \cdot \ell\right)\right)\right)\right)\right) \]
                    16. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right)\right)\right) \]
                    17. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right)\right)\right) \]
                    18. *-lowering-*.f6449.6%

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(\mathsf{*.f64}\left(D, D\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\frac{-1}{8}, \mathsf{*.f64}\left(M, M\right)\right), h\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right)\right)\right) \]
                  6. Simplified49.6%

                    \[\leadsto w0 \cdot \color{blue}{\left(1 + \left(D \cdot D\right) \cdot \frac{\left(-0.125 \cdot \left(M \cdot M\right)\right) \cdot h}{\left(d \cdot d\right) \cdot \ell}\right)} \]
                  7. Taylor expanded in D around inf

                    \[\leadsto \mathsf{*.f64}\left(w0, \color{blue}{\left(\frac{-1}{8} \cdot \frac{{D}^{2} \cdot \left({M}^{2} \cdot h\right)}{{d}^{2} \cdot \ell}\right)}\right) \]
                  8. Step-by-step derivation
                    1. associate-*r/N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \left(\frac{\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)}{\color{blue}{{d}^{2} \cdot \ell}}\right)\right) \]
                    2. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left({D}^{2} \cdot \left({M}^{2} \cdot h\right)\right)\right), \color{blue}{\left({d}^{2} \cdot \ell\right)}\right)\right) \]
                    3. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\frac{-1}{8} \cdot \left(\left({M}^{2} \cdot h\right) \cdot {D}^{2}\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                    4. associate-*r*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right) \cdot {D}^{2}\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right) \]
                    5. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\frac{-1}{8} \cdot \left({M}^{2} \cdot h\right)\right), \left({D}^{2}\right)\right), \left(\color{blue}{{d}^{2}} \cdot \ell\right)\right)\right) \]
                    6. *-commutativeN/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\left({M}^{2} \cdot h\right) \cdot \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({M}^{2} \cdot h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({\color{blue}{d}}^{2} \cdot \ell\right)\right)\right) \]
                    8. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({M}^{2}\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                    9. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(M \cdot M\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                    10. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \left({D}^{2}\right)\right), \left({d}^{2} \cdot \ell\right)\right)\right) \]
                    11. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \left(D \cdot D\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                    12. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \left({d}^{\color{blue}{2}} \cdot \ell\right)\right)\right) \]
                    13. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left({d}^{2}\right), \color{blue}{\ell}\right)\right)\right) \]
                    14. unpow2N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\left(d \cdot d\right), \ell\right)\right)\right) \]
                    15. *-lowering-*.f6427.6%

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(M, M\right), h\right), \frac{-1}{8}\right), \mathsf{*.f64}\left(D, D\right)\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(d, d\right), \ell\right)\right)\right) \]
                  9. Simplified27.6%

                    \[\leadsto w0 \cdot \color{blue}{\frac{\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot -0.125\right) \cdot \left(D \cdot D\right)}{\left(d \cdot d\right) \cdot \ell}} \]
                  10. Step-by-step derivation
                    1. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}\right) \cdot \color{blue}{\frac{D \cdot D}{\left(d \cdot d\right) \cdot \ell}}\right)\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\left(\left(\left(M \cdot M\right) \cdot h\right) \cdot \frac{-1}{8}\right), \color{blue}{\left(\frac{D \cdot D}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right) \]
                    3. associate-*l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\left(\left(M \cdot M\right) \cdot \left(h \cdot \frac{-1}{8}\right)\right), \left(\frac{\color{blue}{D \cdot D}}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
                    4. associate-*l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\left(M \cdot \left(M \cdot \left(h \cdot \frac{-1}{8}\right)\right)\right), \left(\frac{\color{blue}{D \cdot D}}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
                    5. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \left(M \cdot \left(h \cdot \frac{-1}{8}\right)\right)\right), \left(\frac{\color{blue}{D \cdot D}}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
                    6. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \left(h \cdot \frac{-1}{8}\right)\right)\right), \left(\frac{D \cdot \color{blue}{D}}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
                    7. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \left(\frac{D \cdot D}{\left(d \cdot d\right) \cdot \ell}\right)\right)\right) \]
                    8. associate-/l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \left(D \cdot \color{blue}{\frac{D}{\left(d \cdot d\right) \cdot \ell}}\right)\right)\right) \]
                    9. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \mathsf{*.f64}\left(D, \color{blue}{\left(\frac{D}{\left(d \cdot d\right) \cdot \ell}\right)}\right)\right)\right) \]
                    10. /-lowering-/.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \color{blue}{\left(\left(d \cdot d\right) \cdot \ell\right)}\right)\right)\right)\right) \]
                    11. associate-*l*N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \left(d \cdot \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right) \]
                    12. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \color{blue}{\left(d \cdot \ell\right)}\right)\right)\right)\right)\right) \]
                    13. *-lowering-*.f6428.2%

                      \[\leadsto \mathsf{*.f64}\left(w0, \mathsf{*.f64}\left(\mathsf{*.f64}\left(M, \mathsf{*.f64}\left(M, \mathsf{*.f64}\left(h, \frac{-1}{8}\right)\right)\right), \mathsf{*.f64}\left(D, \mathsf{/.f64}\left(D, \mathsf{*.f64}\left(d, \mathsf{*.f64}\left(d, \color{blue}{\ell}\right)\right)\right)\right)\right)\right) \]
                  11. Applied egg-rr28.2%

                    \[\leadsto w0 \cdot \color{blue}{\left(\left(M \cdot \left(M \cdot \left(h \cdot -0.125\right)\right)\right) \cdot \left(D \cdot \frac{D}{d \cdot \left(d \cdot \ell\right)}\right)\right)} \]
                6. Recombined 2 regimes into one program.
                7. Add Preprocessing

                Alternative 17: 67.8% accurate, 216.0× speedup?

                \[\begin{array}{l} \\ w0 \end{array} \]
                (FPCore (w0 M D h l d) :precision binary64 w0)
                double code(double w0, double M, double D, double h, double l, double d) {
                	return w0;
                }
                
                real(8) function code(w0, m, d, h, l, d_1)
                    real(8), intent (in) :: w0
                    real(8), intent (in) :: m
                    real(8), intent (in) :: d
                    real(8), intent (in) :: h
                    real(8), intent (in) :: l
                    real(8), intent (in) :: d_1
                    code = w0
                end function
                
                public static double code(double w0, double M, double D, double h, double l, double d) {
                	return w0;
                }
                
                def code(w0, M, D, h, l, d):
                	return w0
                
                function code(w0, M, D, h, l, d)
                	return w0
                end
                
                function tmp = code(w0, M, D, h, l, d)
                	tmp = w0;
                end
                
                code[w0_, M_, D_, h_, l_, d_] := w0
                
                \begin{array}{l}
                
                \\
                w0
                \end{array}
                
                Derivation
                1. Initial program 80.3%

                  \[w0 \cdot \sqrt{1 - {\left(\frac{M \cdot D}{2 \cdot d}\right)}^{2} \cdot \frac{h}{\ell}} \]
                2. Simplified75.7%

                  \[\leadsto \color{blue}{w0 \cdot \sqrt{1 + \frac{\frac{h}{\ell} \cdot \left(D \cdot \frac{\frac{M \cdot \left(M \cdot D\right)}{d}}{-4}\right)}{d}}} \]
                3. Add Preprocessing
                4. Taylor expanded in h around 0

                  \[\leadsto \color{blue}{w0} \]
                5. Step-by-step derivation
                  1. Simplified66.0%

                    \[\leadsto \color{blue}{w0} \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2024160 
                  (FPCore (w0 M D h l d)
                    :name "Henrywood and Agarwal, Equation (9a)"
                    :precision binary64
                    (* w0 (sqrt (- 1.0 (* (pow (/ (* M D) (* 2.0 d)) 2.0) (/ h l))))))