Toniolo and Linder, Equation (13)

Percentage Accurate: 50.4% → 62.3%
Time: 25.0s
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: 50.4% 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: 62.3% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;n \leq 1.14 \cdot 10^{+207} \lor \neg \left(n \leq 1.2 \cdot 10^{+252}\right):\\
\;\;\;\;t_1 \cdot \sqrt{U \cdot \left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) + n \cdot \left(\left(U* - U\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if n < -6.99999999999999992e-35

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999992e-35 < n < 2.2999999999999999e-307

    1. Initial program 43.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. Simplified57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.2999999999999999e-307 < n < 1.05e101

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

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

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

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

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

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

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

    if 1.05e101 < n < 1.14e207 or 1.2e252 < n

    1. Initial program 54.2%

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

        \[\leadsto \sqrt{\color{blue}{\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)}} \]
      2. sub-neg54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14e207 < n < 1.2e252

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -7 \cdot 10^{-35}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(t \cdot U\right) + \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)\right)}{Om}\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 2.3 \cdot 10^{-307}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t + \frac{\mathsf{fma}\left(\ell \cdot \frac{n}{Om}, U* - U, \ell \cdot -2\right)}{Om} \cdot \left(n \cdot \ell\right)\right)\right)}\\ \mathbf{elif}\;n \leq 1.05 \cdot 10^{+101}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \left(n \cdot \left(U* - U\right)\right) \cdot \frac{\ell}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 1.14 \cdot 10^{+207} \lor \neg \left(n \leq 1.2 \cdot 10^{+252}\right):\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) + n \cdot \left(\left(U* - U\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(n \cdot \sqrt{\frac{\frac{U \cdot U*}{Om}}{Om}}\right)\\ \end{array} \]

Alternative 2: 68.1% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 22.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 98.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)} \]

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 61.9% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -1.89999999999999985e-36

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999985e-36 < n < 4.9999999999999995e-309

    1. Initial program 43.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. Simplified57.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999995e-309 < n

    1. Initial program 45.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. Simplified56.6%

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

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

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

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

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

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

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

Alternative 4: 58.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -9.99999999999999928e-35

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999928e-35 < n < 1.8500000000000001e111

    1. Initial program 43.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. Simplified59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8500000000000001e111 < n < 3.59999999999999982e197

    1. Initial program 49.1%

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
    5. Applied egg-rr79.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]

    if 3.59999999999999982e197 < n

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1 \cdot 10^{-34}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(t \cdot U\right) + \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)\right)}{Om}\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 1.85 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t + \frac{\mathsf{fma}\left(\ell \cdot \frac{n}{Om}, U* - U, \ell \cdot -2\right)}{Om} \cdot \left(n \cdot \ell\right)\right)\right)}\\ \mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \left(n \cdot \sqrt{\frac{U \cdot \left(\frac{U*}{Om} - \frac{U}{Om}\right)}{Om}}\right)\\ \end{array} \]

Alternative 5: 59.7% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -8.1999999999999999e-80

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

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

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

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

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

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

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

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

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

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

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

    if -8.1999999999999999e-80 < n < 4.39999999999999984e110

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.39999999999999984e110 < n < 3.59999999999999982e197

    1. Initial program 49.1%

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
    5. Applied egg-rr79.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]

    if 3.59999999999999982e197 < n

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -8.2 \cdot 10^{-80}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(t \cdot U\right) + \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)\right)}{Om}\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 4.4 \cdot 10^{+110}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t - \left(n \cdot \ell\right) \cdot \frac{\ell \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{\frac{Om}{\ell \cdot U*}}, \frac{\ell}{Om}, t\right)\right)}\\ \end{array} \]

Alternative 6: 57.9% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 5.1 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -8.80000000000000041e-80

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

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

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

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

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

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

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

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

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

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

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

    if -8.80000000000000041e-80 < n < 1.20000000000000003e111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e111 < n < 5.09999999999999992e197

    1. Initial program 49.1%

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
    5. Applied egg-rr79.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]

    if 5.09999999999999992e197 < n

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

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

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

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

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

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

Alternative 7: 58.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -3.10000000000000016e-80

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

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

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

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

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

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

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

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

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

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

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

    if -3.10000000000000016e-80 < n < 1.20000000000000003e111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e111 < n < 3.59999999999999982e197

    1. Initial program 49.1%

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
    5. Applied egg-rr79.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]

    if 3.59999999999999982e197 < n

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

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

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

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

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

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

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

Alternative 8: 59.3% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;n \leq 3.6 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{t \cdot U}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -5e-80

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

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

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

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

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

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

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

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

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

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

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

    if -5e-80 < n < 1.20000000000000003e111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.20000000000000003e111 < n < 3.59999999999999982e197

    1. Initial program 49.1%

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
    5. Applied egg-rr79.9%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]

    if 3.59999999999999982e197 < n

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

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

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

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

Alternative 9: 60.0% accurate, 1.7× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1499999999999999e67 < l

    1. Initial program 26.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. Simplified60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 58.1% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.3000000000000001e108 or 1.25e-53 < Om

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3000000000000001e108 < Om < 1.25e-53

    1. Initial program 44.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. Simplified59.3%

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

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

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

Alternative 11: 60.9% accurate, 1.8× speedup?

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

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


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

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

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

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

    if 2.2999999999999999e67 < l

    1. Initial program 26.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. Simplified60.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 39.4% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.2e52 or 1.70000000000000016e79 < l < 6e111

    1. Initial program 46.9%

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(t \cdot U\right)}} \]
    4. Taylor expanded in n around 0 35.7%

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

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

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

    if 3.2e52 < l < 1.70000000000000016e79 or 6e111 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.2 \cdot 10^{+52} \lor \neg \left(\ell \leq 1.7 \cdot 10^{+79}\right) \land \ell \leq 6 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\ \end{array} \]

Alternative 13: 39.4% accurate, 1.9× speedup?

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

\mathbf{elif}\;\ell \leq 9.8 \cdot 10^{+78}:\\
\;\;\;\;\sqrt{2 \cdot \left(t_1 \cdot \left(U \cdot \frac{-2}{Om}\right)\right)}\\

\mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+111}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.07999999999999997e52 or 9.8000000000000004e78 < l < 4.1999999999999999e111

    1. Initial program 46.9%

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(t \cdot U\right)}} \]
    4. Taylor expanded in n around 0 35.7%

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

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

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

    if 1.07999999999999997e52 < l < 9.8000000000000004e78

    1. Initial program 68.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. Simplified84.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.1999999999999999e111 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.08 \cdot 10^{+52}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 9.8 \cdot 10^{+78}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \frac{-2}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(-2 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\ \end{array} \]

Alternative 14: 49.4% accurate, 1.9× speedup?

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

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


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

    1. Initial program 43.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. Simplified55.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.9999999999999998e162 < U*

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

Alternative 15: 43.6% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.6e102

    1. Initial program 45.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. Simplified53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6e102 < t

    1. Initial program 38.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. Simplified61.9%

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(t \cdot U\right)}} \]
    4. Taylor expanded in n around 0 48.1%

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

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

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

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

Alternative 16: 47.4% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

Alternative 17: 35.6% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 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 44.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.2%

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

    \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(t \cdot U\right)}} \]
  4. Taylor expanded in n around 0 31.5%

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

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

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

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

Reproduce

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