Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 66.6%
Time: 34.0s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 50.1% accurate, 1.0× speedup?

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

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

Alternative 1: 66.6% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 5.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0

    1. Initial program 70.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. Simplified66.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. Applied egg-rr67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 65.8% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 5.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0

    1. Initial program 70.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. Simplified66.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. Applied egg-rr67.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 68.0% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 5.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e303 < (*.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.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. Simplified23.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. Applied egg-rr36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 63.3% accurate, 1.0× speedup?

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

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


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

    1. Initial program 53.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. Simplified49.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. Applied egg-rr55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.2000000000000002e126 < l

    1. Initial program 17.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 48.7% accurate, 1.8× speedup?

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

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


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2e67 < l

    1. Initial program 22.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. Simplified32.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. Applied egg-rr46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 53.1% accurate, 1.8× speedup?

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

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.59999999999999963e84 < l

    1. Initial program 20.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. Simplified31.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. Applied egg-rr43.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 60.5% accurate, 1.8× speedup?

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

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


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

    1. Initial program 53.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. Simplified49.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. Applied egg-rr55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999997e120 < l

    1. Initial program 17.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.8% accurate, 1.8× speedup?

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

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


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.06e68 < l

    1. Initial program 22.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. Simplified32.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. Applied egg-rr46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 46.0% accurate, 1.9× speedup?

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

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


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8499999999999999e67 < l

    1. Initial program 22.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. Simplified32.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. Applied egg-rr46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 43.0% accurate, 1.9× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;{\left(t_1 \cdot t_1\right)}^{0.25}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U* < -1.5000000000000001e-259

    1. Initial program 49.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. Simplified45.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.5000000000000001e-259 < U* < 5.50000000000000004e63

    1. Initial program 53.5%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{Om} \cdot \ell, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)\right)\right)}} \]
    3. Taylor expanded in Om around inf 54.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. unpow254.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/57.9%

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

      \[\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.50000000000000004e63 < U*

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
      2. metadata-eval30.4%

        \[\leadsto {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\color{blue}{\left(0.25 + 0.25\right)}} \]
      3. pow-prod-up30.3%

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

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

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

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

Alternative 11: 46.7% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 6.5 \cdot 10^{+165}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\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} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 6.5e+165)
   (sqrt (* U (* (* 2.0 n) (+ t (* (/ (* l l) Om) -2.0)))))
   (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 tmp;
	if (l <= 6.5e+165) {
		tmp = sqrt((U * ((2.0 * n) * (t + (((l * l) / Om) * -2.0)))));
	} 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) :: tmp
    if (l <= 6.5d+165) then
        tmp = sqrt((u * ((2.0d0 * n) * (t + (((l * l) / om) * (-2.0d0))))))
    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 tmp;
	if (l <= 6.5e+165) {
		tmp = Math.sqrt((U * ((2.0 * n) * (t + (((l * l) / Om) * -2.0)))));
	} 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_):
	tmp = 0
	if l <= 6.5e+165:
		tmp = math.sqrt((U * ((2.0 * n) * (t + (((l * l) / Om) * -2.0)))))
	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_)
	tmp = 0.0
	if (l <= 6.5e+165)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)))));
	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_)
	tmp = 0.0;
	if (l <= 6.5e+165)
		tmp = sqrt((U * ((2.0 * n) * (t + (((l * l) / Om) * -2.0)))));
	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$_] := If[LessEqual[l, 6.5e+165], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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}
\mathbf{if}\;\ell \leq 6.5 \cdot 10^{+165}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.4999999999999999e165

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999999e165 < l

    1. Initial program 15.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. Simplified30.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 U* around inf 30.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.5 \cdot 10^{+165}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\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 12: 46.9% accurate, 1.9× speedup?

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

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.2000000000000003e134 < l

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

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

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

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

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

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

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

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

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

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

Alternative 13: 45.4% accurate, 1.9× speedup?

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

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


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

    1. Initial program 49.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. Simplified45.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. Applied egg-rr51.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0999999999999999e-258 < U*

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

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

        \[\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/46.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. Simplified46.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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification46.7%

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

Alternative 14: 43.0% accurate, 2.0× speedup?

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

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


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

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000004e68 < l

    1. Initial program 22.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. Simplified32.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. Applied egg-rr46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 38.3% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 36.2% accurate, 2.1× speedup?

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

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

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

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

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

Alternative 17: 36.2% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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