Toniolo and Linder, Equation (13)

Percentage Accurate: 50.0% → 67.3%
Time: 30.9s
Alternatives: 19
Speedup: 1.9×

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 19 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.0% 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: 67.3% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+141}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_1\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000004e-156 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.00000000000000025e141

    1. Initial program 96.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. Step-by-step derivation
      1. clear-num96.5%

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

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

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

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

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

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

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

      \[\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 32.3%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 32.7%

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(2 \cdot \frac{1}{Om} + \color{blue}{\left(-\frac{n \cdot U*}{{Om}^{2}}\right)}\right)\right)} \]
      4. unsub-neg32.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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/32.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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval32.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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow232.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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac37.4%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified37.4%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in l around inf 25.3%

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

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

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

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

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

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

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

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

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

Alternative 2: 67.1% accurate, 0.5× speedup?

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

\mathbf{elif}\;t_3 \leq 10^{+283}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + t_1\right)}\\

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


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

    1. Initial program 12.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. Simplified18.3%

      \[\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 U around 0 28.1%

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot \left(\frac{U* \cdot \left(\ell \cdot \ell\right)}{Om} \cdot \frac{n}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right) \cdot U\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*)))) < 9.99999999999999955e282

    1. Initial program 95.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Step-by-step derivation
      1. clear-num95.9%

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

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

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

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

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

    if 9.99999999999999955e282 < (*.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 22.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. Simplified29.0%

      \[\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 31.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. *-commutative31.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. unpow231.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. unpow231.7%

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 32.1%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg32.1%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/32.1%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval32.1%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow232.1%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac36.3%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified36.3%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in l around inf 25.0%

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

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

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

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

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

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

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

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

    \[\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(U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\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 10^{+283}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)\right)}\right)\\ \end{array} \]

Alternative 3: 67.1% 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(U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)\right)}\\ \mathbf{elif}\;t_1 \leq 10^{+283}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)\right)}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (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
       (*
        U
        (*
         n
         (+ (* (/ n Om) (/ (* (* l l) U*) Om)) (fma l (* (/ l Om) -2.0) t))))))
     (if (<= t_1 1e+283)
       (sqrt t_1)
       (*
        (sqrt 2.0)
        (* l (sqrt (* n (* U (- (* (/ n Om) (/ U* Om)) (/ 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 * (U * (n * (((n / Om) * (((l * l) * U_42_) / Om)) + fma(l, ((l / Om) * -2.0), t))))));
	} else if (t_1 <= 1e+283) {
		tmp = sqrt(t_1);
	} else {
		tmp = sqrt(2.0) * (l * sqrt((n * (U * (((n / Om) * (U_42_ / Om)) - (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(U * Float64(n * Float64(Float64(Float64(n / Om) * Float64(Float64(Float64(l * l) * U_42_) / Om)) + fma(l, Float64(Float64(l / Om) * -2.0), t))))));
	elseif (t_1 <= 1e+283)
		tmp = sqrt(t_1);
	else
		tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n / Om) * Float64(U_42_ / Om)) - Float64(2.0 / Om)))))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(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[(U * N[(n * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(l * N[(N[(l / Om), $MachinePrecision] * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+283], N[Sqrt[t$95$1], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n * N[(U * N[(N[(N[(n / Om), $MachinePrecision] * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $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(U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)\right)}\\

\mathbf{elif}\;t_1 \leq 10^{+283}:\\
\;\;\;\;\sqrt{t_1}\\

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


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

    1. Initial program 12.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. Simplified18.3%

      \[\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 U around 0 28.1%

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot \left(\frac{U* \cdot \left(\ell \cdot \ell\right)}{Om} \cdot \frac{n}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right) \cdot U\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*)))) < 9.99999999999999955e282

    1. Initial program 95.8%

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

    if 9.99999999999999955e282 < (*.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 22.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. Simplified29.0%

      \[\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 31.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. *-commutative31.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. unpow231.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. unpow231.7%

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 32.1%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg32.1%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/32.1%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval32.1%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow232.1%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac36.3%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified36.3%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in l around inf 25.0%

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

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

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

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

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

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

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

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

    \[\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(U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\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 10^{+283}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{U*}{Om} - \frac{2}{Om}\right)\right)}\right)\\ \end{array} \]

Alternative 4: 62.8% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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 46.3%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 47.2%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg47.2%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/47.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval47.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow247.2%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac54.2%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified54.2%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in Om around 0 45.9%

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

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

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

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

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

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

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

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

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

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

    if 5e-108 < l < 5.2e168

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

      \[\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 48.3%

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{n \cdot \left(U - U*\right)}{\color{blue}{Om \cdot Om}} + 2 \cdot \frac{1}{Om}\right)\right)} \]
      4. times-frac58.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{n}{Om} \cdot \frac{U - U*}{Om}} + 2 \cdot \frac{1}{Om}\right)\right)} \]
      5. associate-*r/58.7%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om} \cdot \frac{U - U*}{Om} + \frac{\color{blue}{2}}{Om}\right)\right)} \]
    5. Simplified58.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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 48.4%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg48.4%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/48.4%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval48.4%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow248.4%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac59.5%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified59.5%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/259.6%

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

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

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

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

    if 5.2e168 < l

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

      \[\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 37.3%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 37.3%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg37.3%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/37.3%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval37.3%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow237.3%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac44.4%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified44.4%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in l around inf 64.4%

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

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

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

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

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

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

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

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

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

Alternative 5: 58.4% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.10000000000000006e-107

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

      \[\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 46.3%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 47.2%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg47.2%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/47.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval47.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow247.2%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac54.2%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified54.2%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in Om around 0 45.9%

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

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

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

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

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

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

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

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

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

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

    if 1.10000000000000006e-107 < l

    1. Initial program 37.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. Simplified43.0%

      \[\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 44.5%

      \[\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. *-commutative44.5%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 44.6%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg44.6%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/44.6%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval44.6%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow244.6%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac54.4%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified54.4%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/254.5%

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

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

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

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

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

Alternative 6: 58.1% accurate, 1.8× speedup?

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

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

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


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

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

      \[\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 46.1%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 46.9%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg46.9%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/46.9%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval46.9%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow246.9%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac54.2%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified54.2%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in Om around 0 45.6%

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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999965e-106 < l < 1e129

    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. Simplified43.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 49.9%

      \[\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. *-commutative49.9%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 50.0%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg50.0%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/50.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval50.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow250.0%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac61.4%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified61.4%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/261.4%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} - \frac{n \cdot \frac{U*}{Om}}{Om}\right)\right)\right)\right)}^{0.5}} \]
    11. Step-by-step derivation
      1. *-un-lft-identity61.4%

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

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

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

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

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

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

    if 1e129 < l

    1. Initial program 19.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. Simplified40.2%

      \[\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 38.0%

      \[\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. *-commutative38.0%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 38.0%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg38.0%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/38.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval38.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow238.0%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac44.0%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified44.0%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/244.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 55.0% accurate, 1.9× speedup?

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

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


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

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

      \[\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 47.1%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U* around inf 46.2%

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

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

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

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

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

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

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

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

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

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

    if 2.55e42 < l

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

      \[\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 40.2%

      \[\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. *-commutative40.2%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 40.2%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg40.2%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/40.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval40.2%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow240.2%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac46.3%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified46.3%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/246.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 55.9% accurate, 1.9× speedup?

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

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


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

    1. Initial program 54.4%

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

      \[\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 47.3%

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

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 48.0%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg48.0%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/48.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval48.0%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow248.0%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac56.0%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified56.0%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Taylor expanded in Om around 0 46.4%

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

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

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

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

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

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

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

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

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

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

    if 1.65e41 < l

    1. Initial program 25.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. Simplified36.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 39.4%

      \[\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. *-commutative39.4%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 39.4%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg39.4%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/39.4%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval39.4%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow239.4%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac47.3%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified47.3%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/247.5%

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

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

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

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

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(-\color{blue}{\frac{{\ell}^{2}}{Om} \cdot 2}\right)\right)\right)\right)}^{0.5} \]
      5. distribute-rgt-neg-in45.4%

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

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

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

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

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

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

Alternative 9: 51.5% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -6e75 or 4.1e207 < Om

    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. Simplified62.5%

      \[\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 Om around inf 52.8%

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

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

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

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

    if -6e75 < Om < 4.1e207

    1. Initial program 46.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. Simplified44.8%

      \[\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 44.8%

      \[\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. *-commutative44.8%

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

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

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

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

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

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

      \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
    6. Taylor expanded in U around 0 45.5%

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

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

        \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
      3. mul-1-neg45.5%

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

        \[\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 U*}{{Om}^{2}}\right)}\right)} \]
      5. associate-*r/45.5%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      6. metadata-eval45.5%

        \[\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 U*}{{Om}^{2}}\right)\right)} \]
      7. unpow245.5%

        \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
      8. times-frac52.2%

        \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
    8. Simplified52.2%

      \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
    9. Step-by-step derivation
      1. pow1/252.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 46.9% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.19999999999999963e121

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

      \[\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 t around inf 39.5%

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

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

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

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

    if -7.19999999999999963e121 < t

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

      \[\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 Om around inf 42.6%

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

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

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

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

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

Alternative 11: 52.1% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\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 (* -2.0 (/ l (/ Om l)))))) 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 + (-2.0 * (l / (Om / l)))))), 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 + ((-2.0d0) * (l / (om / l)))))) ** 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 + (-2.0 * (l / (Om / l)))))), 0.5);
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.pow((2.0 * ((n * U) * (t + (-2.0 * (l / (Om / l)))))), 0.5)
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l / Float64(Om / l)))))) ^ 0.5
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = (2.0 * ((n * U) * (t + (-2.0 * (l / (Om / l)))))) ^ 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), $MachinePrecision] * N[(t + N[(-2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 48.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. Simplified49.9%

    \[\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 45.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. *-commutative45.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. unpow245.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. unpow245.7%

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

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

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

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

    \[\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}{Om} \cdot \frac{U - U*}{Om} + \frac{2}{Om}\right)}\right)} \]
  6. Taylor expanded in U around 0 46.4%

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

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

      \[\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} + -1 \cdot \frac{n \cdot U*}{{Om}^{2}}\right)}\right)} \]
    3. mul-1-neg46.4%

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

      \[\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 U*}{{Om}^{2}}\right)}\right)} \]
    5. associate-*r/46.4%

      \[\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 U*}{{Om}^{2}}\right)\right)} \]
    6. metadata-eval46.4%

      \[\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 U*}{{Om}^{2}}\right)\right)} \]
    7. unpow246.4%

      \[\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 \cdot U*}{\color{blue}{Om \cdot Om}}\right)\right)} \]
    8. times-frac54.3%

      \[\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}{Om} \cdot \frac{U*}{Om}}\right)\right)} \]
  8. Simplified54.3%

    \[\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}{Om} \cdot \frac{U*}{Om}\right)}\right)} \]
  9. Step-by-step derivation
    1. pow1/254.3%

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

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

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

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

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

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

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

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

      \[\leadsto {\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(-\color{blue}{\frac{{\ell}^{2}}{Om} \cdot 2}\right)\right)\right)\right)}^{0.5} \]
    5. distribute-rgt-neg-in50.4%

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

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

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

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

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

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

Alternative 12: 40.1% accurate, 2.0× speedup?

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

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


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

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

      \[\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. Taylor expanded in t around inf 40.3%

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

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

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

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

    if 3.99999999999999971e75 < l

    1. Initial program 26.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. Simplified26.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. Taylor expanded in t around 0 19.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(-\frac{\color{blue}{2}}{Om}\right)\right)\right)} \]
      12. distribute-neg-frac22.2%

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

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

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

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

Alternative 13: 40.1% accurate, 2.0× speedup?

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

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


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

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

      \[\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. Taylor expanded in t around inf 40.3%

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

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

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

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

    if 1.3999999999999999e76 < l

    1. Initial program 26.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. Simplified26.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. Taylor expanded in t around 0 19.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 40.1% accurate, 2.0× speedup?

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

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


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

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

      \[\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. Taylor expanded in t around inf 40.3%

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

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

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

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

    if 3.99999999999999993e77 < l

    1. Initial program 26.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. Simplified26.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. Taylor expanded in t around 0 19.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.8% accurate, 2.1× speedup?

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

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


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

    1. Initial program 33.7%

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

      \[\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 t around inf 46.6%

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

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

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

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

    if -8.4999999999999996e140 < t

    1. Initial program 50.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. Simplified50.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. Taylor expanded in t around inf 35.5%

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

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

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

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

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

Alternative 16: 35.9% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.8000000000000001e131

    1. Initial program 34.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified34.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 t around inf 43.4%

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

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

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

    if -2.8000000000000001e131 < t

    1. Initial program 50.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified50.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. Taylor expanded in t around inf 35.3%

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

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

Alternative 17: 37.3% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ {\left(2 \cdot \left(t \cdot \left(n \cdot U\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 (* t (* n U))) 0.5))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return pow((2.0 * (t * (n * U))), 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 * (t * (n * u))) ** 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 * (t * (n * U))), 0.5);
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.pow((2.0 * (t * (n * U))), 0.5)
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = (2.0 * (t * (n * U))) ^ 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[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 48.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. 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. Taylor expanded in t around inf 35.7%

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

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

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

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

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

Alternative 18: 34.8% 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 48.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. Simplified49.9%

    \[\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 t around inf 31.3%

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

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

Alternative 19: 35.7% accurate, 2.1× speedup?

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

    \[\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 t around inf 31.3%

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

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

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

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

Reproduce

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