Toniolo and Linder, Equation (13)

Percentage Accurate: 50.5% → 69.8%
Time: 24.0s
Alternatives: 16
Speedup: 1.8×

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 16 alternatives:

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

Initial Program: 50.5% 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: 69.8% accurate, 0.5× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\ t_3 := t_1 \cdot \left(t_2 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;\sqrt{t_1 \cdot \left(t_2 + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n}{Om} \cdot \left(U \cdot \left(-2 + \frac{n}{Om} \cdot \left(U* - U\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
 (let* ((t_1 (* (* 2.0 n) U))
        (t_2 (- t (* 2.0 (/ (* l l) Om))))
        (t_3 (* t_1 (+ t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
   (if (<= t_3 0.0)
     (pow
      (*
       2.0
       (+
        (* n (* U t))
        (/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
      0.5)
     (if (<= t_3 5e+307)
       (sqrt (* t_1 (+ t_2 (* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))
       (*
        (* l (sqrt 2.0))
        (sqrt (* (/ n Om) (* U (+ -2.0 (* (/ n Om) (- U* U)))))))))))
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 = t - (2.0 * ((l * l) / Om));
	double t_3 = t_1 * (t_2 + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	} else if (t_3 <= 5e+307) {
		tmp = sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))));
	}
	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) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (2.0d0 * n) * u
    t_2 = t - (2.0d0 * ((l * l) / om))
    t_3 = t_1 * (t_2 + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))
    if (t_3 <= 0.0d0) then
        tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 0.5d0
    else if (t_3 <= 5d+307) then
        tmp = sqrt((t_1 * (t_2 + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt(((n / om) * (u * ((-2.0d0) + ((n / om) * (u_42 - u))))))
    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 t_1 = (2.0 * n) * U;
	double t_2 = t - (2.0 * ((l * l) / Om));
	double t_3 = t_1 * (t_2 + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	} else if (t_3 <= 5e+307) {
		tmp = Math.sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = (2.0 * n) * U
	t_2 = t - (2.0 * ((l * l) / Om))
	t_3 = t_1 * (t_2 + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5)
	elif t_3 <= 5e+307:
		tmp = math.sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))))
	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(t - Float64(2.0 * Float64(Float64(l * l) / Om)))
	t_3 = Float64(t_1 * Float64(t_2 + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5;
	elseif (t_3 <= 5e+307)
		tmp = sqrt(Float64(t_1 * Float64(t_2 + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U)))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n / Om) * Float64(U * Float64(-2.0 + Float64(Float64(n / Om) * Float64(U_42_ - U)))))));
	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 = t - (2.0 * ((l * l) / Om));
	t_3 = t_1 * (t_2 + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 0.5;
	elseif (t_3 <= 5e+307)
		tmp = sqrt((t_1 * (t_2 + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	else
		tmp = (l * sqrt(2.0)) * sqrt(((n / Om) * (U * (-2.0 + ((n / Om) * (U_42_ - U))))));
	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[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$3, 5e+307], N[Sqrt[N[(t$95$1 * N[(t$95$2 + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n / Om), $MachinePrecision] * N[(U * N[(-2.0 + N[(N[(n / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $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 := t - 2 \cdot \frac{\ell \cdot \ell}{Om}\\
t_3 := t_1 \cdot \left(t_2 + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t_2 + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\

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


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

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

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + 2 \cdot \frac{\left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + -2 \cdot \ell\right) \cdot \left(n \cdot \left(\ell \cdot U\right)\right)}{Om}\right)}^{0.5}} \]
      2. distribute-lft-out38.1%

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

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

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

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

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

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

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

    1. Initial program 94.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. Taylor expanded in n around 0 80.4%

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

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

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

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

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

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

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

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

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

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

    if 5e307 < (*.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 19.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. Simplified32.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 63.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 56.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. Taylor expanded in n around 0 47.1%

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}}} \cdot \left(U - U*\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity47.9%

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

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

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

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

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

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

        \[\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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
    10. Applied egg-rr60.1%

      \[\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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]

    if 4e5 < l < 1.2999999999999999e147

    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. Simplified81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2999999999999999e147 < l

    1. Initial program 15.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. Simplified47.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 57.4% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;U \leq -1.2 \cdot 10^{-33}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 2.3 \cdot 10^{-178}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \mathbf{elif}\;U \leq 3.2 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{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
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (* l (/ l Om))))
            (* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))))
   (if (<= U -1.2e-33)
     t_1
     (if (<= U 2.3e-178)
       (pow
        (*
         2.0
         (+
          (* n (* U t))
          (/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
        0.5)
       (if (<= U 3.2e-99)
         t_1
         (sqrt
          (*
           (* 2.0 n)
           (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double tmp;
	if (U <= -1.2e-33) {
		tmp = t_1;
	} else if (U <= 2.3e-178) {
		tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	} else if (U <= 3.2e-99) {
		tmp = t_1;
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * (l * (l / om)))) + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
    if (u <= (-1.2d-33)) then
        tmp = t_1
    else if (u <= 2.3d-178) then
        tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 0.5d0
    else if (u <= 3.2d-99) then
        tmp = t_1
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / 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 t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double tmp;
	if (U <= -1.2e-33) {
		tmp = t_1;
	} else if (U <= 2.3e-178) {
		tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	} else if (U <= 3.2e-99) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))))
	tmp = 0
	if U <= -1.2e-33:
		tmp = t_1
	elif U <= 2.3e-178:
		tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5)
	elif U <= 3.2e-99:
		tmp = t_1
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (U <= -1.2e-33)
		tmp = t_1;
	elseif (U <= 2.3e-178)
		tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5;
	elseif (U <= 3.2e-99)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	tmp = 0.0;
	if (U <= -1.2e-33)
		tmp = t_1;
	elseif (U <= 2.3e-178)
		tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 0.5;
	elseif (U <= 3.2e-99)
		tmp = t_1;
	else
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -1.2e-33], t$95$1, If[LessEqual[U, 2.3e-178], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[U, 3.2e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;U \leq -1.2 \cdot 10^{-33}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;U \leq 3.2 \cdot 10^{-99}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -1.2e-33 or 2.29999999999999994e-178 < U < 3.2000000000000001e-99

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}}} \cdot \left(U - U*\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity47.9%

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

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

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

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

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

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

        \[\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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
    10. Applied egg-rr65.2%

      \[\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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]

    if -1.2e-33 < U < 2.29999999999999994e-178

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

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(t \cdot U\right)\right) + 2 \cdot \frac{\left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + -2 \cdot \ell\right) \cdot \left(n \cdot \left(\ell \cdot U\right)\right)}{Om}\right)}^{0.5}} \]
      2. distribute-lft-out63.1%

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

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

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

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

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

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

    if 3.2000000000000001e-99 < U

    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. Simplified56.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.2 \cdot 10^{-33}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;U \leq 2.3 \cdot 10^{-178}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \mathbf{elif}\;U \leq 3.2 \cdot 10^{-99}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \end{array} \]

Alternative 4: 56.6% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ t_2 := \ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\\ \mathbf{if}\;U \leq -1.7 \cdot 10^{-36}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 1.25 \cdot 10^{-211}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot t_2}{Om}}\\ \mathbf{elif}\;U \leq 1.02 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot t_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
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (* l (/ l Om))))
            (* (/ n (* (/ Om l) (/ Om l))) (- U* U))))))
        (t_2 (+ (* l -2.0) (/ (* n (* l U*)) Om))))
   (if (<= U -1.7e-36)
     t_1
     (if (<= U 1.25e-211)
       (sqrt (+ (* 2.0 (* n (* U t))) (* 2.0 (/ (* (* n (* U l)) t_2) Om))))
       (if (<= U 1.02e-99)
         t_1
         (sqrt (* (* 2.0 n) (* U (+ t (/ (* l t_2) Om))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om);
	double tmp;
	if (U <= -1.7e-36) {
		tmp = t_1;
	} else if (U <= 1.25e-211) {
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))));
	} else if (U <= 1.02e-99) {
		tmp = t_1;
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_2) / 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * (l * (l / om)))) + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
    t_2 = (l * (-2.0d0)) + ((n * (l * u_42)) / om)
    if (u <= (-1.7d-36)) then
        tmp = t_1
    else if (u <= 1.25d-211) then
        tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((n * (u * l)) * t_2) / om))))
    else if (u <= 1.02d-99) then
        tmp = t_1
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * t_2) / 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 t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om);
	double tmp;
	if (U <= -1.7e-36) {
		tmp = t_1;
	} else if (U <= 1.25e-211) {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))));
	} else if (U <= 1.02e-99) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * t_2) / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))))
	t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om)
	tmp = 0
	if U <= -1.7e-36:
		tmp = t_1
	elif U <= 1.25e-211:
		tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))))
	elif U <= 1.02e-99:
		tmp = t_1
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * t_2) / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U)))))
	t_2 = Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))
	tmp = 0.0
	if (U <= -1.7e-36)
		tmp = t_1;
	elseif (U <= 1.25e-211)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * t_2) / Om))));
	elseif (U <= 1.02e-99)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * t_2) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	t_2 = (l * -2.0) + ((n * (l * U_42_)) / Om);
	tmp = 0.0;
	if (U <= -1.7e-36)
		tmp = t_1;
	elseif (U <= 1.25e-211)
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * t_2) / Om))));
	elseif (U <= 1.02e-99)
		tmp = t_1;
	else
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * t_2) / 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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -1.7e-36], t$95$1, If[LessEqual[U, 1.25e-211], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * t$95$2), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.02e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * t$95$2), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
t_2 := \ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\\
\mathbf{if}\;U \leq -1.7 \cdot 10^{-36}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;U \leq 1.02 \cdot 10^{-99}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -1.7000000000000001e-36 or 1.2500000000000001e-211 < U < 1.02e-99

    1. Initial program 54.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. Taylor expanded in n around 0 44.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}}\right) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
      2. associate-/r/64.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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
    10. Applied egg-rr64.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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]

    if -1.7000000000000001e-36 < U < 1.2500000000000001e-211

    1. Initial program 45.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. Simplified57.2%

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

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

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

    if 1.02e-99 < U

    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. Simplified56.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.7 \cdot 10^{-36}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;U \leq 1.25 \cdot 10^{-211}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}}\\ \mathbf{elif}\;U \leq 1.02 \cdot 10^{-99}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \end{array} \]

Alternative 5: 56.6% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;U \leq -3.7 \cdot 10^{-34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 4.8 \cdot 10^{-216}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(\frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om} + \ell \cdot -2\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}}\\ \mathbf{elif}\;U \leq 2.65 \cdot 10^{-99}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{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
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (* l (/ l Om))))
            (* (/ n (* (/ Om l) (/ Om l))) (- U* U)))))))
   (if (<= U -3.7e-34)
     t_1
     (if (<= U 4.8e-216)
       (sqrt
        (+
         (* 2.0 (* n (* U t)))
         (*
          2.0
          (/
           (* (+ (/ (* n (* l (- U* U))) Om) (* l -2.0)) (* n (* U l)))
           Om))))
       (if (<= U 2.65e-99)
         t_1
         (sqrt
          (*
           (* 2.0 n)
           (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double tmp;
	if (U <= -3.7e-34) {
		tmp = t_1;
	} else if (U <= 4.8e-216) {
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))));
	} else if (U <= 2.65e-99) {
		tmp = t_1;
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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) :: t_1
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * (l * (l / om)))) + ((n / ((om / l) * (om / l))) * (u_42 - u)))))
    if (u <= (-3.7d-34)) then
        tmp = t_1
    else if (u <= 4.8d-216) then
        tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((((n * (l * (u_42 - u))) / om) + (l * (-2.0d0))) * (n * (u * l))) / om))))
    else if (u <= 2.65d-99) then
        tmp = t_1
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / 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 t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	double tmp;
	if (U <= -3.7e-34) {
		tmp = t_1;
	} else if (U <= 4.8e-216) {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))));
	} else if (U <= 2.65e-99) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))))
	tmp = 0
	if U <= -3.7e-34:
		tmp = t_1
	elif U <= 4.8e-216:
		tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))))
	elif U <= 2.65e-99:
		tmp = t_1
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + Float64(Float64(n / Float64(Float64(Om / l) * Float64(Om / l))) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (U <= -3.7e-34)
		tmp = t_1;
	elseif (U <= 4.8e-216)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(Float64(Float64(n * Float64(l * Float64(U_42_ - U))) / Om) + Float64(l * -2.0)) * Float64(n * Float64(U * l))) / Om))));
	elseif (U <= 2.65e-99)
		tmp = t_1;
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * (l * (l / Om)))) + ((n / ((Om / l) * (Om / l))) * (U_42_ - U)))));
	tmp = 0.0;
	if (U <= -3.7e-34)
		tmp = t_1;
	elseif (U <= 4.8e-216)
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (n * (U * l))) / Om))));
	elseif (U <= 2.65e-99)
		tmp = t_1;
	else
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n / N[(N[(Om / l), $MachinePrecision] * N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[U, -3.7e-34], t$95$1, If[LessEqual[U, 4.8e-216], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(N[(N[(n * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 2.65e-99], t$95$1, N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;U \leq -3.7 \cdot 10^{-34}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;U \leq 2.65 \cdot 10^{-99}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -3.69999999999999988e-34 or 4.80000000000000007e-216 < U < 2.6500000000000002e-99

    1. Initial program 54.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. Taylor expanded in n around 0 44.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}}\right) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
      2. associate-/r/64.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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]
    10. Applied egg-rr64.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) - \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U - U*\right)\right)} \]

    if -3.69999999999999988e-34 < U < 4.80000000000000007e-216

    1. Initial program 45.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. Simplified57.2%

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

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

    if 2.6500000000000002e-99 < U

    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. Simplified56.8%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -3.7 \cdot 10^{-34}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;U \leq 4.8 \cdot 10^{-216}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(\frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om} + \ell \cdot -2\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}}\\ \mathbf{elif}\;U \leq 2.65 \cdot 10^{-99}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell} \cdot \frac{Om}{\ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \end{array} \]

Alternative 6: 56.9% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -2.5 \cdot 10^{+162}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot U*}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\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 (<= U -2.5e+162)
   (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
   (pow
    (*
     2.0
     (+
      (* n (* U t))
      (/ (+ (/ n (/ Om (* l U*))) (* l -2.0)) (/ Om (* n (* U l))))))
    0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -2.5e+162) {
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 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 (u <= (-2.5d+162)) then
        tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
    else
        tmp = (2.0d0 * ((n * (u * t)) + (((n / (om / (l * u_42))) + (l * (-2.0d0))) / (om / (n * (u * l)))))) ** 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 (U <= -2.5e+162) {
		tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = Math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -2.5e+162:
		tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))))
	else:
		tmp = math.pow((2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5)
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -2.5e+162)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))));
	else
		tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(n / Float64(Om / Float64(l * U_42_))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5;
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -2.5e+162)
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	else
		tmp = (2.0 * ((n * (U * t)) + (((n / (Om / (l * U_42_))) + (l * -2.0)) / (Om / (n * (U * l)))))) ^ 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[U, -2.5e+162], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(n / N[(Om / N[(l * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -2.5 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -2.4999999999999998e162

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}}} \cdot \left(U - U*\right)\right)} \]
    5. Step-by-step derivation
      1. *-un-lft-identity48.9%

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

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

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

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

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

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

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

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

    if -2.4999999999999998e162 < U

    1. Initial program 51.8%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 48.5% accurate, 1.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.45 \cdot 10^{-196}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{+28}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+169}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{\left(n \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\ \mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+254}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\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 (<= l 1.45e-196)
   (sqrt (* 2.0 (* n (* U t))))
   (if (<= l 5e+28)
     (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
     (if (<= l 1.75e+169)
       (sqrt
        (* -2.0 (/ (* (* n (+ 2.0 (* (- U U*) (/ n Om)))) (* U (* l l))) Om)))
       (if (<= l 1.65e+254)
         (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
         (sqrt
          (* -2.0 (/ n (/ Om (* (* l l) (* U (- 2.0 (/ n (/ Om U*))))))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.45e-196) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else if (l <= 5e+28) {
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else if (l <= 1.75e+169) {
		tmp = sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)));
	} else if (l <= 1.65e+254) {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	} else {
		tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))));
	}
	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.45d-196) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else if (l <= 5d+28) then
        tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
    else if (l <= 1.75d+169) then
        tmp = sqrt(((-2.0d0) * (((n * (2.0d0 + ((u - u_42) * (n / om)))) * (u * (l * l))) / om)))
    else if (l <= 1.65d+254) then
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
    else
        tmp = sqrt(((-2.0d0) * (n / (om / ((l * l) * (u * (2.0d0 - (n / (om / u_42)))))))))
    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.45e-196) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else if (l <= 5e+28) {
		tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else if (l <= 1.75e+169) {
		tmp = Math.sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)));
	} else if (l <= 1.65e+254) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	} else {
		tmp = Math.sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.45e-196:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	elif l <= 5e+28:
		tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))))
	elif l <= 1.75e+169:
		tmp = math.sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)))
	elif l <= 1.65e+254:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
	else:
		tmp = math.sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.45e-196)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	elseif (l <= 5e+28)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))));
	elseif (l <= 1.75e+169)
		tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(n * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / Om)))) * Float64(U * Float64(l * l))) / Om)));
	elseif (l <= 1.65e+254)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))));
	else
		tmp = sqrt(Float64(-2.0 * Float64(n / Float64(Om / Float64(Float64(l * l) * Float64(U * Float64(2.0 - Float64(n / Float64(Om / U_42_)))))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.45e-196)
		tmp = sqrt((2.0 * (n * (U * t))));
	elseif (l <= 5e+28)
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	elseif (l <= 1.75e+169)
		tmp = sqrt((-2.0 * (((n * (2.0 + ((U - U_42_) * (n / Om)))) * (U * (l * l))) / Om)));
	elseif (l <= 1.65e+254)
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	else
		tmp = sqrt((-2.0 * (n / (Om / ((l * l) * (U * (2.0 - (n / (Om / U_42_)))))))));
	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.45e-196], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5e+28], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.75e+169], N[Sqrt[N[(-2.0 * N[(N[(N[(n * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.65e+254], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(n / N[(Om / N[(N[(l * l), $MachinePrecision] * N[(U * N[(2.0 - N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.45 \cdot 10^{-196}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < 1.44999999999999994e-196

    1. Initial program 51.4%

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

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

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

    if 1.44999999999999994e-196 < l < 4.99999999999999957e28

    1. Initial program 74.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. Taylor expanded in n around 0 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999957e28 < l < 1.75000000000000009e169

    1. Initial program 43.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. Simplified74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000009e169 < l < 1.64999999999999996e254

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

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}} \]
      2. sub-neg2.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.64999999999999996e254 < l

    1. Initial program 45.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. Simplified68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 49.1% accurate, 1.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.1 \cdot 10^{-198}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+29}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(\frac{n \cdot \left(\ell \cdot \left(U* - U\right)\right)}{Om} + \ell \cdot -2\right) \cdot \left(U \cdot \ell\right)\right)}{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 4.1e-198)
   (sqrt (* 2.0 (* n (* U t))))
   (if (<= l 3.2e+29)
     (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
     (sqrt
      (*
       2.0
       (/ (* n (* (+ (/ (* n (* l (- U* U))) Om) (* l -2.0)) (* U l))) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 4.1e-198) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else if (l <= 3.2e+29) {
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / 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 <= 4.1d-198) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else if (l <= 3.2d+29) then
        tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
    else
        tmp = sqrt((2.0d0 * ((n * ((((n * (l * (u_42 - u))) / om) + (l * (-2.0d0))) * (u * l))) / 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 <= 4.1e-198) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else if (l <= 3.2e+29) {
		tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = Math.sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 4.1e-198:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	elif l <= 3.2e+29:
		tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))))
	else:
		tmp = math.sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 4.1e-198)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	elseif (l <= 3.2e+29)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(Float64(Float64(Float64(n * Float64(l * Float64(U_42_ - U))) / Om) + Float64(l * -2.0)) * Float64(U * l))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 4.1e-198)
		tmp = sqrt((2.0 * (n * (U * t))));
	elseif (l <= 3.2e+29)
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	else
		tmp = sqrt((2.0 * ((n * ((((n * (l * (U_42_ - U))) / Om) + (l * -2.0)) * (U * l))) / 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, 4.1e-198], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.2e+29], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(N[(N[(N[(n * N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.1 \cdot 10^{-198}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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

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


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

    1. Initial program 51.4%

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

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

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

    if 4.10000000000000012e-198 < l < 3.19999999999999987e29

    1. Initial program 74.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. Taylor expanded in n around 0 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999987e29 < l

    1. Initial program 29.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. Simplified60.8%

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

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

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

Alternative 9: 53.7% accurate, 1.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -5 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{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
 (if (<= U -5e-9)
   (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -5e-9) {
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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 (u <= (-5d-9)) then
        tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / 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 (U <= -5e-9) {
		tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -5e-9:
		tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))))
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -5e-9)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -5e-9)
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	else
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / 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[U, -5e-9], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-9}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000001e-9 < U

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

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

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

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

Alternative 10: 39.7% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 7 \cdot 10^{-199}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+61}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n \cdot \left(2 \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)}{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 7e-199)
   (sqrt (* 2.0 (* n (* U t))))
   (if (<= l 1.02e+61)
     (sqrt (* (* (* 2.0 n) U) t))
     (sqrt (* -2.0 (/ (* n (* 2.0 (* U (* l l)))) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 7e-199) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else if (l <= 1.02e+61) {
		tmp = sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / 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 <= 7d-199) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else if (l <= 1.02d+61) then
        tmp = sqrt((((2.0d0 * n) * u) * t))
    else
        tmp = sqrt(((-2.0d0) * ((n * (2.0d0 * (u * (l * l)))) / 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 <= 7e-199) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else if (l <= 1.02e+61) {
		tmp = Math.sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = Math.sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 7e-199:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	elif l <= 1.02e+61:
		tmp = math.sqrt((((2.0 * n) * U) * t))
	else:
		tmp = math.sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 7e-199)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	elseif (l <= 1.02e+61)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
	else
		tmp = sqrt(Float64(-2.0 * Float64(Float64(n * Float64(2.0 * Float64(U * Float64(l * l)))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 7e-199)
		tmp = sqrt((2.0 * (n * (U * t))));
	elseif (l <= 1.02e+61)
		tmp = sqrt((((2.0 * n) * U) * t));
	else
		tmp = sqrt((-2.0 * ((n * (2.0 * (U * (l * l)))) / 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, 7e-199], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.02e+61], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(n * N[(2.0 * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7 \cdot 10^{-199}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

\mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+61}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\

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


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

    1. Initial program 51.4%

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

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

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

    if 6.9999999999999998e-199 < l < 1.01999999999999999e61

    1. Initial program 70.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. Taylor expanded in n around 0 64.7%

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

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

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

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

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

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

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

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

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

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

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

    if 1.01999999999999999e61 < l

    1. Initial program 29.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 47.4% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -1.3 \cdot 10^{+140}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\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 (<= U -1.3e+140)
   (sqrt (* (* (* 2.0 n) U) t))
   (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -1.3e+140) {
		tmp = sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (u <= (-1.3d+140)) then
        tmp = sqrt((((2.0d0 * n) * u) * t))
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (U <= -1.3e+140) {
		tmp = Math.sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -1.3e+140:
		tmp = math.sqrt((((2.0 * n) * U) * t))
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -1.3e+140)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -1.3e+140)
		tmp = sqrt((((2.0 * n) * U) * t));
	else
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[U, -1.3e+140], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1.3 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -1.3000000000000001e140

    1. Initial program 56.5%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3000000000000001e140 < U

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

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}} \]
      2. sub-neg51.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.2% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -1.55 \cdot 10^{+51}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\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 (<= U -1.55e+51)
   (sqrt (* (* (* 2.0 n) U) (+ t (* (/ (* l l) Om) -2.0))))
   (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -1.55e+51) {
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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 (u <= (-1.55d+51)) then
        tmp = sqrt((((2.0d0 * n) * u) * (t + (((l * l) / om) * (-2.0d0)))))
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / 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 (U <= -1.55e+51) {
		tmp = Math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -1.55e+51:
		tmp = math.sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))))
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -1.55e+51)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -1.55e+51)
		tmp = sqrt((((2.0 * n) * U) * (t + (((l * l) / Om) * -2.0))));
	else
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / 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[U, -1.55e+51], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1.55 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -1.55000000000000006e51

    1. Initial program 52.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. Taylor expanded in n around 0 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.55000000000000006e51 < U

    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. Step-by-step derivation
      1. associate-*l*52.5%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}} \]
      2. sub-neg52.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 36.5% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq -1.4 \cdot 10^{-233}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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 -1.4e-233)
   (pow (* 2.0 (* n (* U t))) 0.5)
   (sqrt (* (* (* 2.0 n) U) t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -1.4e-233) {
		tmp = pow((2.0 * (n * (U * t))), 0.5);
	} else {
		tmp = sqrt((((2.0 * n) * 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 <= (-1.4d-233)) then
        tmp = (2.0d0 * (n * (u * t))) ** 0.5d0
    else
        tmp = sqrt((((2.0d0 * n) * 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 <= -1.4e-233) {
		tmp = Math.pow((2.0 * (n * (U * t))), 0.5);
	} else {
		tmp = Math.sqrt((((2.0 * n) * U) * t));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= -1.4e-233:
		tmp = math.pow((2.0 * (n * (U * t))), 0.5)
	else:
		tmp = math.sqrt((((2.0 * n) * U) * t))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= -1.4e-233)
		tmp = Float64(2.0 * Float64(n * Float64(U * t))) ^ 0.5;
	else
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * 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 <= -1.4e-233)
		tmp = (2.0 * (n * (U * t))) ^ 0.5;
	else
		tmp = sqrt((((2.0 * n) * 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, -1.4e-233], N[Power[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.4 \cdot 10^{-233}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}\\

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


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

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

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

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

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

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

    if -1.4000000000000001e-233 < n

    1. Initial program 52.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. Taylor expanded in n around 0 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 35.8% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -1 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \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 (<= U -1e-24) (sqrt (* 2.0 (* U (* n t)))) (sqrt (* 2.0 (* n (* U t))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -1e-24) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((2.0 * (n * (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 (u <= (-1d-24)) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt((2.0d0 * (n * (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 (U <= -1e-24) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -1e-24:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -1e-24)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(2.0 * Float64(n * 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 (U <= -1e-24)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((2.0 * (n * (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[U, -1e-24], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;U \leq -1 \cdot 10^{-24}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


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

    1. Initial program 56.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. Taylor expanded in n around 0 46.6%

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

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

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

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

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

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

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

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

    if -9.99999999999999924e-25 < U

    1. Initial program 50.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. Simplified57.0%

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

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

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

Alternative 15: 35.7% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq -3.4 \cdot 10^{-233}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \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.4e-233)
   (sqrt (* 2.0 (* n (* U t))))
   (sqrt (* (* (* 2.0 n) 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.4e-233) {
		tmp = sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = sqrt((((2.0 * n) * 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.4d-233)) then
        tmp = sqrt((2.0d0 * (n * (u * t))))
    else
        tmp = sqrt((((2.0d0 * n) * 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.4e-233) {
		tmp = Math.sqrt((2.0 * (n * (U * t))));
	} else {
		tmp = Math.sqrt((((2.0 * n) * U) * t));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= -3.4e-233:
		tmp = math.sqrt((2.0 * (n * (U * t))))
	else:
		tmp = math.sqrt((((2.0 * n) * U) * t))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= -3.4e-233)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t))));
	else
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * 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.4e-233)
		tmp = sqrt((2.0 * (n * (U * t))));
	else
		tmp = sqrt((((2.0 * n) * 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.4e-233], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -3.4 \cdot 10^{-233}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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


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

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

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

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

    if -3.4000000000000002e-233 < n

    1. Initial program 52.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. Taylor expanded in n around 0 45.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 35.3% 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 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. Simplified54.3%

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

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

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

Reproduce

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