Toniolo and Linder, Equation (13)

Percentage Accurate: 49.6% → 67.0%
Time: 40.8s
Alternatives: 18
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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: 49.6% accurate, 1.0× speedup?

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

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

Alternative 1: 67.0% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot 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)}^{0.5}} \]
    5. Step-by-step derivation
      1. *-commutative41.6%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \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)}^{0.5} \]
      2. unpow1/241.6%

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{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)}} \]
    6. Simplified41.6%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{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)}} \]

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

    1. Initial program 97.8%

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

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

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.8% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 67.1% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 24.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.2% accurate, 1.0× speedup?

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

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


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

    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. Simplified57.6%

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

    if 2.0000000000000001e-114 < l < 2.1000000000000001e172

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

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

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

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

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

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

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

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

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

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

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

    if 2.1000000000000001e172 < l

    1. Initial program 16.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. Simplified19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 58.3% accurate, 1.0× speedup?

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7000000000000001e174 < l

    1. Initial program 16.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. Simplified19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 60.0% accurate, 1.0× speedup?

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15e172 < l

    1. Initial program 16.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. Simplified19.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.8% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.5000000000000002e137

    1. Initial program 39.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. Simplified38.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 53.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/53.5%

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

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

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

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

    if -5.5000000000000002e137 < t < 6.9999999999999998e267

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999998e267 < t

    1. Initial program 51.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. Simplified38.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 51.4%

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

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

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

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

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

Alternative 8: 56.7% accurate, 1.8× speedup?

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.15000000000000009e171 < l

    1. Initial program 16.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. Simplified19.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 t around 0 14.0%

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

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

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

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

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

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

Alternative 9: 52.8% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -3.6e-283 or 1.22e-33 < n

    1. Initial program 55.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. Simplified55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e-283 < n < 1.22e-33

    1. Initial program 44.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. Simplified45.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 50.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/50.5%

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

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

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

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

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

Alternative 10: 52.9% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -7.80000000000000013e67 or 8.2000000000000007e-34 < U*

    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. Simplified47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.80000000000000013e67 < U* < 8.2000000000000007e-34

    1. Initial program 55.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.1% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -5.4000000000000002e-19 or 7.99999999999999985e150 < Om

    1. Initial program 57.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. Simplified58.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000002e-19 < Om < 5.6000000000000002e-145

    1. Initial program 51.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.6000000000000002e-145 < Om < 7.99999999999999985e150

    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. Simplified47.2%

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

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

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

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

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

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

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

Alternative 12: 48.4% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -6.50000000000000008e-18 or 8.4999999999999999e150 < Om

    1. Initial program 57.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. Simplified58.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.50000000000000008e-18 < Om < 1.00000000000000007e-138

    1. Initial program 51.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000007e-138 < Om < 8.4999999999999999e150

    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. Simplified47.2%

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

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

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

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

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

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

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

Alternative 13: 46.8% accurate, 1.9× speedup?

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \frac{2}{Om}\right)\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 t < -4.49999999999999982e138

    1. Initial program 39.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. Simplified38.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 53.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/53.5%

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

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

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

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

    if -4.49999999999999982e138 < t < 1.05e38

    1. Initial program 58.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. Simplified59.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 Om around inf 45.4%

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

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

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

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

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

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

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

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

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

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

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

    if 1.05e38 < t

    1. Initial program 46.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. Simplified42.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 44.5%

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

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

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

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

Alternative 14: 43.2% accurate, 2.0× speedup?

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

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


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

    1. Initial program 59.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. Simplified57.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 43.8%

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

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

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

    if 5.6999999999999998e57 < l

    1. Initial program 23.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. Simplified23.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 0 18.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 44.4% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt (* 2.0 (* U (* n (- t (/ 2.0 (/ Om (* l l)))))))))
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 - (2.0 / (Om / (l * l))))))));
}
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 - (2.0d0 / (om / (l * l))))))))
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 - (2.0 / (Om / (l * l))))))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 / Float64(Om / Float64(l * l))))))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * (t - (2.0 / (Om / (l * l))))))));
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 * N[(t - N[(2.0 / N[(Om / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{2}{\frac{Om}{\ell \cdot \ell}}\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 52.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. Simplified53.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 45.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/45.2%

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

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

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

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

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

Alternative 16: 37.8% 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 52.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. Simplified53.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.3%

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

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

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

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

Alternative 17: 35.6% 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 52.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. Simplified53.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.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 18: 35.6% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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