Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 66.2%
Time: 32.2s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 50.1% accurate, 1.0× speedup?

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

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

Alternative 1: 66.2% accurate, 0.5× speedup?

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+291}:\\
\;\;\;\;\sqrt{t_1}\\

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.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)} \]

    if 5.0000000000000001e291 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.7% accurate, 1.0× speedup?

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

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


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

    1. Initial program 53.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. Simplified53.0%

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

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

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

    if 1.59999999999999991e184 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 53.7% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \ell \cdot \sqrt{2}\\ \mathbf{if}\;\ell \leq 2.8 \cdot 10^{-132}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{+142}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+214}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+259} \lor \neg \left(\ell \leq 6.1 \cdot 10^{+289}\right):\\ \;\;\;\;t_1 \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot \sqrt{n \cdot \left(\frac{n}{Om} \cdot \frac{U \cdot U*}{Om}\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* l (sqrt 2.0))))
   (if (<= l 2.8e-132)
     (pow (* 2.0 (* U (* n t))) 0.5)
     (if (<= l 7e+142)
       (sqrt
        (*
         (* 2.0 (* n U))
         (+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
       (if (<= l 1.05e+214)
         (sqrt
          (*
           -2.0
           (*
            (- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om)))
            (* n (* l (* U l))))))
         (if (or (<= l 1.75e+259) (not (<= l 6.1e+289)))
           (* t_1 (sqrt (* n (* -2.0 (/ U Om)))))
           (* t_1 (sqrt (* n (* (/ n Om) (/ (* U U*) Om)))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = l * sqrt(2.0);
	double tmp;
	if (l <= 2.8e-132) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (l <= 7e+142) {
		tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	} else if (l <= 1.05e+214) {
		tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	} else if ((l <= 1.75e+259) || !(l <= 6.1e+289)) {
		tmp = t_1 * sqrt((n * (-2.0 * (U / Om))));
	} else {
		tmp = t_1 * sqrt((n * ((n / Om) * ((U * 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) :: t_1
    real(8) :: tmp
    t_1 = l * sqrt(2.0d0)
    if (l <= 2.8d-132) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (l <= 7d+142) then
        tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
    else if (l <= 1.05d+214) then
        tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * l))))))
    else if ((l <= 1.75d+259) .or. (.not. (l <= 6.1d+289))) then
        tmp = t_1 * sqrt((n * ((-2.0d0) * (u / om))))
    else
        tmp = t_1 * sqrt((n * ((n / om) * ((u * 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 t_1 = l * Math.sqrt(2.0);
	double tmp;
	if (l <= 2.8e-132) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (l <= 7e+142) {
		tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	} else if (l <= 1.05e+214) {
		tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	} else if ((l <= 1.75e+259) || !(l <= 6.1e+289)) {
		tmp = t_1 * Math.sqrt((n * (-2.0 * (U / Om))));
	} else {
		tmp = t_1 * Math.sqrt((n * ((n / Om) * ((U * U_42_) / Om))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = l * math.sqrt(2.0)
	tmp = 0
	if l <= 2.8e-132:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif l <= 7e+142:
		tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))))
	elif l <= 1.05e+214:
		tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))))
	elif (l <= 1.75e+259) or not (l <= 6.1e+289):
		tmp = t_1 * math.sqrt((n * (-2.0 * (U / Om))))
	else:
		tmp = t_1 * math.sqrt((n * ((n / Om) * ((U * U_42_) / Om))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l * sqrt(2.0))
	tmp = 0.0
	if (l <= 2.8e-132)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (l <= 7e+142)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l)))))));
	elseif (l <= 1.05e+214)
		tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l))))));
	elseif ((l <= 1.75e+259) || !(l <= 6.1e+289))
		tmp = Float64(t_1 * sqrt(Float64(n * Float64(-2.0 * Float64(U / Om)))));
	else
		tmp = Float64(t_1 * sqrt(Float64(n * Float64(Float64(n / Om) * Float64(Float64(U * U_42_) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = l * sqrt(2.0);
	tmp = 0.0;
	if (l <= 2.8e-132)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (l <= 7e+142)
		tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	elseif (l <= 1.05e+214)
		tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	elseif ((l <= 1.75e+259) || ~((l <= 6.1e+289)))
		tmp = t_1 * sqrt((n * (-2.0 * (U / Om))));
	else
		tmp = t_1 * sqrt((n * ((n / Om) * ((U * 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$_] := Block[{t$95$1 = N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 2.8e-132], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 7e+142], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 1.05e+214], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l, 1.75e+259], N[Not[LessEqual[l, 6.1e+289]], $MachinePrecision]], N[(t$95$1 * N[Sqrt[N[(n * N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(t$95$1 * N[Sqrt[N[(n * N[(N[(n / Om), $MachinePrecision] * N[(N[(U * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \sqrt{2}\\
\mathbf{if}\;\ell \leq 2.8 \cdot 10^{-132}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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

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

\mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+259} \lor \neg \left(\ell \leq 6.1 \cdot 10^{+289}\right):\\
\;\;\;\;t_1 \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\

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


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

    1. Initial program 51.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. Simplified50.8%

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

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

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

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

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

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

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

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

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

    if 2.80000000000000002e-132 < l < 6.99999999999999995e142

    1. Initial program 63.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. Simplified63.6%

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999995e142 < l < 1.05e214

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e214 < l < 1.7499999999999999e259 or 6.10000000000000029e289 < l

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

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

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

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

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

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

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

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

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

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

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

    if 1.7499999999999999e259 < l < 6.10000000000000029e289

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.8 \cdot 10^{-132}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{+142}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+214}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.75 \cdot 10^{+259} \lor \neg \left(\ell \leq 6.1 \cdot 10^{+289}\right):\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(\frac{n}{Om} \cdot \frac{U \cdot U*}{Om}\right)}\\ \end{array} \]

Alternative 4: 58.8% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 51.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. Simplified50.8%

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

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

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

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

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

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

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

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

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

    if 2.09999999999999997e-131 < l < 1.15e148

    1. Initial program 64.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. Simplified64.2%

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e148 < l

    1. Initial program 14.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 53.8% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 4.6 \cdot 10^{-132}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 4.6 \cdot 10^{+142}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\ \mathbf{elif}\;\ell \leq 1.07 \cdot 10^{+214} \lor \neg \left(\ell \leq 4.4 \cdot 10^{+262}\right) \land \ell \leq 1.25 \cdot 10^{+288}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{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 4.6e-132)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= l 4.6e+142)
     (sqrt
      (*
       (* 2.0 (* n U))
       (+ (+ t (* -2.0 (* l (/ l Om)))) (/ n (* (/ Om U*) (/ Om (* l l)))))))
     (if (or (<= l 1.07e+214) (and (not (<= l 4.4e+262)) (<= l 1.25e+288)))
       (sqrt
        (*
         -2.0
         (* (- (/ 2.0 Om) (/ (* n (- U* U)) (* Om Om))) (* n (* l (* U l))))))
       (* (* l (sqrt 2.0)) (sqrt (* n (* -2.0 (/ U Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 4.6e-132) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (l <= 4.6e+142) {
		tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	} else if ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288))) {
		tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l <= 4.6d-132) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (l <= 4.6d+142) then
        tmp = sqrt(((2.0d0 * (n * u)) * ((t + ((-2.0d0) * (l * (l / om)))) + (n / ((om / u_42) * (om / (l * l)))))))
    else if ((l <= 1.07d+214) .or. (.not. (l <= 4.4d+262)) .and. (l <= 1.25d+288)) then
        tmp = sqrt(((-2.0d0) * (((2.0d0 / om) - ((n * (u_42 - u)) / (om * om))) * (n * (l * (u * l))))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt((n * ((-2.0d0) * (u / om))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 4.6e-132) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (l <= 4.6e+142) {
		tmp = Math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	} else if ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288))) {
		tmp = Math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt((n * (-2.0 * (U / Om))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 4.6e-132:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif l <= 4.6e+142:
		tmp = math.sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))))
	elif (l <= 1.07e+214) or (not (l <= 4.4e+262) and (l <= 1.25e+288)):
		tmp = math.sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt((n * (-2.0 * (U / Om))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 4.6e-132)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (l <= 4.6e+142)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om)))) + Float64(n / Float64(Float64(Om / U_42_) * Float64(Om / Float64(l * l)))))));
	elseif ((l <= 1.07e+214) || (!(l <= 4.4e+262) && (l <= 1.25e+288)))
		tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(2.0 / Om) - Float64(Float64(n * Float64(U_42_ - U)) / Float64(Om * Om))) * Float64(n * Float64(l * Float64(U * l))))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(n * Float64(-2.0 * Float64(U / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 4.6e-132)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (l <= 4.6e+142)
		tmp = sqrt(((2.0 * (n * U)) * ((t + (-2.0 * (l * (l / Om)))) + (n / ((Om / U_42_) * (Om / (l * l)))))));
	elseif ((l <= 1.07e+214) || (~((l <= 4.4e+262)) && (l <= 1.25e+288)))
		tmp = sqrt((-2.0 * (((2.0 / Om) - ((n * (U_42_ - U)) / (Om * Om))) * (n * (l * (U * l))))));
	else
		tmp = (l * sqrt(2.0)) * sqrt((n * (-2.0 * (U / Om))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 4.6e-132], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l, 4.6e+142], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(n / N[(N[(Om / U$42$), $MachinePrecision] * N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l, 1.07e+214], And[N[Not[LessEqual[l, 4.4e+262]], $MachinePrecision], LessEqual[l, 1.25e+288]]], N[Sqrt[N[(-2.0 * N[(N[(N[(2.0 / Om), $MachinePrecision] - N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(l * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(n * N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 4.6 \cdot 10^{-132}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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

\mathbf{elif}\;\ell \leq 1.07 \cdot 10^{+214} \lor \neg \left(\ell \leq 4.4 \cdot 10^{+262}\right) \land \ell \leq 1.25 \cdot 10^{+288}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\

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


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

    1. Initial program 51.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. Simplified50.8%

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

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

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

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

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

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

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

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

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

    if 4.60000000000000006e-132 < l < 4.60000000000000004e142

    1. Initial program 63.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. Simplified63.6%

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

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

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

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

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

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

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

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

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

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

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

    if 4.60000000000000004e142 < l < 1.07e214 or 4.40000000000000021e262 < l < 1.2500000000000001e288

    1. Initial program 11.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. Simplified11.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.07e214 < l < 4.40000000000000021e262 or 1.2500000000000001e288 < l

    1. Initial program 23.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. Simplified35.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.6 \cdot 10^{-132}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 4.6 \cdot 10^{+142}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{U*} \cdot \frac{Om}{\ell \cdot \ell}}\right)}\\ \mathbf{elif}\;\ell \leq 1.07 \cdot 10^{+214} \lor \neg \left(\ell \leq 4.4 \cdot 10^{+262}\right) \land \ell \leq 1.25 \cdot 10^{+288}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(\frac{2}{Om} - \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}\right) \cdot \left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om}\right)}\\ \end{array} \]

Alternative 6: 46.6% accurate, 1.7× speedup?

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

\mathbf{elif}\;\ell \leq 16500000:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;\ell \leq 10^{+194}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

    if 1.32e-79 < l < 1.65e7 or 9.99999999999999927e74 < l < 9.99999999999999945e193

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

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

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

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

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

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

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

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

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

    if 1.65e7 < l < 9.99999999999999927e74

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999945e193 < l

    1. Initial program 18.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. Simplified18.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.6% accurate, 1.7× speedup?

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

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

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


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

    1. Initial program 51.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. Simplified50.8%

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

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

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

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

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

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

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

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

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

    if 2.75e-132 < l < 1.60000000000000008e143

    1. Initial program 63.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. Simplified63.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.60000000000000008e143 < l

    1. Initial program 17.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. Simplified17.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.2% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 52.6%

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000018e-83 < l < 1.65000000000000013e145

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

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

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

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

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

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

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

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

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

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

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

    if 1.65000000000000013e145 < l

    1. Initial program 17.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. Simplified17.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.4% accurate, 2.0× speedup?

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

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


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

    1. Initial program 53.9%

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

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

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

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

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

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

    if 2.95e125 < l

    1. Initial program 23.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 47.0% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt (* 2.0 (* n (* U (+ t (* -2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
}
NOTE: l should be positive before calling this function
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((2.0d0 * (n * (u * (t + ((-2.0d0) * (l * (l / om))))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (n * (U * (t + (-2.0 * (l * (l / Om))))))));
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 * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 49.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. Simplified48.7%

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

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

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

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

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

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

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

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

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

Alternative 11: 36.7% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U* \leq -2 \cdot 10^{+69}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \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* -2e+69)
   (pow (* 2.0 (* U (* n 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 (U_42_ <= -2e+69) {
		tmp = pow((2.0 * (U * (n * 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 (u_42 <= (-2d+69)) then
        tmp = (2.0d0 * (u * (n * 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 (U_42_ <= -2e+69) {
		tmp = Math.pow((2.0 * (U * (n * 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 U_42_ <= -2e+69:
		tmp = math.pow((2.0 * (U * (n * 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 (U_42_ <= -2e+69)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	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_42_ <= -2e+69)
		tmp = (2.0 * (U * (n * 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[U$42$, -2e+69], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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 -2 \cdot 10^{+69}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\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* < -2.0000000000000001e69

    1. Initial program 48.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. Simplified48.2%

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e69 < U*

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

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

      \[\leadsto \sqrt{2 \cdot \color{blue}{\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 -2 \cdot 10^{+69}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \end{array} \]

Alternative 12: 37.0% accurate, 2.1× speedup?

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

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

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

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

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

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

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

Alternative 13: 35.7% 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 49.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. Simplified54.0%

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

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

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

Reproduce

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