Toniolo and Linder, Equation (13)

Percentage Accurate: 49.7% → 64.9%
Time: 25.5s
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: 49.7% 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: 64.9% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := n \cdot t_1\\ t_4 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_4 \leq 5 \cdot 10^{-129}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(t_1 \cdot \left(n \cdot \left(U - U*\right)\right) - \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_3 \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l Om) 2.0))
        (t_2 (* (* 2.0 n) U))
        (t_3 (* n t_1))
        (t_4 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_3 (- U* U)))))))
   (if (<= t_4 5e-129)
     (sqrt
      (*
       (* 2.0 n)
       (* U (- t (- (* t_1 (* n (- U U*))) (* (/ (pow l 2.0) Om) -2.0))))))
     (if (<= t_4 INFINITY)
       (sqrt (* t_2 (- (- t (* 2.0 (* l (/ l Om)))) (* t_3 (- U U*)))))
       (*
        (sqrt
         (* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
        (* l (sqrt 2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = pow((l / Om), 2.0);
	double t_2 = (2.0 * n) * U;
	double t_3 = n * t_1;
	double t_4 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))));
	double tmp;
	if (t_4 <= 5e-129) {
		tmp = sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((pow(l, 2.0) / Om) * -2.0))))));
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = Math.pow((l / Om), 2.0);
	double t_2 = (2.0 * n) * U;
	double t_3 = n * t_1;
	double t_4 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))));
	double tmp;
	if (t_4 <= 5e-129) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((Math.pow(l, 2.0) / Om) * -2.0))))));
	} else if (t_4 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))));
	} else {
		tmp = Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * Math.sqrt(2.0));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = math.pow((l / Om), 2.0)
	t_2 = (2.0 * n) * U
	t_3 = n * t_1
	t_4 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))))
	tmp = 0
	if t_4 <= 5e-129:
		tmp = math.sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - ((math.pow(l, 2.0) / Om) * -2.0))))))
	elif t_4 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))))
	else:
		tmp = math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * math.sqrt(2.0))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l / Om) ^ 2.0
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = Float64(n * t_1)
	t_4 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_3 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_4 <= 5e-129)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(Float64(t_1 * Float64(n * Float64(U - U_42_))) - Float64(Float64((l ^ 2.0) / Om) * -2.0))))));
	elseif (t_4 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_3 * Float64(U - U_42_)))));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(2.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = (l / Om) ^ 2.0;
	t_2 = (2.0 * n) * U;
	t_3 = n * t_1;
	t_4 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + (t_3 * (U_42_ - U)))));
	tmp = 0.0;
	if (t_4 <= 5e-129)
		tmp = sqrt(((2.0 * n) * (U * (t - ((t_1 * (n * (U - U_42_))) - (((l ^ 2.0) / Om) * -2.0))))));
	elseif (t_4 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) - (t_3 * (U - U_42_)))));
	else
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(n * t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$3 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 5e-129], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(N[(t$95$1 * N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := n \cdot t_1\\
t_4 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_4 \leq 5 \cdot 10^{-129}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(t_1 \cdot \left(n \cdot \left(U - U*\right)\right) - \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_3 \cdot \left(U - U*\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\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)\\


\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*))))) < 5.00000000000000027e-129

    1. Initial program 29.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. Simplified43.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000027e-129 < (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 73.1%

      \[\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. Step-by-step derivation
      1. associate-*l/75.4%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\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. Simplified8.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 41.0%

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification67.1%

    \[\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^{-129}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right) - \frac{{\ell}^{2}}{Om} \cdot -2\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 \infty:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]

Alternative 2: 64.2% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (* 2.0 n) U))
        (t_2 (* n (pow (/ l Om) 2.0)))
        (t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 U)) (sqrt (* n t)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
       (*
        (sqrt
         (* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
        (* l (sqrt 2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * pow((l / Om), 2.0);
	double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * Math.pow((l / Om), 2.0);
	double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * Math.sqrt(2.0));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = (2.0 * n) * U
	t_2 = n * math.pow((l / Om), 2.0)
	t_3 = math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))))
	else:
		tmp = math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * math.sqrt(2.0))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * U)
	t_2 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_)))));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(2.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = (2.0 * n) * U;
	t_2 = n * ((l / Om) ^ 2.0);
	t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	else
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\

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

\mathbf{else}:\\
\;\;\;\;\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)\\


\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*))))) < 0.0

    1. Initial program 9.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. Simplified9.7%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. unpow-prod-down34.9%

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      4. pow1/234.9%

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    7. Simplified34.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]

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

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l/75.5%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\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. Simplified8.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 41.0%

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.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 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \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(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]

Alternative 3: 64.1% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \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} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (* 2.0 n) U))
        (t_2 (* n (pow (/ l Om) 2.0)))
        (t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 U)) (sqrt (* n t)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
       (*
        (* l (sqrt 2.0))
        (sqrt (* U (* n (- (/ (* n U*) (pow Om 2.0)) (/ 2.0 Om))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * pow((l / Om), 2.0);
	double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * Math.pow((l / Om), 2.0);
	double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = (2.0 * n) * U
	t_2 = n * math.pow((l / Om), 2.0)
	t_3 = math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * U)
	t_2 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_)))));
	else
		tmp = Float64(Float64(l * 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 = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = (2.0 * n) * U;
	t_2 = n * ((l / Om) ^ 2.0);
	t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	else
		tmp = (l * sqrt(2.0)) * sqrt((U * (n * (((n * U_42_) / (Om ^ 2.0)) - (2.0 / Om)))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * 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 = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \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}
\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*))))) < 0.0

    1. Initial program 9.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. Simplified9.7%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. unpow-prod-down34.9%

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      4. pow1/234.9%

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    7. Simplified34.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]

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

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l/75.5%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\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. Simplified8.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 41.0%

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

      \[\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) \]
    5. Step-by-step derivation
      1. *-commutative40.8%

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

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

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

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

    \[\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 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \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(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\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 4: 60.5% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - t_2 \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt[3]{{\left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)}^{1.5}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (* 2.0 n) U))
        (t_2 (* n (pow (/ l Om) 2.0)))
        (t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 U)) (sqrt (* n t)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_1 (- (- t (* 2.0 (* l (/ l Om)))) (* t_2 (- U U*)))))
       (* (* l (sqrt 2.0)) (cbrt (pow (* -2.0 (/ U (/ Om n))) 1.5)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * pow((l / Om), 2.0);
	double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = (l * sqrt(2.0)) * cbrt(pow((-2.0 * (U / (Om / n))), 1.5));
	}
	return tmp;
}
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * Math.pow((l / Om), 2.0);
	double t_3 = Math.sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - (t_2 * (U - U_42_)))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.cbrt(Math.pow((-2.0 * (U / (Om / n))), 1.5));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * U)
	t_2 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(t_2 * Float64(U - U_42_)))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * cbrt((Float64(-2.0 * Float64(U / Float64(Om / n))) ^ 1.5)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[Power[N[(-2.0 * N[(U / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\

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

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt[3]{{\left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)}^{1.5}}\\


\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*))))) < 0.0

    1. Initial program 9.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. Simplified9.7%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. unpow-prod-down34.9%

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      4. pow1/234.9%

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    7. Simplified34.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]

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

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l/75.5%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\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. Simplified8.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 41.0%

      \[\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. add-cbrt-cube41.1%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right) \cdot \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) \]
      2. add-sqr-sqrt41.1%

        \[\leadsto \sqrt[3]{\color{blue}{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)} \cdot \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) \]
      3. pow141.1%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)}^{1}} \cdot \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. pow1/241.1%

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

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

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

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

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

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

    \[\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 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \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(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\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[3]{{\left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)}^{1.5}}\\ \end{array} \]

Alternative 5: 59.3% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{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*))))) < 0.0

    1. Initial program 9.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. Simplified9.7%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. unpow-prod-down34.9%

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      4. pow1/234.9%

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    7. Simplified34.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]

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

    1. Initial program 73.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. Step-by-step derivation
      1. associate-*l/75.5%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\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. Simplified8.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 41.0%

      \[\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. add-cbrt-cube41.1%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right) \cdot \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) \]
      2. add-sqr-sqrt41.1%

        \[\leadsto \sqrt[3]{\color{blue}{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)} \cdot \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) \]
      3. pow141.1%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)}^{1}} \cdot \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. pow1/241.1%

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{n}{Om}}\right) \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. distribute-rgt-neg-in21.5%

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

      \[\leadsto \color{blue}{\left(\sqrt{U \cdot \left(U* - U\right)} \cdot \left(-\frac{n}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.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 0:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \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(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\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 \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{Om}\right)\\ \end{array} \]

Alternative 6: 53.1% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(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)))))))))
l = abs(l);
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_42_ - U))))))));
}
NOTE: l should be positive before calling this function
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_42 - u))))))))
end function
l = Math.abs(l);
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_42_ - U))))))));
}
l = abs(l)
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_42_ - U))))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(-2.0 * Float64(l * Float64(l / Om))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))))))
end
l = abs(l)
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_42_ - U))))))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 56.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. Simplified58.9%

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\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-cbrt58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t + \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) - n \cdot \left(\left(U - U*\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)\right)}\right)} \]
  11. Final simplification58.9%

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

Alternative 7: 53.1% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt
  (*
   (* 2.0 n)
   (*
    U
    (+ (+ t (* -2.0 (/ l (/ Om l)))) (* n (* (pow (/ l Om) 2.0) (- U* U))))))))
l = abs(l);
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 / (Om / l)))) + (n * (pow((l / Om), 2.0) * (U_42_ - U)))))));
}
NOTE: l should be positive before calling this function
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 / (om / l)))) + (n * (((l / om) ** 2.0d0) * (u_42 - u)))))))
end function
l = Math.abs(l);
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 / (Om / l)))) + (n * (Math.pow((l / Om), 2.0) * (U_42_ - U)))))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (math.pow((l / Om), 2.0) * (U_42_ - U)))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U)))))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((2.0 * n) * (U * ((t + (-2.0 * (l / (Om / l)))) + (n * (((l / Om) ^ 2.0) * (U_42_ - U)))))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 56.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. Simplified58.9%

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

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

Alternative 8: 48.1% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-52}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+170}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 2.2e-52)
   (sqrt (* 2.0 (* n (* U t))))
   (if (<= l 3.2e+170)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
     (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 2.2e-52) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else if (l <= 3.2e+170) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 2.2d-52) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else if (l <= 3.2d+170) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 2.2e-52) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else if (l <= 3.2e+170) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 2.2e-52:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	elif l <= 3.2e+170:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om)))))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 2.2e-52)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	elseif (l <= 3.2e+170)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 2.2e-52)
		tmp = sqrt((2.0 * (n * (U * t))));
	elseif (l <= 3.2e+170)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om)))))));
	else
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.2e-52], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+170], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2.2 \cdot 10^{-52}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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

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


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

    1. Initial program 61.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. Simplified63.0%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around 0 47.2%

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

    if 2.20000000000000009e-52 < l < 3.19999999999999979e170

    1. Initial program 52.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.4%

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

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

    if 3.19999999999999979e170 < l

    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. Simplified47.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 77.5%

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

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

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

Alternative 9: 43.4% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq -5.2 \cdot 10^{+180}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n -5.2e+180)
   (sqrt (* 2.0 (fabs (* U (* n t)))))
   (sqrt (* 2.0 (* n (* U (+ t (* (/ (pow l 2.0) Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -5.2e+180) {
		tmp = sqrt((2.0 * fabs((U * (n * t)))));
	} else {
		tmp = sqrt((2.0 * (n * (U * (t + ((pow(l, 2.0) / Om) * -2.0))))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (n <= (-5.2d+180)) then
        tmp = sqrt((2.0d0 * abs((u * (n * t)))))
    else
        tmp = sqrt((2.0d0 * (n * (u * (t + (((l ** 2.0d0) / om) * (-2.0d0)))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -5.2e+180) {
		tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
	} else {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l, 2.0) / Om) * -2.0))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= -5.2e+180:
		tmp = math.sqrt((2.0 * math.fabs((U * (n * t)))))
	else:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l, 2.0) / Om) * -2.0))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= -5.2e+180)
		tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t)))));
	else
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= -5.2e+180)
		tmp = sqrt((2.0 * abs((U * (n * t)))));
	else
		tmp = sqrt((2.0 * (n * (U * (t + (((l ^ 2.0) / Om) * -2.0))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -5.2e+180], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.2 \cdot 10^{+180}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -5.20000000000000042e180

    1. Initial program 54.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. Simplified34.6%

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\sqrt{U \cdot \left(n \cdot t\right)} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)}} \]
      2. pow1/236.1%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)} \]
      3. pow1/243.5%

        \[\leadsto \sqrt{2 \cdot \left({\left(U \cdot \left(n \cdot t\right)\right)}^{0.5} \cdot \color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}}\right)} \]
      4. pow-prod-down33.2%

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot \left(U \cdot \left(n \cdot t\right)\right)}}} \]
      3. rem-sqrt-square44.1%

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

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

    if -5.20000000000000042e180 < n

    1. Initial program 56.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. Simplified59.8%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in n around 0 51.7%

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

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

Alternative 10: 42.5% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq -6.6 \cdot 10^{+209}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n -6.6e+209)
   (* (* l (sqrt 2.0)) (* (sqrt (* U (- U* U))) (/ (- n) Om)))
   (sqrt (* 2.0 (* n (* U (+ t (* (/ (pow l 2.0) Om) -2.0))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -6.6e+209) {
		tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om));
	} else {
		tmp = sqrt((2.0 * (n * (U * (t + ((pow(l, 2.0) / Om) * -2.0))))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (n <= (-6.6d+209)) then
        tmp = (l * sqrt(2.0d0)) * (sqrt((u * (u_42 - u))) * (-n / om))
    else
        tmp = sqrt((2.0d0 * (n * (u * (t + (((l ** 2.0d0) / om) * (-2.0d0)))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -6.6e+209) {
		tmp = (l * Math.sqrt(2.0)) * (Math.sqrt((U * (U_42_ - U))) * (-n / Om));
	} else {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l, 2.0) / Om) * -2.0))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= -6.6e+209:
		tmp = (l * math.sqrt(2.0)) * (math.sqrt((U * (U_42_ - U))) * (-n / Om))
	else:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l, 2.0) / Om) * -2.0))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= -6.6e+209)
		tmp = Float64(Float64(l * sqrt(2.0)) * Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(Float64(-n) / Om)));
	else
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= -6.6e+209)
		tmp = (l * sqrt(2.0)) * (sqrt((U * (U_42_ - U))) * (-n / Om));
	else
		tmp = sqrt((2.0 * (n * (U * (t + (((l ^ 2.0) / Om) * -2.0))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -6.6e+209], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[((-n) / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -6.6 \cdot 10^{+209}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{-n}{Om}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -6.59999999999999961e209

    1. Initial program 47.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. Simplified47.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 22.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. add-cbrt-cube22.4%

        \[\leadsto \color{blue}{\sqrt[3]{\left(\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)}\right) \cdot \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) \]
      2. add-sqr-sqrt22.4%

        \[\leadsto \sqrt[3]{\color{blue}{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)} \cdot \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) \]
      3. pow122.4%

        \[\leadsto \sqrt[3]{\color{blue}{{\left(U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)\right)}^{1}} \cdot \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. pow1/222.8%

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

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

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

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

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

        \[\leadsto \left(-\color{blue}{\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{n}{Om}}\right) \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. distribute-rgt-neg-in33.6%

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

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

    if -6.59999999999999961e209 < n

    1. Initial program 57.1%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in n around 0 51.1%

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

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

Alternative 11: 42.0% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.76 \cdot 10^{+50}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.76e+50)
   (sqrt (* 2.0 (* n (* U t))))
   (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ U (/ Om n)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.76e+50) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 1.76d+50) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * (u / (om / n))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.76e+50) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * (U / (Om / n))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.76e+50:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * (U / (Om / n))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.76e+50)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(U / Float64(Om / n)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.76e+50)
		tmp = sqrt((2.0 * (n * (U * t))));
	else
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * (U / (Om / n))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.76e+50], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * 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 = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.76 \cdot 10^{+50}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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


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

    1. Initial program 60.1%

      \[\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. Simplified61.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around 0 45.2%

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

    if 1.7600000000000001e50 < l

    1. Initial program 42.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. Simplified49.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 63.7%

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

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

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

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

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

Alternative 12: 42.2% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.2 \cdot 10^{+51}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.2e+51)
   (sqrt (* 2.0 (* n (* U t))))
   (* (* l (sqrt 2.0)) (sqrt (* -2.0 (/ (* n U) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.2e+51) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 1.2d+51) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt(((-2.0d0) * ((n * u) / om)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.2e+51) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt((-2.0 * ((n * U) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.2e+51:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt((-2.0 * ((n * U) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.2e+51)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(-2.0 * Float64(Float64(n * U) / Om))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.2e+51)
		tmp = sqrt((2.0 * (n * (U * t))));
	else
		tmp = (l * sqrt(2.0)) * sqrt((-2.0 * ((n * U) / Om)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.2e+51], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.2 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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


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

    1. Initial program 60.1%

      \[\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. Simplified61.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around 0 45.2%

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

    if 1.1999999999999999e51 < l

    1. Initial program 42.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. Simplified49.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around inf 63.7%

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

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

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

Alternative 13: 38.0% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.3 \cdot 10^{-68}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= Om -1.3e-68)
   (sqrt (* 2.0 (* n (* U t))))
   (sqrt (* 2.0 (fabs (* U (* n t)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.3e-68) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = sqrt((2.0 * fabs((U * (n * t)))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (om <= (-1.3d-68)) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else
        tmp = sqrt((2.0d0 * abs((u * (n * t)))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.3e-68) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if Om <= -1.3e-68:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	else:
		tmp = math.sqrt((2.0 * math.fabs((U * (n * t)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.3e-68)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	else
		tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (Om <= -1.3e-68)
		tmp = sqrt((2.0 * (n * (U * t))));
	else
		tmp = sqrt((2.0 * abs((U * (n * t)))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.3e-68], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.3 \cdot 10^{-68}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.2999999999999999e-68

    1. Initial program 54.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. Simplified59.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around 0 42.5%

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

    if -1.2999999999999999e-68 < Om

    1. Initial program 57.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. Simplified55.4%

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

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt37.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\sqrt{U \cdot \left(n \cdot t\right)} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)}} \]
      2. pow1/237.7%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)} \]
      3. pow1/240.2%

        \[\leadsto \sqrt{2 \cdot \left({\left(U \cdot \left(n \cdot t\right)\right)}^{0.5} \cdot \color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}}\right)} \]
      4. pow-prod-down34.7%

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot \left(U \cdot \left(n \cdot t\right)\right)}}} \]
      3. rem-sqrt-square41.0%

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

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

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

Alternative 14: 39.5% accurate, 1.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq 3.9 \cdot 10^{-257}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n 3.9e-257)
   (sqrt (* 2.0 (fabs (* U (* n t)))))
   (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 3.9e-257) {
		tmp = sqrt((2.0 * fabs((U * (n * t)))));
	} else {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (n <= 3.9d-257) then
        tmp = sqrt((2.0d0 * abs((u * (n * t)))))
    else
        tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 3.9e-257) {
		tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
	} else {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= 3.9e-257:
		tmp = math.sqrt((2.0 * math.fabs((U * (n * t)))))
	else:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= 3.9e-257)
		tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t)))));
	else
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= 3.9e-257)
		tmp = sqrt((2.0 * abs((U * (n * t)))));
	else
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 3.9e-257], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq 3.9 \cdot 10^{-257}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\


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

    1. Initial program 60.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. Simplified57.5%

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

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. add-sqr-sqrt39.8%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\sqrt{U \cdot \left(n \cdot t\right)} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)}} \]
      2. pow1/239.8%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)} \]
      3. pow1/242.0%

        \[\leadsto \sqrt{2 \cdot \left({\left(U \cdot \left(n \cdot t\right)\right)}^{0.5} \cdot \color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{0.5}}\right)} \]
      4. pow-prod-down31.3%

        \[\leadsto \sqrt{2 \cdot \color{blue}{{\left(\left(U \cdot \left(n \cdot t\right)\right) \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}}} \]
      5. pow231.3%

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\sqrt{{\left(U \cdot \left(n \cdot t\right)\right)}^{2}}}} \]
      2. unpow231.3%

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

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

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

    if 3.9000000000000001e-257 < n

    1. Initial program 52.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. Simplified56.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\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-cbrt56.5%

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}} \]
    7. Applied egg-rr42.3%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}} \]
    8. Step-by-step derivation
      1. *-commutative42.3%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot \sqrt{U \cdot t} \]
    9. Simplified42.3%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.4%

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

Alternative 15: 37.5% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -9.5 \cdot 10^{-93}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= Om -9.5e-93)
   (sqrt (* 2.0 (* n (* U t))))
   (pow (* 2.0 (* U (* n t))) 0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -9.5e-93) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (om <= (-9.5d-93)) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -9.5e-93) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if Om <= -9.5e-93:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	else:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (Om <= -9.5e-93)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	else
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (Om <= -9.5e-93)
		tmp = sqrt((2.0 * (n * (U * t))));
	else
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -9.5e-93], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -9.5 \cdot 10^{-93}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

\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 Om < -9.5000000000000001e-93

    1. Initial program 54.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. Simplified59.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Taylor expanded in l around 0 42.5%

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

    if -9.5000000000000001e-93 < Om

    1. Initial program 57.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. Simplified55.4%

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

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

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

      \[\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 simplification41.1%

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

Alternative 16: 36.0% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (U * (n * t))));
}
NOTE: l should be positive before calling this function
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 * (u * (n * t))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((2.0 * (U * (n * t))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * t))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * t))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * t))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 56.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. Simplified54.7%

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

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

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

Alternative 17: 35.2% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (n * (U * t))));
}
NOTE: l should be positive before calling this function
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))))
end function
l = Math.abs(l);
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))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (n * (U * t))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(n * Float64(U * t))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (n * (U * t))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 56.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. Simplified58.9%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
  3. Taylor expanded in l around 0 38.3%

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

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

Reproduce

?
herbie shell --seed 2023299 
(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*))))))