Toniolo and Linder, Equation (13)

Percentage Accurate: 50.3% → 69.5%
Time: 24.1s
Alternatives: 20
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 20 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.3% 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: 69.5% accurate, 0.5× speedup?

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+303}:\\
\;\;\;\;\sqrt{t_1}\\

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


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

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 25.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 68.3% accurate, 0.3× speedup?

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

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

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


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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{t \cdot U}} \]
      2. *-commutative31.7%

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

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

    if 4.00000000000000011e-161 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.0000000000000002e151

    1. Initial program 97.8%

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

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

    1. Initial program 23.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. Simplified43.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 0 37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 63.5% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 1.5e-261 < l < 1.45000000000000008e118

    1. Initial program 69.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.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 U* around inf 68.8%

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

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

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

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

    if 1.45000000000000008e118 < l

    1. Initial program 33.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. Simplified57.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.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. distribute-lft-out52.8%

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

        \[\leadsto \sqrt{2 \cdot \left(n \cdot \color{blue}{\left(U \cdot t\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)} \]
      3. associate-/l*51.1%

        \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\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)} \]
      4. +-commutative51.1%

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

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

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

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

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

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

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

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

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

      \[\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}}} \]
    7. Step-by-step derivation
      1. associate-/l*76.9%

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

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

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

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

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

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

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

Alternative 4: 62.4% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 1.5e-261 < l < 2.35000000000000008e104

    1. Initial program 70.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. Simplified66.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 67.9%

      \[\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.35000000000000008e104 < l

    1. Initial program 34.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. Simplified59.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.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. distribute-lft-out55.4%

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

        \[\leadsto \sqrt{2 \cdot \left(n \cdot \color{blue}{\left(U \cdot t\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)} \]
      3. associate-/l*53.8%

        \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\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)} \]
      4. +-commutative53.8%

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

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

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

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

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

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

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

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

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

      \[\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}}} \]
    7. Step-by-step derivation
      1. associate-/l*78.1%

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

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

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

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

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

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

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

Alternative 5: 62.2% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 1.5e-261 < l < 2.1500000000000001e105

    1. Initial program 70.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. Simplified66.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 67.9%

      \[\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.1500000000000001e105 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 61.8% accurate, 1.0× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 1.7e-261 < l < 7.9999999999999997e82

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

      \[\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 69.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 7.9999999999999997e82 < l

    1. Initial program 33.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. Simplified57.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 0 46.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.6% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;\ell \leq 2.9 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < 1.55000000000000001e-84

    1. Initial program 56.1%

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

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

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

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

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

    if 1.55000000000000001e-84 < l < 1200

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

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

        \[\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-77.3%

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

        \[\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*77.3%

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

        \[\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*77.3%

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

      \[\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. Taylor expanded in U* around inf 76.8%

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

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

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

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

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

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

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

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

    if 1200 < l < 2.89999999999999989e84

    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. Step-by-step derivation
      1. associate-*l*57.3%

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

        \[\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-57.3%

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

        \[\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*57.3%

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

        \[\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*57.3%

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

      \[\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. Taylor expanded in Om around inf 57.2%

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

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

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

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

    if 2.89999999999999989e84 < l < 7.0000000000000003e158

    1. Initial program 46.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. Simplified58.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 U* around inf 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000003e158 < l

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

      \[\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 0 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 58.6% accurate, 1.8× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 1.5e-261 < l < 2.29999999999999995e83

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

      \[\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 69.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.29999999999999995e83 < l

    1. Initial program 33.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. Simplified57.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 0 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 59.5% accurate, 1.8× speedup?

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

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

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


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

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

      \[\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 38.1%

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

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

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

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

    if 2.6999999999999999e-261 < l < 2.4e84

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

      \[\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 69.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.4e84 < l

    1. Initial program 33.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. Simplified57.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 0 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 52.8% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 6.5000000000000003e-51

    1. Initial program 57.9%

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

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

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

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

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

    if 6.5000000000000003e-51 < l < 2.79999999999999982e84

    1. Initial program 52.8%

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

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

        \[\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-59.5%

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

        \[\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*59.5%

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

        \[\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*59.5%

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

      \[\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. Taylor expanded in Om around inf 50.8%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{2 \cdot \frac{{\ell}^{2}}{Om}}\right)\right)} \]
    5. Step-by-step derivation
      1. unpow250.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)} \]
      2. associate-/l*50.8%

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

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

    if 2.79999999999999982e84 < l < 7.0000000000000003e158

    1. Initial program 46.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. Simplified58.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 U* around inf 58.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.0000000000000003e158 < l

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

      \[\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 0 42.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.0% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 3.55 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\

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


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

    1. Initial program 57.9%

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

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

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

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

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

    if 4.60000000000000004e-51 < l < 3.5499999999999999e84

    1. Initial program 52.8%

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

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

        \[\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-59.5%

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

        \[\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*59.5%

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

        \[\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*59.5%

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

      \[\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. Taylor expanded in Om around inf 50.8%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{2 \cdot \frac{{\ell}^{2}}{Om}}\right)\right)} \]
    5. Step-by-step derivation
      1. unpow250.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)} \]
      2. associate-/l*50.8%

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

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

    if 3.5499999999999999e84 < l

    1. Initial program 33.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. Simplified57.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 U* around inf 51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -3.8999999999999999e233

    1. Initial program 65.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. Simplified65.4%

      \[\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 inf 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.8999999999999999e233 < n < 1.1e179

    1. Initial program 53.0%

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

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

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

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

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

    if 1.1e179 < n

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

Alternative 13: 47.3% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 56.1%

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

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

    if 2.6e-84 < l < 2.39999999999999992e145

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

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

        \[\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-64.6%

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

        \[\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*64.6%

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

        \[\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*64.6%

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

      \[\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. Taylor expanded in Om around inf 52.9%

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

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

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

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

    if 2.39999999999999992e145 < l

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

      \[\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 0 42.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 47.3% accurate, 1.9× speedup?

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

\mathbf{elif}\;\ell \leq 9.2 \cdot 10^{+141}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot t_1\right)\right)}\\

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


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

    1. Initial program 57.9%

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

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

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

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

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

    if 1.8e-51 < l < 9.2000000000000006e141

    1. Initial program 50.9%

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

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

        \[\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-55.7%

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

        \[\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*55.7%

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

        \[\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*55.7%

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

      \[\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. Taylor expanded in Om around inf 49.2%

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

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

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

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

    if 9.2000000000000006e141 < l

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

      \[\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 0 42.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 43.9% accurate, 2.0× speedup?

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

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


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

    1. Initial program 57.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. Taylor expanded in t around inf 45.9%

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

    if 5.59999999999999997e35 < l

    1. Initial program 34.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. Simplified55.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 0 44.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 44.1% accurate, 2.0× speedup?

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

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


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

    1. Initial program 57.4%

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

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

    if 2.79999999999999982e84 < l

    1. Initial program 33.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. Simplified57.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 0 46.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 39.5% accurate, 2.0× speedup?

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

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


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

    1. Initial program 57.4%

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

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

    if 7.99999999999999937e81 < l

    1. Initial program 33.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. Simplified57.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 0 46.4%

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

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

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

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

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

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

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

Alternative 18: 36.7% accurate, 2.1× speedup?

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

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


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

    1. Initial program 52.9%

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

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

    if 1.25000000000000011e24 < U*

    1. Initial program 56.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. Simplified62.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 36.1%

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

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

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

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

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

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

Alternative 19: 35.7% accurate, 2.1× speedup?

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

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

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

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

Alternative 20: 36.0% accurate, 2.1× speedup?

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

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

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

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

Reproduce

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