Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 66.3%
Time: 31.4s
Alternatives: 17
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt
  (*
   (* (* 2.0 n) U)
   (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)))));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\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: 50.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt
  (*
   (* (* 2.0 n) U)
   (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))));
}
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_)))))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)))));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}
\end{array}

Alternative 1: 66.3% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l_m \cdot \sqrt{2}\\ t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_2 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+144}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right|} \cdot t_1\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* l_m (sqrt 2.0)))
        (t_2
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_2 5e-145)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
     (if (<= t_2 2e+144)
       t_2
       (if (<= t_2 INFINITY)
         (*
          (sqrt
           (fabs (* (* n U) (fma n (* (pow Om -2.0) (- U* U)) (/ -2.0 Om)))))
          t_1)
         (*
          t_1
          (sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om)))))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = l_m * sqrt(2.0);
	double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 5e-145) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (t_2 <= 2e+144) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(fabs(((n * U) * fma(n, (pow(Om, -2.0) * (U_42_ - U)), (-2.0 / Om))))) * t_1;
	} else {
		tmp = t_1 * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * sqrt(2.0))
	t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_2 <= 5e-145)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (t_2 <= 2e+144)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = Float64(sqrt(abs(Float64(Float64(n * U) * fma(n, Float64((Om ^ -2.0) * Float64(U_42_ - U)), Float64(-2.0 / Om))))) * t_1);
	else
		tmp = Float64(t_1 * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om))))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 2e+144], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[Sqrt[N[Abs[N[(N[(n * U), $MachinePrecision] * N[(n * N[(N[Power[Om, -2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * t$95$1), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l_m \cdot \sqrt{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right|} \cdot t_1\\

\mathbf{else}:\\
\;\;\;\;t_1 \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.9999999999999998e-145

    1. Initial program 12.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified38.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 44.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]

    if 4.9999999999999998e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.00000000000000005e144

    1. Initial program 98.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]

    if 2.00000000000000005e144 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < +inf.0

    1. Initial program 31.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified39.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 19.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/19.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval19.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified19.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt19.1%

        \[\leadsto \sqrt{\color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. pow1/219.1%

        \[\leadsto \sqrt{\color{blue}{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)\right)}^{0.5}} \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. pow1/219.3%

        \[\leadsto \sqrt{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)\right)}^{0.5}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      4. pow-prod-down17.5%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)\right) \cdot \left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)\right)\right)}^{0.5}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    7. Applied egg-rr18.6%

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right)}^{2}\right)}^{0.5}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    8. Step-by-step derivation
      1. unpow1/218.6%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right)}^{2}}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. unpow218.6%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right) \cdot \left(\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right)}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. rem-sqrt-square21.6%

        \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right|}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      4. associate-*l*23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \left(\color{blue}{n \cdot \left(\left(U* - U\right) \cdot {Om}^{-2}\right)} - \frac{2}{Om}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      5. metadata-eval23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \left(n \cdot \left(\left(U* - U\right) \cdot {Om}^{-2}\right) - \frac{\color{blue}{2 \cdot 1}}{Om}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      6. associate-*r/23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \left(n \cdot \left(\left(U* - U\right) \cdot {Om}^{-2}\right) - \color{blue}{2 \cdot \frac{1}{Om}}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      7. fma-neg23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, -2 \cdot \frac{1}{Om}\right)}\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      8. associate-*r/23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, -\color{blue}{\frac{2 \cdot 1}{Om}}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      9. metadata-eval23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, -\frac{\color{blue}{2}}{Om}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      10. distribute-neg-frac23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, \color{blue}{\frac{-2}{Om}}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      11. metadata-eval23.8%

        \[\leadsto \sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, \frac{\color{blue}{-2}}{Om}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    9. Simplified23.8%

      \[\leadsto \sqrt{\color{blue}{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot {Om}^{-2}, \frac{-2}{Om}\right)\right|}} \cdot \left(\ell \cdot \sqrt{2}\right) \]

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified7.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 31.2%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/31.2%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval31.2%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified31.2%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in U* around inf 31.2%

      \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\color{blue}{\frac{U* \cdot n}{{Om}^{2}}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 4 regimes into one program.
  4. Final simplification52.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 2 \cdot 10^{+144}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right|} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]

Alternative 2: 63.9% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_1 5e-145)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
     (if (<= t_1 2e+144)
       t_1
       (*
        (* l_m (sqrt 2.0))
        (sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om))))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 5e-145) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (t_1 <= 2e+144) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
    if (t_1 <= 5d-145) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    else if (t_1 <= 2d+144) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * sqrt((u * (n * (((n * u_42) / (om ** 2.0d0)) - (2.0d0 / om)))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 5e-145) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	} else if (t_1 <= 2e+144) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 5e-145:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	elif t_1 <= 2e+144:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 5e-145)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (t_1 <= 2e+144)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om))))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 5e-145)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	elseif (t_1 <= 2e+144)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om)))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+144], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.9999999999999998e-145

    1. Initial program 12.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified38.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 44.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]

    if 4.9999999999999998e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.00000000000000005e144

    1. Initial program 98.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]

    if 2.00000000000000005e144 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

    1. Initial program 21.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified30.0%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 22.8%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/22.8%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval22.8%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified22.8%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in U* around inf 23.0%

      \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\color{blue}{\frac{U* \cdot n}{{Om}^{2}}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 2 \cdot 10^{+144}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]

Alternative 3: 65.2% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{2}{Om}\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_1 5e-145)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
     (if (<= t_1 2e+144)
       t_1
       (*
        (* l_m (sqrt 2.0))
        (sqrt (* (* n U) (- (/ U* (/ (pow Om 2.0) n)) (/ 2.0 Om)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 5e-145) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (t_1 <= 2e+144) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ / (pow(Om, 2.0) / n)) - (2.0 / Om))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + ((n * ((l_m / om) ** 2.0d0)) * (u_42 - u)))))
    if (t_1 <= 5d-145) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    else if (t_1 <= 2d+144) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * sqrt(((n * u) * ((u_42 / ((om ** 2.0d0) / n)) - (2.0d0 / om))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 5e-145) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	} else if (t_1 <= 2e+144) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ / (Math.pow(Om, 2.0) / n)) - (2.0 / Om))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 5e-145:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	elif t_1 <= 2e+144:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ / (math.pow(Om, 2.0) / n)) - (2.0 / Om))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 5e-145)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (t_1 <= 2e+144)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ / Float64((Om ^ 2.0) / n)) - Float64(2.0 / Om)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 5e-145)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	elseif (t_1 <= 2e+144)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ / ((Om ^ 2.0) / n)) - (2.0 / Om))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 5e-145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+144], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ / N[(N[Power[Om, 2.0], $MachinePrecision] / n), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+144}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{2}{Om}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.9999999999999998e-145

    1. Initial program 12.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified38.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 44.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]

    if 4.9999999999999998e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.00000000000000005e144

    1. Initial program 98.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]

    if 2.00000000000000005e144 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

    1. Initial program 21.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified30.0%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 22.8%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/22.8%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval22.8%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified22.8%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in U around 0 23.0%

      \[\leadsto \sqrt{\color{blue}{U \cdot \left(n \cdot \left(\frac{U* \cdot n}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    7. Step-by-step derivation
      1. associate-*r*23.7%

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{U* \cdot n}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. *-commutative23.7%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(\frac{U* \cdot n}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. associate-/l*23.2%

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{U*}{\frac{{Om}^{2}}{n}}} - 2 \cdot \frac{1}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      4. associate-*r/23.2%

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      5. metadata-eval23.2%

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{\color{blue}{2}}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    8. Simplified23.2%

      \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 2 \cdot 10^{+144}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{U*}{\frac{{Om}^{2}}{n}} - \frac{2}{Om}\right)}\\ \end{array} \]

Alternative 4: 60.5% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(\frac{l_m}{Om}\right)}^{2}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t_2 \leq 0:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+288}:\\ \;\;\;\;\sqrt{t_2}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left(t_1 \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l_m Om) 2.0))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* (* n t_1) (- U* U))))))
   (if (<= t_2 0.0)
     (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
     (if (<= t_2 5e+288)
       (sqrt t_2)
       (if (<= t_2 INFINITY)
         (sqrt
          (*
           (* 2.0 n)
           (* U (+ (- t (/ (* 2.0 (* l_m l_m)) Om)) (* n (* t_1 (- U* U)))))))
         (pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 2.0)))))) 0.5))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
	} else if (t_2 <= 5e+288) {
		tmp = sqrt(t_2);
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))));
	} else {
		tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 2.0)))))), 0.5);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
	} else if (t_2 <= 5e+288) {
		tmp = Math.sqrt(t_2);
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))));
	} else {
		tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((l_m / Om), 2.0)
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U)))
	tmp = 0
	if t_2 <= 0.0:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))
	elif t_2 <= 5e+288:
		tmp = math.sqrt(t_2)
	elif t_2 <= math.inf:
		tmp = math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))))
	else:
		tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m / Om) ^ 2.0
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))));
	elseif (t_2 <= 5e+288)
		tmp = sqrt(t_2);
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64(t_1 * Float64(U_42_ - U)))))));
	else
		tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (l_m / Om) ^ 2.0;
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * t_1) * (U_42_ - U)));
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))));
	elseif (t_2 <= 5e+288)
		tmp = sqrt(t_2);
	elseif (t_2 <= Inf)
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (t_1 * (U_42_ - U)))))));
	else
		tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 2.0)))))) ^ 0.5;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 5e+288], N[Sqrt[t$95$2], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(\frac{l_m}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+288}:\\
\;\;\;\;\sqrt{t_2}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left(t_1 \cdot \left(U* - U\right)\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 0.0

    1. Initial program 5.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified39.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in Om around inf 41.7%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{2 \cdot \frac{{\ell}^{2}}{Om}}\right)\right)} \]

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.0000000000000003e288

    1. Initial program 98.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]

    if 5.0000000000000003e288 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0

    1. Initial program 31.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified37.9%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)}} \]

    if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified5.6%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 1.6%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/239.1%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*35.6%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. *-commutative35.6%

        \[\leadsto {\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
      4. cancel-sign-sub-inv35.6%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      5. metadata-eval35.6%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    5. Applied egg-rr35.6%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]
    6. Taylor expanded in t around 0 42.2%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}\right)}^{0.5} \]
    7. Step-by-step derivation
      1. associate-/l*42.3%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}\right)\right)}^{0.5} \]
      2. *-commutative42.3%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}\right)\right)}^{0.5} \]
    8. Simplified42.3%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}\right)}^{0.5} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification59.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 0:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 5 \cdot 10^{+288}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)\right)}^{0.5}\\ \end{array} \]

Alternative 5: 54.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 2.1 \cdot 10^{-31}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;l_m \leq 2.45 \cdot 10^{+218}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 2.1e-31)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (+
       (- t (/ (* 2.0 (* l_m l_m)) Om))
       (* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
   (if (<= l_m 2.45e+218)
     (pow (* 2.0 (* (* n U) (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5)
     (* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.1e-31) {
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else if (l_m <= 2.45e+218) {
		tmp = pow((2.0 * ((n * U) * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
	} else {
		tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 2.1d-31) then
        tmp = sqrt(((2.0d0 * n) * (u * ((t - ((2.0d0 * (l_m * l_m)) / om)) + (n * (((l_m / om) ** 2.0d0) * (u_42 - u)))))))
    else if (l_m <= 2.45d+218) then
        tmp = (2.0d0 * ((n * u) * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
    else
        tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2.1e-31) {
		tmp = Math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (Math.pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else if (l_m <= 2.45e+218) {
		tmp = Math.pow((2.0 * ((n * U) * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 2.1e-31:
		tmp = math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (math.pow((l_m / Om), 2.0) * (U_42_ - U)))))))
	elif l_m <= 2.45e+218:
		tmp = math.pow((2.0 * ((n * U) * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5)
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 2.1e-31)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U)))))));
	elseif (l_m <= 2.45e+218)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 2.1e-31)
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (((l_m / Om) ^ 2.0) * (U_42_ - U)))))));
	elseif (l_m <= 2.45e+218)
		tmp = (2.0 * ((n * U) * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5;
	else
		tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2.1e-31], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.45e+218], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 2.1 \cdot 10^{-31}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\

\mathbf{elif}\;l_m \leq 2.45 \cdot 10^{+218}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.09999999999999991e-31

    1. Initial program 50.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified52.6%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)}} \]

    if 2.09999999999999991e-31 < l < 2.4499999999999999e218

    1. Initial program 41.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified46.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 41.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/257.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*47.8%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. *-commutative47.8%

        \[\leadsto {\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
      4. cancel-sign-sub-inv47.8%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      5. metadata-eval47.8%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    5. Applied egg-rr47.8%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]

    if 2.4499999999999999e218 < l

    1. Initial program 23.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified27.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt70.1%

        \[\leadsto \color{blue}{\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \cdot \sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}} \]
      2. pow270.1%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
      3. associate-*r*75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      4. *-commutative75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      5. div-inv75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\left(n \cdot \left(U* - U\right)\right) \cdot \frac{1}{{Om}^{2}}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      6. pow-flip75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot \color{blue}{{Om}^{\left(-2\right)}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      7. metadata-eval75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{\color{blue}{-2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
    7. Applied egg-rr75.1%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
    8. Taylor expanded in Om around inf 25.4%

      \[\leadsto {\color{blue}{\left(\sqrt{\ell \cdot \sqrt{2}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + \log \left(\frac{1}{Om}\right)\right)}\right)}}^{2} \]
    9. Taylor expanded in n around 0 17.0%

      \[\leadsto \color{blue}{\ell \cdot \left({\left(e^{0.25 \cdot \left(\log n + \left(\log \left(-2 \cdot U\right) + \log \left(\frac{1}{Om}\right)\right)\right)}\right)}^{2} \cdot \sqrt{2}\right)} \]
    10. Simplified46.2%

      \[\leadsto \color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{-2 \cdot \left(U \cdot n\right)}{Om}\right)}^{0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.1 \cdot 10^{-31}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.45 \cdot 10^{+218}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \]

Alternative 6: 49.5% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 3.8 \cdot 10^{-39}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;l_m \leq 1.6 \cdot 10^{+145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;l_m \leq 2.3 \cdot 10^{+218}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 3.8e-39)
   (pow (* 2.0 (* n (* U t))) 0.5)
   (if (<= l_m 1.6e+145)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
     (if (<= l_m 2.3e+218)
       (pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 2.0)))))) 0.5)
       (* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 3.8e-39) {
		tmp = pow((2.0 * (n * (U * t))), 0.5);
	} else if (l_m <= 1.6e+145) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (l_m <= 2.3e+218) {
		tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 2.0)))))), 0.5);
	} else {
		tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 3.8d-39) then
        tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
    else if (l_m <= 1.6d+145) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    else if (l_m <= 2.3d+218) then
        tmp = (2.0d0 * ((-2.0d0) * (u / (om / (n * (l_m ** 2.0d0)))))) ** 0.5d0
    else
        tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 3.8e-39) {
		tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
	} else if (l_m <= 1.6e+145) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	} else if (l_m <= 2.3e+218) {
		tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 3.8e-39:
		tmp = math.pow((2.0 * (n * (U * t))), 0.5)
	elif l_m <= 1.6e+145:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	elif l_m <= 2.3e+218:
		tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5)
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 3.8e-39)
		tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5;
	elseif (l_m <= 1.6e+145)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (l_m <= 2.3e+218)
		tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))) ^ 0.5;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 3.8e-39)
		tmp = (2.0 * (n * (U * t))) ^ 0.5;
	elseif (l_m <= 1.6e+145)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	elseif (l_m <= 2.3e+218)
		tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 2.0)))))) ^ 0.5;
	else
		tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 3.8e-39], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.6e+145], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 2.3e+218], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 3.8 \cdot 10^{-39}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;l_m \leq 1.6 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;l_m \leq 2.3 \cdot 10^{+218}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 3.8000000000000002e-39

    1. Initial program 50.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 40.9%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*39.6%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative39.6%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified39.6%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. pow1/242.8%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*l*44.1%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(n \cdot \left(U \cdot t\right)\right)}\right)}^{0.5} \]
    7. Applied egg-rr44.1%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}} \]

    if 3.8000000000000002e-39 < l < 1.60000000000000004e145

    1. Initial program 48.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified50.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 47.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]

    if 1.60000000000000004e145 < l < 2.3000000000000001e218

    1. Initial program 28.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified37.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 28.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/265.2%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*55.5%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. *-commutative55.5%

        \[\leadsto {\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
      4. cancel-sign-sub-inv55.5%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      5. metadata-eval55.5%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    5. Applied egg-rr55.5%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]
    6. Taylor expanded in t around 0 65.2%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}\right)}^{0.5} \]
    7. Step-by-step derivation
      1. associate-/l*65.2%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}\right)\right)}^{0.5} \]
      2. *-commutative65.2%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}\right)\right)}^{0.5} \]
    8. Simplified65.2%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}\right)}^{0.5} \]

    if 2.3000000000000001e218 < l

    1. Initial program 23.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified27.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt70.1%

        \[\leadsto \color{blue}{\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \cdot \sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}} \]
      2. pow270.1%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
      3. associate-*r*75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      4. *-commutative75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      5. div-inv75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\left(n \cdot \left(U* - U\right)\right) \cdot \frac{1}{{Om}^{2}}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      6. pow-flip75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot \color{blue}{{Om}^{\left(-2\right)}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      7. metadata-eval75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{\color{blue}{-2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
    7. Applied egg-rr75.1%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
    8. Taylor expanded in Om around inf 25.4%

      \[\leadsto {\color{blue}{\left(\sqrt{\ell \cdot \sqrt{2}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + \log \left(\frac{1}{Om}\right)\right)}\right)}}^{2} \]
    9. Taylor expanded in n around 0 17.0%

      \[\leadsto \color{blue}{\ell \cdot \left({\left(e^{0.25 \cdot \left(\log n + \left(\log \left(-2 \cdot U\right) + \log \left(\frac{1}{Om}\right)\right)\right)}\right)}^{2} \cdot \sqrt{2}\right)} \]
    10. Simplified46.2%

      \[\leadsto \color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{-2 \cdot \left(U \cdot n\right)}{Om}\right)}^{0.5}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification45.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-39}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+145}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.3 \cdot 10^{+218}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \]

Alternative 7: 45.3% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{if}\;l_m \leq 1.15 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\ \mathbf{elif}\;l_m \leq 3.4 \cdot 10^{+179}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
   (if (<= l_m 1.15e+51)
     t_1
     (if (<= l_m 1.65e+149)
       (sqrt (* 2.0 (* U (* -2.0 (/ (pow l_m 2.0) (/ Om n))))))
       (if (<= l_m 3.4e+179)
         t_1
         (* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.15e+51) {
		tmp = t_1;
	} else if (l_m <= 1.65e+149) {
		tmp = sqrt((2.0 * (U * (-2.0 * (pow(l_m, 2.0) / (Om / n))))));
	} else if (l_m <= 3.4e+179) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
    if (l_m <= 1.15d+51) then
        tmp = t_1
    else if (l_m <= 1.65d+149) then
        tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((l_m ** 2.0d0) / (om / n))))))
    else if (l_m <= 3.4d+179) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.15e+51) {
		tmp = t_1;
	} else if (l_m <= 1.65e+149) {
		tmp = Math.sqrt((2.0 * (U * (-2.0 * (Math.pow(l_m, 2.0) / (Om / n))))));
	} else if (l_m <= 3.4e+179) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((2.0 * (U * (n * t))), 0.5)
	tmp = 0
	if l_m <= 1.15e+51:
		tmp = t_1
	elif l_m <= 1.65e+149:
		tmp = math.sqrt((2.0 * (U * (-2.0 * (math.pow(l_m, 2.0) / (Om / n))))))
	elif l_m <= 3.4e+179:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
	tmp = 0.0
	if (l_m <= 1.15e+51)
		tmp = t_1;
	elseif (l_m <= 1.65e+149)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l_m ^ 2.0) / Float64(Om / n))))));
	elseif (l_m <= 3.4e+179)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (2.0 * (U * (n * t))) ^ 0.5;
	tmp = 0.0;
	if (l_m <= 1.15e+51)
		tmp = t_1;
	elseif (l_m <= 1.65e+149)
		tmp = sqrt((2.0 * (U * (-2.0 * ((l_m ^ 2.0) / (Om / n))))));
	elseif (l_m <= 3.4e+179)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.15e+51], t$95$1, If[LessEqual[l$95$m, 1.65e+149], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 3.4e+179], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.15 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\

\mathbf{elif}\;l_m \leq 3.4 \cdot 10^{+179}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.15000000000000003e51 or 1.65e149 < l < 3.39999999999999996e179

    1. Initial program 50.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified54.5%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 39.4%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/243.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr43.7%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 1.15000000000000003e51 < l < 1.65e149

    1. Initial program 42.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 55.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Taylor expanded in t around 0 34.2%

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}\right)} \]
    5. Step-by-step derivation
      1. associate-/l*34.2%

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{Om}{n}}}\right)\right)} \]
    6. Simplified34.2%

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{\frac{Om}{n}}\right)}\right)} \]

    if 3.39999999999999996e179 < l

    1. Initial program 20.2%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified23.4%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 67.6%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/67.6%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval67.6%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified67.6%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt67.6%

        \[\leadsto \color{blue}{\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \cdot \sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}} \]
      2. pow267.6%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
      3. associate-*r*68.0%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      4. *-commutative68.0%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      5. div-inv68.0%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\left(n \cdot \left(U* - U\right)\right) \cdot \frac{1}{{Om}^{2}}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      6. pow-flip68.0%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot \color{blue}{{Om}^{\left(-2\right)}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      7. metadata-eval68.0%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{\color{blue}{-2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
    7. Applied egg-rr68.0%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
    8. Taylor expanded in Om around inf 21.7%

      \[\leadsto {\color{blue}{\left(\sqrt{\ell \cdot \sqrt{2}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + \log \left(\frac{1}{Om}\right)\right)}\right)}}^{2} \]
    9. Taylor expanded in n around 0 14.5%

      \[\leadsto \color{blue}{\ell \cdot \left({\left(e^{0.25 \cdot \left(\log n + \left(\log \left(-2 \cdot U\right) + \log \left(\frac{1}{Om}\right)\right)\right)}\right)}^{2} \cdot \sqrt{2}\right)} \]
    10. Simplified43.5%

      \[\leadsto \color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{-2 \cdot \left(U \cdot n\right)}{Om}\right)}^{0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification43.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.15 \cdot 10^{+51}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{\ell}^{2}}{\frac{Om}{n}}\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+179}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \]

Alternative 8: 43.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;l_m \leq 1.4 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\ \mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
   (if (<= l_m 1.3e+51)
     t_1
     (if (<= l_m 1.4e+149)
       (sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)))
       (if (<= l_m 6.5e+195)
         t_1
         (* (* l_m (sqrt 2.0)) (sqrt (* -2.0 (/ U (/ Om n))))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.3e+51) {
		tmp = t_1;
	} else if (l_m <= 1.4e+149) {
		tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)));
	} else if (l_m <= 6.5e+195) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
    if (l_m <= 1.3d+51) then
        tmp = t_1
    else if (l_m <= 1.4d+149) then
        tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)))
    else if (l_m <= 6.5d+195) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u / (om / n))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.3e+51) {
		tmp = t_1;
	} else if (l_m <= 1.4e+149) {
		tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
	} else if (l_m <= 6.5e+195) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U / (Om / n))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((2.0 * (U * (n * t))), 0.5)
	tmp = 0
	if l_m <= 1.3e+51:
		tmp = t_1
	elif l_m <= 1.4e+149:
		tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)))
	elif l_m <= 6.5e+195:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((-2.0 * (U / (Om / n))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
	tmp = 0.0
	if (l_m <= 1.3e+51)
		tmp = t_1;
	elseif (l_m <= 1.4e+149)
		tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)));
	elseif (l_m <= 6.5e+195)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (2.0 * (U * (n * t))) ^ 0.5;
	tmp = 0.0;
	if (l_m <= 1.3e+51)
		tmp = t_1;
	elseif (l_m <= 1.4e+149)
		tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)));
	elseif (l_m <= 6.5e+195)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.3e+51], t$95$1, If[LessEqual[l$95$m, 1.4e+149], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6.5e+195], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;l_m \leq 1.4 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\

\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.3000000000000001e51 or 1.4e149 < l < 6.5000000000000003e195

    1. Initial program 49.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified54.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 39.2%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/243.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 1.3000000000000001e51 < l < 1.4e149

    1. Initial program 42.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. add-cube-cbrt55.5%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)} \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right) \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}}\right)\right)} \]
      2. pow355.5%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    4. Applied egg-rr55.5%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    5. Taylor expanded in l around inf 34.1%

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]

    if 6.5000000000000003e195 < l

    1. Initial program 21.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified24.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in n around 0 33.6%

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \frac{U \cdot n}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    7. Step-by-step derivation
      1. *-commutative33.6%

        \[\leadsto \sqrt{\color{blue}{\frac{U \cdot n}{Om} \cdot -2}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. associate-/l*25.5%

        \[\leadsto \sqrt{\color{blue}{\frac{U}{\frac{Om}{n}}} \cdot -2} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    8. Simplified25.5%

      \[\leadsto \sqrt{\color{blue}{\frac{U}{\frac{Om}{n}} \cdot -2}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.4 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}}\\ \mathbf{elif}\;\ell \leq 6.5 \cdot 10^{+195}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\ \end{array} \]

Alternative 9: 44.3% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\ \mathbf{elif}\;l_m \leq 9 \cdot 10^{+194}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
   (if (<= l_m 1.3e+51)
     t_1
     (if (<= l_m 1.65e+149)
       (sqrt (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)))
       (if (<= l_m 9e+194)
         t_1
         (* (* l_m (sqrt 2.0)) (sqrt (/ (* (* n U) -2.0) Om))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.3e+51) {
		tmp = t_1;
	} else if (l_m <= 1.65e+149) {
		tmp = sqrt((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)));
	} else if (l_m <= 9e+194) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -2.0) / Om));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
    if (l_m <= 1.3d+51) then
        tmp = t_1
    else if (l_m <= 1.65d+149) then
        tmp = sqrt(((-4.0d0) * ((u * (n * (l_m ** 2.0d0))) / om)))
    else if (l_m <= 9d+194) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * sqrt((((n * u) * (-2.0d0)) / om))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 1.3e+51) {
		tmp = t_1;
	} else if (l_m <= 1.65e+149) {
		tmp = Math.sqrt((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)));
	} else if (l_m <= 9e+194) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((((n * U) * -2.0) / Om));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((2.0 * (U * (n * t))), 0.5)
	tmp = 0
	if l_m <= 1.3e+51:
		tmp = t_1
	elif l_m <= 1.65e+149:
		tmp = math.sqrt((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)))
	elif l_m <= 9e+194:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((((n * U) * -2.0) / Om))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
	tmp = 0.0
	if (l_m <= 1.3e+51)
		tmp = t_1;
	elseif (l_m <= 1.65e+149)
		tmp = sqrt(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)));
	elseif (l_m <= 9e+194)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(Float64(n * U) * -2.0) / Om)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (2.0 * (U * (n * t))) ^ 0.5;
	tmp = 0.0;
	if (l_m <= 1.3e+51)
		tmp = t_1;
	elseif (l_m <= 1.65e+149)
		tmp = sqrt((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)));
	elseif (l_m <= 9e+194)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -2.0) / Om));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 1.3e+51], t$95$1, If[LessEqual[l$95$m, 1.65e+149], N[Sqrt[N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 9e+194], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 1.3 \cdot 10^{+51}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;l_m \leq 1.65 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l_m}^{2}\right)}{Om}}\\

\mathbf{elif}\;l_m \leq 9 \cdot 10^{+194}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.3000000000000001e51 or 1.65e149 < l < 8.9999999999999997e194

    1. Initial program 49.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified54.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 39.2%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/243.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 1.3000000000000001e51 < l < 1.65e149

    1. Initial program 42.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. add-cube-cbrt55.5%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)} \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right) \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}}\right)\right)} \]
      2. pow355.5%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    4. Applied egg-rr55.5%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    5. Taylor expanded in l around inf 34.1%

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]

    if 8.9999999999999997e194 < l

    1. Initial program 21.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified24.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in n around 0 33.6%

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \frac{U \cdot n}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    7. Step-by-step derivation
      1. associate-*r/33.7%

        \[\leadsto \sqrt{\color{blue}{\frac{-2 \cdot \left(U \cdot n\right)}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. *-commutative33.7%

        \[\leadsto \sqrt{\frac{-2 \cdot \color{blue}{\left(n \cdot U\right)}}{Om}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    8. Simplified33.7%

      \[\leadsto \sqrt{\color{blue}{\frac{-2 \cdot \left(n \cdot U\right)}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.3 \cdot 10^{+51}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}}\\ \mathbf{elif}\;\ell \leq 9 \cdot 10^{+194}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\ \end{array} \]

Alternative 10: 44.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{if}\;l_m \leq 9.5 \cdot 10^{+50}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;l_m \leq 1.15 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\ \mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (* 2.0 (* U (* n t))) 0.5)))
   (if (<= l_m 9.5e+50)
     t_1
     (if (<= l_m 1.15e+149)
       (sqrt (* 2.0 (* U (* -2.0 (/ (pow l_m 2.0) (/ Om n))))))
       (if (<= l_m 6.5e+195)
         t_1
         (* (* l_m (sqrt 2.0)) (sqrt (/ (* (* n U) -2.0) Om))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 9.5e+50) {
		tmp = t_1;
	} else if (l_m <= 1.15e+149) {
		tmp = sqrt((2.0 * (U * (-2.0 * (pow(l_m, 2.0) / (Om / n))))));
	} else if (l_m <= 6.5e+195) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -2.0) / Om));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (2.0d0 * (u * (n * t))) ** 0.5d0
    if (l_m <= 9.5d+50) then
        tmp = t_1
    else if (l_m <= 1.15d+149) then
        tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((l_m ** 2.0d0) / (om / n))))))
    else if (l_m <= 6.5d+195) then
        tmp = t_1
    else
        tmp = (l_m * sqrt(2.0d0)) * sqrt((((n * u) * (-2.0d0)) / om))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((2.0 * (U * (n * t))), 0.5);
	double tmp;
	if (l_m <= 9.5e+50) {
		tmp = t_1;
	} else if (l_m <= 1.15e+149) {
		tmp = Math.sqrt((2.0 * (U * (-2.0 * (Math.pow(l_m, 2.0) / (Om / n))))));
	} else if (l_m <= 6.5e+195) {
		tmp = t_1;
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((((n * U) * -2.0) / Om));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((2.0 * (U * (n * t))), 0.5)
	tmp = 0
	if l_m <= 9.5e+50:
		tmp = t_1
	elif l_m <= 1.15e+149:
		tmp = math.sqrt((2.0 * (U * (-2.0 * (math.pow(l_m, 2.0) / (Om / n))))))
	elif l_m <= 6.5e+195:
		tmp = t_1
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((((n * U) * -2.0) / Om))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
	tmp = 0.0
	if (l_m <= 9.5e+50)
		tmp = t_1;
	elseif (l_m <= 1.15e+149)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l_m ^ 2.0) / Float64(Om / n))))));
	elseif (l_m <= 6.5e+195)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(Float64(n * U) * -2.0) / Om)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (2.0 * (U * (n * t))) ^ 0.5;
	tmp = 0.0;
	if (l_m <= 9.5e+50)
		tmp = t_1;
	elseif (l_m <= 1.15e+149)
		tmp = sqrt((2.0 * (U * (-2.0 * ((l_m ^ 2.0) / (Om / n))))));
	elseif (l_m <= 6.5e+195)
		tmp = t_1;
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((((n * U) * -2.0) / Om));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 9.5e+50], t$95$1, If[LessEqual[l$95$m, 1.15e+149], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6.5e+195], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\
\mathbf{if}\;l_m \leq 9.5 \cdot 10^{+50}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;l_m \leq 1.15 \cdot 10^{+149}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{l_m}^{2}}{\frac{Om}{n}}\right)\right)}\\

\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+195}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 9.4999999999999993e50 or 1.1499999999999999e149 < l < 6.5000000000000003e195

    1. Initial program 49.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified54.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 39.2%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/243.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr43.5%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 9.4999999999999993e50 < l < 1.1499999999999999e149

    1. Initial program 42.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 55.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Taylor expanded in t around 0 34.2%

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}\right)} \]
    5. Step-by-step derivation
      1. associate-/l*34.2%

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \color{blue}{\frac{{\ell}^{2}}{\frac{Om}{n}}}\right)\right)} \]
    6. Simplified34.2%

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{\frac{Om}{n}}\right)}\right)} \]

    if 6.5000000000000003e195 < l

    1. Initial program 21.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified24.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval66.4%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified66.4%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Taylor expanded in n around 0 33.6%

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \frac{U \cdot n}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    7. Step-by-step derivation
      1. associate-*r/33.7%

        \[\leadsto \sqrt{\color{blue}{\frac{-2 \cdot \left(U \cdot n\right)}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. *-commutative33.7%

        \[\leadsto \sqrt{\frac{-2 \cdot \color{blue}{\left(n \cdot U\right)}}{Om}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    8. Simplified33.7%

      \[\leadsto \sqrt{\color{blue}{\frac{-2 \cdot \left(n \cdot U\right)}{Om}}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification41.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{+50}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+149}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{{\ell}^{2}}{\frac{Om}{n}}\right)\right)}\\ \mathbf{elif}\;\ell \leq 6.5 \cdot 10^{+195}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{\left(n \cdot U\right) \cdot -2}{Om}}\\ \end{array} \]

Alternative 11: 46.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 0.62:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;l_m \leq 1.75 \cdot 10^{+219}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 0.62)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= l_m 1.75e+219)
     (pow (* 2.0 (* -2.0 (/ U (/ Om (* n (pow l_m 2.0)))))) 0.5)
     (* (* l_m (sqrt 2.0)) (pow (/ (* (* n U) -2.0) Om) 0.5)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 0.62) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (l_m <= 1.75e+219) {
		tmp = pow((2.0 * (-2.0 * (U / (Om / (n * pow(l_m, 2.0)))))), 0.5);
	} else {
		tmp = (l_m * sqrt(2.0)) * pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 0.62d0) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (l_m <= 1.75d+219) then
        tmp = (2.0d0 * ((-2.0d0) * (u / (om / (n * (l_m ** 2.0d0)))))) ** 0.5d0
    else
        tmp = (l_m * sqrt(2.0d0)) * ((((n * u) * (-2.0d0)) / om) ** 0.5d0)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 0.62) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (l_m <= 1.75e+219) {
		tmp = Math.pow((2.0 * (-2.0 * (U / (Om / (n * Math.pow(l_m, 2.0)))))), 0.5);
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.pow((((n * U) * -2.0) / Om), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 0.62:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif l_m <= 1.75e+219:
		tmp = math.pow((2.0 * (-2.0 * (U / (Om / (n * math.pow(l_m, 2.0)))))), 0.5)
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.pow((((n * U) * -2.0) / Om), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 0.62)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (l_m <= 1.75e+219)
		tmp = Float64(2.0 * Float64(-2.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0)))))) ^ 0.5;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(Float64(Float64(n * U) * -2.0) / Om) ^ 0.5));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 0.62)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (l_m <= 1.75e+219)
		tmp = (2.0 * (-2.0 * (U / (Om / (n * (l_m ^ 2.0)))))) ^ 0.5;
	else
		tmp = (l_m * sqrt(2.0)) * ((((n * U) * -2.0) / Om) ^ 0.5);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 0.62], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.75e+219], N[Power[N[(2.0 * N[(-2.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(N[(N[(n * U), $MachinePrecision] * -2.0), $MachinePrecision] / Om), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 0.62:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;l_m \leq 1.75 \cdot 10^{+219}:\\
\;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 0.619999999999999996

    1. Initial program 51.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.4%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 41.3%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/244.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr44.9%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 0.619999999999999996 < l < 1.7500000000000001e219

    1. Initial program 36.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified44.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Taylor expanded in n around 0 39.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/257.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*44.6%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. *-commutative44.6%

        \[\leadsto {\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
      4. cancel-sign-sub-inv44.6%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      5. metadata-eval44.6%

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    5. Applied egg-rr44.6%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]
    6. Taylor expanded in t around 0 42.3%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}\right)}^{0.5} \]
    7. Step-by-step derivation
      1. associate-/l*45.7%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}\right)\right)}^{0.5} \]
      2. *-commutative45.7%

        \[\leadsto {\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}\right)\right)}^{0.5} \]
    8. Simplified45.7%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)}\right)}^{0.5} \]

    if 1.7500000000000001e219 < l

    1. Initial program 23.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified27.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around inf 70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    4. Step-by-step derivation
      1. associate-*r/70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. metadata-eval70.1%

        \[\leadsto \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{\color{blue}{2}}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
    5. Simplified70.1%

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. add-sqr-sqrt70.1%

        \[\leadsto \color{blue}{\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \cdot \sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}} \]
      2. pow270.1%

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
      3. associate-*r*75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      4. *-commutative75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      5. div-inv75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\left(n \cdot \left(U* - U\right)\right) \cdot \frac{1}{{Om}^{2}}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      6. pow-flip75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot \color{blue}{{Om}^{\left(-2\right)}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
      7. metadata-eval75.1%

        \[\leadsto {\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{\color{blue}{-2}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2} \]
    7. Applied egg-rr75.1%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{\left(n \cdot U\right) \cdot \left(\left(n \cdot \left(U* - U\right)\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)}\right)}^{2}} \]
    8. Taylor expanded in Om around inf 25.4%

      \[\leadsto {\color{blue}{\left(\sqrt{\ell \cdot \sqrt{2}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + \log \left(\frac{1}{Om}\right)\right)}\right)}}^{2} \]
    9. Taylor expanded in n around 0 17.0%

      \[\leadsto \color{blue}{\ell \cdot \left({\left(e^{0.25 \cdot \left(\log n + \left(\log \left(-2 \cdot U\right) + \log \left(\frac{1}{Om}\right)\right)\right)}\right)}^{2} \cdot \sqrt{2}\right)} \]
    10. Simplified46.2%

      \[\leadsto \color{blue}{\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{-2 \cdot \left(U \cdot n\right)}{Om}\right)}^{0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 0.62:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+219}:\\ \;\;\;\;{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(\frac{\left(n \cdot U\right) \cdot -2}{Om}\right)}^{0.5}\\ \end{array} \]

Alternative 12: 49.8% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (pow (* 2.0 (* (* n U) (+ t (* (/ (pow l_m 2.0) Om) -2.0)))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return pow((2.0 * ((n * U) * (t + ((pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = (2.0d0 * ((n * u) * (t + (((l_m ** 2.0d0) / om) * (-2.0d0))))) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.pow((2.0 * ((n * U) * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5);
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.pow((2.0 * ((n * U) * (t + ((math.pow(l_m, 2.0) / Om) * -2.0)))), 0.5)
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = (2.0 * ((n * U) * (t + (((l_m ^ 2.0) / Om) * -2.0)))) ^ 0.5;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 46.4%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Simplified52.3%

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
  3. Taylor expanded in n around 0 43.9%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
  4. Step-by-step derivation
    1. pow1/252.1%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
    2. associate-*r*48.9%

      \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
    3. *-commutative48.9%

      \[\leadsto {\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    4. cancel-sign-sub-inv48.9%

      \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
    5. metadata-eval48.9%

      \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
  5. Applied egg-rr48.9%

    \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]
  6. Final simplification48.9%

    \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5} \]

Alternative 13: 35.8% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.85 \cdot 10^{-117}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;Om \leq 3.8 \cdot 10^{-61}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -1.85e-117)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= Om 3.8e-61)
     (sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
     (pow (* 2.0 (* n (* U t))) 0.5))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.85e-117) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (Om <= 3.8e-61) {
		tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
	} else {
		tmp = pow((2.0 * (n * (U * t))), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (om <= (-1.85d-117)) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (om <= 3.8d-61) then
        tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
    else
        tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.85e-117) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (Om <= 3.8e-61) {
		tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
	} else {
		tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if Om <= -1.85e-117:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif Om <= 3.8e-61:
		tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0))))))
	else:
		tmp = math.pow((2.0 * (n * (U * t))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.85e-117)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (Om <= 3.8e-61)
		tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0))))));
	else
		tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (Om <= -1.85e-117)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (Om <= 3.8e-61)
		tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0))))));
	else
		tmp = (2.0 * (n * (U * t))) ^ 0.5;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.85e-117], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[Om, 3.8e-61], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.85 \cdot 10^{-117}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;Om \leq 3.8 \cdot 10^{-61}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -1.8500000000000001e-117

    1. Initial program 49.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified52.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 42.3%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/244.1%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr44.1%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if -1.8500000000000001e-117 < Om < 3.7999999999999998e-61

    1. Initial program 33.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified36.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)}} \]
    3. Step-by-step derivation
      1. add-cube-cbrt36.8%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)} \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right) \cdot \sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}}\right)\right)} \]
      2. pow336.8%

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    4. Applied egg-rr36.8%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) - \color{blue}{{\left(\sqrt[3]{n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)}\right)}^{3}}\right)\right)} \]
    5. Taylor expanded in l around inf 23.3%

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
    6. Step-by-step derivation
      1. associate-/l*28.8%

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
    7. Simplified28.8%

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]

    if 3.7999999999999998e-61 < Om

    1. Initial program 51.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified58.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 46.8%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*48.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative48.7%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified48.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. pow1/249.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*l*50.9%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(n \cdot \left(U \cdot t\right)\right)}\right)}^{0.5} \]
    7. Applied egg-rr50.9%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification42.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.85 \cdot 10^{-117}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;Om \leq 3.8 \cdot 10^{-61}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \]

Alternative 14: 38.3% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;n \leq -1.36 \cdot 10^{-93}:\\ \;\;\;\;{\left({\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.25}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= n -1.36e-93)
   (pow (pow (* 2.0 (* t (* n U))) 0.25) 2.0)
   (pow (* 2.0 (* U (* n t))) 0.5)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (n <= -1.36e-93) {
		tmp = pow(pow((2.0 * (t * (n * U))), 0.25), 2.0);
	} else {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (n <= (-1.36d-93)) then
        tmp = ((2.0d0 * (t * (n * u))) ** 0.25d0) ** 2.0d0
    else
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (n <= -1.36e-93) {
		tmp = Math.pow(Math.pow((2.0 * (t * (n * U))), 0.25), 2.0);
	} else {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if n <= -1.36e-93:
		tmp = math.pow(math.pow((2.0 * (t * (n * U))), 0.25), 2.0)
	else:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (n <= -1.36e-93)
		tmp = (Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.25) ^ 2.0;
	else
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (n <= -1.36e-93)
		tmp = ((2.0 * (t * (n * U))) ^ 0.25) ^ 2.0;
	else
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, -1.36e-93], N[Power[N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], 2.0], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.36 \cdot 10^{-93}:\\
\;\;\;\;{\left({\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.25}\right)}^{2}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.3599999999999999e-93

    1. Initial program 52.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Applied egg-rr53.9%

      \[\leadsto \color{blue}{{\left({\left(\left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.25}\right)}^{2}} \]
    4. Taylor expanded in l around 0 38.3%

      \[\leadsto {\color{blue}{\left({\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.25}\right)}}^{2} \]
    5. Step-by-step derivation
      1. associate-*r*42.9%

        \[\leadsto {\left({\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}\right)}^{0.25}\right)}^{2} \]
    6. Simplified42.9%

      \[\leadsto {\color{blue}{\left({\left(2 \cdot \left(\left(U \cdot n\right) \cdot t\right)\right)}^{0.25}\right)}}^{2} \]

    if -1.3599999999999999e-93 < n

    1. Initial program 42.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified46.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 35.8%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. pow1/239.4%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    5. Applied egg-rr39.4%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1.36 \cdot 10^{-93}:\\ \;\;\;\;{\left({\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.25}\right)}^{2}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \]

Alternative 15: 36.1% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq 1.25 \cdot 10^{-267}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U 1.25e-267)
   (sqrt (* 2.0 (* U (* n t))))
   (sqrt (* 2.0 (* t (* n U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 1.25e-267) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((2.0 * (t * (n * U))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (u <= 1.25d-267) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt((2.0d0 * (t * (n * u))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 1.25e-267) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= 1.25e-267:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= 1.25e-267)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (U <= 1.25e-267)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((2.0 * (t * (n * U))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.25e-267], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.25 \cdot 10^{-267}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 1.25e-267

    1. Initial program 47.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified51.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 41.4%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]

    if 1.25e-267 < U

    1. Initial program 44.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified49.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Taylor expanded in l around 0 26.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*30.9%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative30.9%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified30.9%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 1.25 \cdot 10^{-267}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]

Alternative 16: 38.1% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (pow (* 2.0 (* U (* n t))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return pow((2.0 * (U * (n * t))), 0.5);
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = (2.0d0 * (u * (n * t))) ** 0.5d0
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.pow((2.0 * (U * (n * t))), 0.5);
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.pow((2.0 * (U * (n * t))), 0.5)
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = (2.0 * (U * (n * t))) ^ 0.5;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 46.4%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Simplified50.5%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
  3. Taylor expanded in l around 0 34.7%

    \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
  4. Step-by-step derivation
    1. pow1/239.0%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  5. Applied egg-rr39.0%

    \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  6. Final simplification39.0%

    \[\leadsto {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5} \]

Alternative 17: 36.1% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt((2.0 * (U * (n * t))));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((2.0d0 * (u * (n * t))))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.sqrt((2.0 * (U * (n * t))));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * t))))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * t))))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * t))));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 46.4%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Simplified50.5%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
  3. Taylor expanded in l around 0 34.7%

    \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
  4. Final simplification34.7%

    \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \]

Reproduce

?
herbie shell --seed 2023331 
(FPCore (n U t l Om U*)
  :name "Toniolo and Linder, Equation (13)"
  :precision binary64
  (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))