Toniolo and Linder, Equation (13)

Percentage Accurate: 50.5% → 64.4%
Time: 25.1s
Alternatives: 15
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 50.5% accurate, 1.0× speedup?

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

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

Alternative 1: 64.4% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 23.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Taylor expanded in l around 0 23.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.00000000000000026e-158 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 4.0000000000000002e148

    1. Initial program 97.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. Simplified91.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 U around 0 88.2%

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e148 < (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. Simplified28.5%

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

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

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

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

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

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

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

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

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

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

    \[\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 4 \cdot 10^{-158}:\\ \;\;\;\;e^{\log \left(\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{n}{Om \cdot Om} \cdot \left(U* - U\right) - \frac{2}{Om}\right)\right)\right)}\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq 4 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\frac{U*}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{n}} - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]

Alternative 2: 62.0% accurate, 0.5× speedup?

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

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


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

    1. Initial program 80.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. Simplified76.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 73.4%

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000002e148 < (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. Simplified28.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 57.0% accurate, 1.8× speedup?

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

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


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

    1. Initial program 58.1%

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999999e74 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 48.9% accurate, 1.8× speedup?

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.2499999999999999e76 or 3.35000000000000003e153 < l < 5.4999999999999999e197

    1. Initial program 56.5%

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

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

        \[\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/56.3%

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

      \[\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 2.2499999999999999e76 < l < 3.35000000000000003e153 or 5.4999999999999999e197 < 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. Simplified31.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 U around 0 18.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.25 \cdot 10^{+76} \lor \neg \left(\ell \leq 3.35 \cdot 10^{+153}\right) \land \ell \leq 5.5 \cdot 10^{+197}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(\frac{2}{Om} - \frac{U*}{Om \cdot \frac{Om}{n}}\right)\right)}\\ \end{array} \]

Alternative 5: 56.8% accurate, 1.8× speedup?

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

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


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

    1. Initial program 55.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. Taylor expanded in l around 0 52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.1999999999999995e-63 < l

    1. Initial program 47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 48.0% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+168}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_2\right)\right)}\\

\mathbf{elif}\;\ell \leq 5.9 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{t_1 \cdot t_2}\\

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


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

    1. Initial program 57.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. Simplified54.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 U around 0 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4500000000000001e56 < l < 1.45e168

    1. Initial program 49.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified49.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. Step-by-step derivation
      1. expm1-log1p-u48.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef28.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\ell \cdot \frac{\ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1 \]
    4. Applied egg-rr28.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def48.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.45e168 < l < 5.89999999999999988e197

    1. Initial program 2.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. Simplified79.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 Om around inf 3.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. unpow23.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/80.4%

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

      \[\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 5.89999999999999988e197 < l

    1. Initial program 17.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. Simplified28.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. Step-by-step derivation
      1. expm1-log1p-u27.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef27.9%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*27.9%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative27.9%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def27.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)\right)} \]
      2. expm1-log1p28.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.45 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\ \mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+168}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 5.9 \cdot 10^{+197}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \frac{U}{\frac{Om \cdot Om}{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}\right)}\\ \end{array} \]

Alternative 7: 48.0% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 7.1 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_3\right)\right)}\\

\mathbf{elif}\;\ell \leq 7.2 \cdot 10^{+182}:\\
\;\;\;\;\sqrt{t_2 \cdot t_3}\\

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


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

    1. Initial program 57.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. Simplified54.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 U around 0 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7500000000000001e56 < l < 7.1000000000000001e167

    1. Initial program 49.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified49.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. Step-by-step derivation
      1. expm1-log1p-u48.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef28.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\ell \cdot \frac{\ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1 \]
    4. Applied egg-rr28.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def48.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.1000000000000001e167 < l < 7.2e182

    1. Initial program 2.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. Simplified79.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 Om around inf 3.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. unpow23.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/80.4%

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

      \[\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 7.2e182 < l

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.75 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\ \mathbf{elif}\;\ell \leq 7.1 \cdot 10^{+167}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.2 \cdot 10^{+182}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\left(\ell \cdot \frac{\ell}{Om}\right) \cdot \frac{U*}{\frac{Om}{n}}\right)\right)}\\ \end{array} \]

Alternative 8: 47.8% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+167}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t_2\right)\right)}\\

\mathbf{elif}\;\ell \leq 6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{t_1 \cdot t_2}\\

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


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

    1. Initial program 57.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. Simplified54.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 U around 0 52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.24999999999999998e57 < l < 1.35000000000000003e167

    1. Initial program 49.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified49.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. Step-by-step derivation
      1. expm1-log1p-u48.6%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef28.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative28.1%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\ell \cdot \frac{\ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1 \]
    4. Applied egg-rr28.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def48.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.35000000000000003e167 < l < 6.0000000000000004e197

    1. Initial program 2.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. Simplified79.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 Om around inf 3.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. unpow23.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/80.4%

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

      \[\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 6.0000000000000004e197 < l

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.25 \cdot 10^{+57}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \frac{2}{Om}\right)}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+167}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 6 \cdot 10^{+197}:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{2 \cdot \left(\frac{U \cdot U*}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)}{Om}\right)}\\ \end{array} \]

Alternative 9: 50.8% accurate, 1.8× speedup?

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -6.7999999999999996e84 or 3.5000000000000001e65 < Om

    1. Initial program 64.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. Simplified64.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 Om around inf 62.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. unpow262.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/67.1%

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

      \[\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 -6.7999999999999996e84 < Om < 3.5000000000000001e65

    1. Initial program 40.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. Simplified40.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. Step-by-step derivation
      1. expm1-log1p-u38.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef31.6%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*31.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative31.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\ell \cdot \frac{\ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1 \]
    4. Applied egg-rr31.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def38.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)\right)} \]
      2. expm1-log1p40.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -6.8 \cdot 10^{+84} \lor \neg \left(Om \leq 3.5 \cdot 10^{+65}\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}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{U*}{\frac{Om \cdot Om}{n \cdot \left(\ell \cdot \ell\right)}}\right)\right)\right)}\\ \end{array} \]

Alternative 10: 48.7% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -2.45e73

    1. Initial program 52.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Taylor expanded in l around 0 51.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.45e73 < U < 5.4000000000000001e197

    1. Initial program 52.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified52.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. Step-by-step derivation
      1. expm1-log1p-u50.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\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)}\right)\right)} \]
      2. expm1-udef32.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\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)}\right)} - 1} \]
      3. associate-*l*32.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)} - 1 \]
      4. *-commutative32.0%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \color{blue}{\ell \cdot \frac{\ell}{Om}}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1 \]
    4. Applied egg-rr32.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)} - 1} \]
    5. Step-by-step derivation
      1. expm1-def50.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)\right)}\right)\right)} \]
      2. expm1-log1p52.0%

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

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

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

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

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

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

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

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

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

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

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

    if 5.4000000000000001e197 < U

    1. Initial program 59.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Taylor expanded in l around 0 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 45.1% accurate, 1.9× speedup?

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

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


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

    1. Initial program 55.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. Taylor expanded in l around 0 52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.39999999999999984e-62 < l

    1. Initial program 47.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. Taylor expanded in l around 0 50.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 47.6% accurate, 2.0× speedup?

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

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

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

      \[\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/52.5%

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

    \[\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)} \]
  6. Final simplification52.5%

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

Alternative 13: 37.6% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -2.00000000000000008e-89

    1. Initial program 49.4%

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

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

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

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

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

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

    if -2.00000000000000008e-89 < U*

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

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

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

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

Alternative 14: 38.8% accurate, 2.1× speedup?

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

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Taylor expanded in l around 0 52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 36.8% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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