Toniolo and Linder, Equation (13)

Percentage Accurate: 50.5% → 63.7%
Time: 28.2s
Alternatives: 24
Speedup: 1.0×

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

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

Initial Program: 50.5% accurate, 1.0× speedup?

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

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

Alternative 1: 63.7% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t_2 \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;{\left(\sqrt[3]{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\right)}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(\sqrt{2}\right)}^{0.3333333333333333} \cdot e^{0.16666666666666666 \cdot \left(\log \left(U \cdot \left(n \cdot \left(2 \cdot \frac{-1}{Om} + \frac{n \cdot \left(U* - U\right)}{{Om}^{2}}\right)\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)}\right)}^{3}\\ \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)))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U))))))
   (if (<= t_2 5e-315)
     (* (sqrt (* 2.0 U)) (sqrt (* n (fma l (/ l (/ Om -2.0)) t))))
     (if (<= t_2 INFINITY)
       (pow
        (cbrt
         (sqrt
          (* (* 2.0 (* n U)) (- t (fma 2.0 (* l (/ l Om)) (* t_1 (- U U*)))))))
        3.0)
       (pow
        (*
         (pow (sqrt 2.0) 0.3333333333333333)
         (exp
          (*
           0.16666666666666666
           (+
            (log
             (*
              U
              (* n (+ (* 2.0 (/ -1.0 Om)) (/ (* n (- U* U)) (pow Om 2.0))))))
            (* -2.0 (log (/ 1.0 l)))))))
        3.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);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 5e-315) {
		tmp = sqrt((2.0 * U)) * sqrt((n * fma(l, (l / (Om / -2.0)), t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = pow(cbrt(sqrt(((2.0 * (n * U)) * (t - fma(2.0, (l * (l / Om)), (t_1 * (U - U_42_))))))), 3.0);
	} else {
		tmp = pow((pow(sqrt(2.0), 0.3333333333333333) * exp((0.16666666666666666 * (log((U * (n * ((2.0 * (-1.0 / Om)) + ((n * (U_42_ - U)) / pow(Om, 2.0)))))) + (-2.0 * log((1.0 / l))))))), 3.0);
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_1 * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 5e-315)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * fma(l, Float64(l / Float64(Om / -2.0)), t))));
	elseif (t_2 <= Inf)
		tmp = cbrt(sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(t_1 * Float64(U - U_42_))))))) ^ 3.0;
	else
		tmp = Float64((sqrt(2.0) ^ 0.3333333333333333) * exp(Float64(0.16666666666666666 * Float64(log(Float64(U * Float64(n * Float64(Float64(2.0 * Float64(-1.0 / Om)) + Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)))))) + Float64(-2.0 * log(Float64(1.0 / l))))))) ^ 3.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 * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 5e-315], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(l * N[(l / N[(Om / -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Power[N[Power[N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision], 3.0], $MachinePrecision], N[Power[N[(N[Power[N[Sqrt[2.0], $MachinePrecision], 0.3333333333333333], $MachinePrecision] * N[Exp[N[(0.16666666666666666 * N[(N[Log[N[(U * N[(n * N[(N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\

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

\mathbf{else}:\\
\;\;\;\;{\left({\left(\sqrt{2}\right)}^{0.3333333333333333} \cdot e^{0.16666666666666666 \cdot \left(\log \left(U \cdot \left(n \cdot \left(2 \cdot \frac{-1}{Om} + \frac{n \cdot \left(U* - U\right)}{{Om}^{2}}\right)\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)}\right)}^{3}\\


\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*)))) < 5.0000000023e-315

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.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 64.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. Simplified62.0%

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

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

    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. Simplified0.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-rr0.3%

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

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

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

Alternative 2: 63.4% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\ \mathbf{elif}\;t_1 \leq 10^{+308}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\sqrt{2}} \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{-2}{Om} - \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right) - -2 \cdot \log \ell\right)}\right)}^{3}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (*
          (* (* 2.0 n) U)
          (+
           (- t (* 2.0 (/ (* l l) Om)))
           (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
   (if (<= t_1 5e-315)
     (* (sqrt (* 2.0 U)) (sqrt (* n (fma l (/ l (/ Om -2.0)) t))))
     (if (<= t_1 1e+308)
       (sqrt t_1)
       (pow
        (*
         (cbrt (sqrt 2.0))
         (pow
          (exp 0.16666666666666666)
          (-
           (log (* (* n U) (- (/ (- 2.0) Om) (/ n (/ (* Om Om) (- U U*))))))
           (* -2.0 (log l)))))
        3.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) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
	double tmp;
	if (t_1 <= 5e-315) {
		tmp = sqrt((2.0 * U)) * sqrt((n * fma(l, (l / (Om / -2.0)), t)));
	} else if (t_1 <= 1e+308) {
		tmp = sqrt(t_1);
	} else {
		tmp = pow((cbrt(sqrt(2.0)) * pow(exp(0.16666666666666666), (log(((n * U) * ((-2.0 / Om) - (n / ((Om * Om) / (U - U_42_)))))) - (-2.0 * log(l))))), 3.0);
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_1 <= 5e-315)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * fma(l, Float64(l / Float64(Om / -2.0)), t))));
	elseif (t_1 <= 1e+308)
		tmp = sqrt(t_1);
	else
		tmp = Float64(cbrt(sqrt(2.0)) * (exp(0.16666666666666666) ^ Float64(log(Float64(Float64(n * U) * Float64(Float64(Float64(-2.0) / Om) - Float64(n / Float64(Float64(Om * Om) / Float64(U - U_42_)))))) - Float64(-2.0 * log(l))))) ^ 3.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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e-315], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * N[(l * N[(l / N[(Om / -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], N[Sqrt[t$95$1], $MachinePrecision], N[Power[N[(N[Power[N[Sqrt[2.0], $MachinePrecision], 1/3], $MachinePrecision] * N[Power[N[Exp[0.16666666666666666], $MachinePrecision], N[(N[Log[N[(N[(n * U), $MachinePrecision] * N[(N[((-2.0) / Om), $MachinePrecision] - N[(n / N[(N[(Om * Om), $MachinePrecision] / N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(-2.0 * N[Log[l], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_1 \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{\sqrt{2}} \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{-2}{Om} - \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right) - -2 \cdot \log \ell\right)}\right)}^{3}\\


\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*)))) < 5.0000000023e-315

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.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*)))) < 1e308

    1. Initial program 99.6%

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

    if 1e308 < (*.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 12.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. Simplified17.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-rr19.4%

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

      \[\leadsto {\color{blue}{\left({\left(1 \cdot \sqrt{2}\right)}^{0.3333333333333333} \cdot e^{0.16666666666666666 \cdot \left(\log \left(-1 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right) + -2 \cdot \log \left(\frac{1}{\ell}\right)\right)}\right)}}^{3} \]
    5. Step-by-step derivation
      1. unpow1/319.2%

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

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

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

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

    \[\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 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 10^{+308}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt[3]{\sqrt{2}} \cdot {\left(e^{0.16666666666666666}\right)}^{\left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{-2}{Om} - \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right) - -2 \cdot \log \ell\right)}\right)}^{3}\\ \end{array} \]

Alternative 3: 62.7% accurate, 0.2× speedup?

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

\mathbf{elif}\;t_2 \leq 10^{+308}:\\
\;\;\;\;\sqrt{t_2}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*)))) < 5.0000000023e-315

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.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*)))) < 1e308

    1. Initial program 99.6%

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

    if 1e308 < (*.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 19.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. Simplified25.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-rr28.8%

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

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

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

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

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

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

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

    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. Simplified0.3%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(-2 \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification62.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 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 10^{+308}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{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:\\ \;\;\;\;{\left(\sqrt[3]{\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)\right)}}\right)}^{3}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}\\ \end{array} \]

Alternative 4: 61.9% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.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 64.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. Simplified62.0%

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

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

    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. Simplified0.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.0000000023e-315 or 5.00000000000000009e305 < (*.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 16.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. Simplified21.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.00000000000000009e305

    1. Initial program 99.6%

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

    if +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. Simplified0.3%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 5 \cdot 10^{+305}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{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{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}\\ \end{array} \]

Alternative 6: 60.6% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*)))) < 5.0000000023e-315

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5.00000000000000009e305

    1. Initial program 99.6%

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

    if 5.00000000000000009e305 < (*.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 20.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. Simplified26.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\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. Simplified0.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 59.4% accurate, 0.4× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t_2 \leq 5 \cdot 10^{-315}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t_1}\\ \mathbf{elif}\;t_2 \leq 10^{+308}:\\ \;\;\;\;\sqrt{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt[3]{{\left(t_1 \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{1.5}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (fma l (/ l (/ Om -2.0)) t))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+
           (- t (* 2.0 (/ (* l l) Om)))
           (* (* n (pow (/ l Om) 2.0)) (- U* U))))))
   (if (<= t_2 5e-315)
     (* (sqrt (* 2.0 U)) (sqrt (* n t_1)))
     (if (<= t_2 1e+308)
       (sqrt t_2)
       (cbrt (pow (* t_1 (* 2.0 (* n U))) 1.5))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = fma(l, (l / (Om / -2.0)), t);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)));
	double tmp;
	if (t_2 <= 5e-315) {
		tmp = sqrt((2.0 * U)) * sqrt((n * t_1));
	} else if (t_2 <= 1e+308) {
		tmp = sqrt(t_2);
	} else {
		tmp = cbrt(pow((t_1 * (2.0 * (n * U))), 1.5));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = fma(l, Float64(l / Float64(Om / -2.0)), t)
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 5e-315)
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t_1)));
	elseif (t_2 <= 1e+308)
		tmp = sqrt(t_2);
	else
		tmp = cbrt((Float64(t_1 * Float64(2.0 * Float64(n * U))) ^ 1.5));
	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[(l * N[(l / N[(Om / -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 5e-315], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+308], N[Sqrt[t$95$2], $MachinePrecision], N[Power[N[Power[N[(t$95$1 * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\ell, \frac{\ell}{\frac{Om}{-2}}, t\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t_2 \leq 5 \cdot 10^{-315}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t_1}\\

\mathbf{elif}\;t_2 \leq 10^{+308}:\\
\;\;\;\;\sqrt{t_2}\\

\mathbf{else}:\\
\;\;\;\;\sqrt[3]{{\left(t_1 \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{1.5}}\\


\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*)))) < 5.0000000023e-315

    1. Initial program 9.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. Simplified12.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000023e-315 < (*.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*)))) < 1e308

    1. Initial program 99.6%

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

    if 1e308 < (*.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 12.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. Simplified13.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 54.8% accurate, 1.0× speedup?

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

\mathbf{elif}\;\ell \leq 3 \cdot 10^{+221}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\

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


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

    1. Initial program 50.3%

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

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

    if 1.4e41 < l < 3.0000000000000001e221

    1. Initial program 39.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. Simplified46.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 n around 0 46.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.0000000000000001e221 < l

    1. Initial program 7.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. Simplified7.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 l around inf 40.2%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 48.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -3.0000000000000001e-113

    1. Initial program 49.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. Simplified51.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.0000000000000001e-113 < Om < 3.1499999999999998e-49

    1. Initial program 28.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. Simplified28.8%

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

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

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

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

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

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

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

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

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

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

    if 3.1499999999999998e-49 < Om

    1. Initial program 54.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. Simplified54.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.5% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -3.79999999999999983e-113 or 3e-49 < Om

    1. Initial program 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.79999999999999983e-113 < Om < 3e-49

    1. Initial program 28.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. Simplified28.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.6% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -8.4999999999999995e-123 or 2.49999999999999997e-93 < Om

    1. Initial program 51.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. Simplified51.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.4999999999999995e-123 < Om < 2.49999999999999997e-93

    1. Initial program 26.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. Simplified25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 47.6% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -9.99999999999999979e-114 or 7.9999999999999996e-94 < Om

    1. Initial program 51.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. Simplified51.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999979e-114 < Om < 7.9999999999999996e-94

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 48.3% accurate, 1.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{t_1 \cdot \frac{\ell}{\frac{\frac{Om}{U - U*}}{-\ell}}}{\frac{Om}{n}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -2.3999999999999998e-106 or 2.4000000000000001e-93 < Om

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.3999999999999998e-106 < Om < 2.4000000000000001e-93

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 48.9% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -3.69999999999999981e-109 or 1.24999999999999999e-93 < Om

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.69999999999999981e-109 < Om < 1.24999999999999999e-93

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 48.1% accurate, 1.9× speedup?

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{t_1}{\frac{Om}{n}} \cdot \frac{U*}{\frac{Om}{\ell \cdot \ell}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.3e-124 or 6.7999999999999996e-94 < Om

    1. Initial program 51.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. Simplified51.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e-124 < Om < 6.7999999999999996e-94

    1. Initial program 26.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. Simplified25.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 39.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+106}:\\
\;\;\;\;\sqrt{t_1}\\

\mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\

\mathbf{else}:\\
\;\;\;\;{t_1}^{0.5}\\


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

    1. Initial program 50.3%

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

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

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

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

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

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

    if 1.32e42 < l < 1.2500000000000001e91

    1. Initial program 43.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. Simplified44.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative32.2%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
      3. unpow232.2%

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

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

    if 1.2500000000000001e91 < l < 9.4999999999999995e106

    1. Initial program 80.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. Simplified80.0%

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

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

    if 9.4999999999999995e106 < l < 1.94999999999999993e164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.94999999999999993e164 < l

    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. Simplified17.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.32 \cdot 10^{+42}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+91}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot \left(\ell \cdot \ell\right)}}}\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+106}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+164}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \]

Alternative 17: 39.0% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 8.2 \cdot 10^{+106}:\\
\;\;\;\;\sqrt{t_1}\\

\mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\

\mathbf{else}:\\
\;\;\;\;{t_1}^{0.5}\\


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

    1. Initial program 50.3%

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

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

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

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

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

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

    if 1.25000000000000002e42 < l < 2.75000000000000001e69

    1. Initial program 58.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. Simplified58.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.75000000000000001e69 < l < 8.2000000000000005e106

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

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

    if 8.2000000000000005e106 < l < 1.94999999999999993e164

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.94999999999999993e164 < l

    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. Simplified17.0%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.25 \cdot 10^{+42}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 2.75 \cdot 10^{+69}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(-2 \cdot \frac{\ell \cdot \ell}{\frac{Om}{n}}\right)}\\ \mathbf{elif}\;\ell \leq 8.2 \cdot 10^{+106}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+164}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \end{array} \]

Alternative 18: 39.2% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.80000000000000045e-84 or 2.70000000000000014e-226 < t

    1. Initial program 48.4%

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

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

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

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

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

    if -7.80000000000000045e-84 < t < 2.70000000000000014e-226

    1. Initial program 37.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. Simplified40.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 n around 0 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.8 \cdot 10^{-84} \lor \neg \left(t \leq 2.7 \cdot 10^{-226}\right):\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(-2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \end{array} \]

Alternative 19: 45.3% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < 6600

    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. Simplified48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6600 < U*

    1. Initial program 31.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. Simplified25.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 30.8%

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

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

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

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

Alternative 20: 40.3% accurate, 2.0× speedup?

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

\mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+164}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot \left(\ell \cdot \ell\right)}}}\\

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


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

    1. Initial program 50.3%

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

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

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

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

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

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

    if 3.8000000000000001e41 < l < 1.94999999999999993e164

    1. Initial program 50.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. Simplified50.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative35.6%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
      3. unpow235.6%

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

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

    if 1.94999999999999993e164 < l

    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. Simplified17.0%

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

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

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

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

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

Alternative 21: 37.9% accurate, 2.1× speedup?

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

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


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

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

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

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

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

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

    if -1.16e-259 < n

    1. Initial program 46.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. Simplified45.9%

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

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

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

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

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

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

Alternative 22: 38.1% accurate, 2.1× speedup?

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

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

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

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

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

Alternative 23: 35.9% 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 45.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. Simplified44.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 36.3%

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

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

Alternative 24: 36.1% accurate, 2.1× speedup?

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

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

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

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

Reproduce

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