Toniolo and Linder, Equation (13)

Percentage Accurate: 49.2% → 68.4%
Time: 22.9s
Alternatives: 18
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 49.2% 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: 68.4% 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^{-301}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+295}:\\ \;\;\;\;\sqrt{t_1}\\ \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
 (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-301)
     (sqrt (* 2.0 (* U (* n (fma -2.0 (* l (/ l Om)) t)))))
     (if (<= t_1 2e+295)
       (sqrt t_1)
       (*
        (* 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 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-301) {
		tmp = sqrt((2.0 * (U * (n * fma(-2.0, (l * (l / Om)), t)))));
	} else if (t_1 <= 2e+295) {
		tmp = sqrt(t_1);
	} else {
		tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_1 <= 5e-301)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * fma(-2.0, Float64(l * Float64(l / Om)), t)))));
	elseif (t_1 <= 2e+295)
		tmp = sqrt(t_1);
	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
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-301], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 2e+295], N[Sqrt[t$95$1], $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}
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^{-301}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)}\\

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

\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 (*.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.00000000000000013e-301

    1. Initial program 14.8%

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

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

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

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

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

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

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

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

    if 5.00000000000000013e-301 < (*.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*)))) < 2e295

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

    if 2e295 < (*.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 22.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. Simplified39.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 inf 41.7%

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

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

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

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

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

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

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

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

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

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

        \[\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. *-commutative45.0%

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

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

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

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

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

Alternative 2: 62.5% accurate, 1.0× speedup?

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

\mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+82}:\\
\;\;\;\;\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)}\\

\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 4 regimes
  2. if l < 2e-100

    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. Simplified55.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 55.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 2e-100 < l < 0.00899999999999999932

    1. Initial program 62.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 n around 0 62.7%

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

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

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

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

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

    if 0.00899999999999999932 < l < 2.5999999999999998e82

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

    if 2.5999999999999998e82 < l

    1. Initial program 25.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. Simplified52.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 t around inf 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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 4 regimes into one program.
  4. Final simplification61.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2 \cdot 10^{-100}:\\ \;\;\;\;\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{elif}\;\ell \leq 0.009:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+82}:\\ \;\;\;\;\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)}\\ \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 3: 61.1% accurate, 1.0× speedup?

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

    1. Initial program 52.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. Step-by-step derivation
      1. associate-*l*54.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-neg54.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-54.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-neg54.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*56.2%

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

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

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

      \[\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)}} \]

    if 1.14999999999999997e40 < l

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\mathsf{fma}\left(\ell, -2, \color{blue}{\frac{n \cdot \left(\ell \cdot U*\right)}{Om}}\right)}{\frac{Om}{n \cdot \left(\ell \cdot U\right)}}\right)} \]
    7. 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 U*}{Om} - 2\right) \cdot U\right)}{Om}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.15 \cdot 10^{+40}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right) - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\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 4: 62.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;\ell \leq 7.8 \cdot 10^{+67}:\\
\;\;\;\;t_1\\

\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 < 2.19999999999999989e-100 or 0.0269999999999999997 < l < 7.80000000000000013e67

    1. Initial program 51.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. Simplified56.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 U around 0 56.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.19999999999999989e-100 < l < 0.0269999999999999997

    1. Initial program 62.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 n around 0 62.7%

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

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

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

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

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

    if 7.80000000000000013e67 < l

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

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

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

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

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

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

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

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

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

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

        \[\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/66.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-udef66.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. *-commutative66.3%

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\mathsf{fma}\left(\ell, -2, \color{blue}{\frac{n \cdot \left(\ell \cdot U*\right)}{Om}}\right)}{\frac{Om}{n \cdot \left(\ell \cdot U\right)}}\right)} \]
    7. Taylor expanded in l around inf 79.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}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.2 \cdot 10^{-100}:\\ \;\;\;\;\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{elif}\;\ell \leq 0.027:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \frac{n}{\frac{Om \cdot Om}{\ell \cdot \ell}} \cdot \left(U* - U\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.8 \cdot 10^{+67}:\\ \;\;\;\;\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 5: 54.1% accurate, 1.7× speedup?

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

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

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

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

Alternative 6: 48.2% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.19999999999999996e-49 or 3.90000000000000001e-118 < Om

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

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

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

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

        \[\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-*r/50.3%

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

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

    if -1.19999999999999996e-49 < Om < 3.90000000000000001e-118

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{-2 \cdot \frac{n}{\frac{\frac{\frac{Om}{U}}{2 - \frac{n}{\frac{Om}{U* - U}}}}{\color{blue}{\ell \cdot \ell}}}} \]
    5. Simplified50.3%

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

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

Alternative 7: 50.7% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -7.2000000000000002e-24 or 1.3e-168 < Om

    1. Initial program 50.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. Step-by-step derivation
      1. associate-*l*52.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-neg52.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-52.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-neg52.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*57.0%

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

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

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    4. Taylor expanded in Om around inf 46.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. unpow246.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-*r/50.6%

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

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

    if -7.2000000000000002e-24 < Om < 1.3e-168

    1. Initial program 39.2%

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

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

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

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

Alternative 8: 55.4% accurate, 1.8× speedup?

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 1.3999999999999999e89

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

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

      \[\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 1.3999999999999999e89 < Om

    1. Initial program 45.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. Step-by-step derivation
      1. associate-*l*47.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-neg47.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-47.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-neg47.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*58.8%

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

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

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

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

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

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

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

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

Alternative 9: 44.2% accurate, 1.9× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5999999999999999e68 < U*

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

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

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

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

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

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

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

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

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

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

        \[\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-*r/50.5%

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

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

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

Alternative 10: 44.1% accurate, 1.9× speedup?

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

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


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

    1. Initial program 46.9%

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

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

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

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

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

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

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

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

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

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

    if -3.89999999999999976e53 < U*

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)\right)\right)} \]
      7. associate-*l*54.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. Simplified54.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 47.5%

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

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

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

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

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

Alternative 11: 46.9% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2 \cdot 10^{-133}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 5.35 \cdot 10^{+247}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(-2 \cdot \frac{n}{Om}\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 2e-133)
   (sqrt (* 2.0 (* U (* n t))))
   (if (<= l 5.35e+247)
     (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (* l (/ l Om)))))))
     (pow (* 2.0 (* (* -2.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 <= 2e-133) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else if (l <= 5.35e+247) {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	} else {
		tmp = pow((2.0 * ((-2.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 <= 2d-133) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else if (l <= 5.35d+247) then
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * (l * (l / om)))))))
    else
        tmp = (2.0d0 * (((-2.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 <= 2e-133) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else if (l <= 5.35e+247) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	} else {
		tmp = Math.pow((2.0 * ((-2.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 <= 2e-133:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	elif l <= 5.35e+247:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))))
	else:
		tmp = math.pow((2.0 * ((-2.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 <= 2e-133)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	elseif (l <= 5.35e+247)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))));
	else
		tmp = Float64(2.0 * Float64(Float64(-2.0 * Float64(n / 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 <= 2e-133)
		tmp = sqrt((2.0 * (U * (n * t))));
	elseif (l <= 5.35e+247)
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
	else
		tmp = (2.0 * ((-2.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, 2e-133], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 5.35e+247], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(-2.0 * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 2 \cdot 10^{-133}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-133 < l < 5.3500000000000001e247

    1. Initial program 49.2%

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

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

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

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

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

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

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

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

      \[\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 42.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. unpow242.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-*r/47.7%

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

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

    if 5.3500000000000001e247 < l

    1. Initial program 17.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. Simplified50.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 43.5%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 43.8% accurate, 1.9× speedup?

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

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


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

    1. Initial program 46.9%

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

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

      \[\leadsto \sqrt{2 \cdot \frac{n \cdot \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*37.8%

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

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

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

    if -3.89999999999999976e53 < U*

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)\right)\right)} \]
      7. associate-*l*54.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. Simplified54.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 47.5%

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

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

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

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

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

Alternative 13: 42.6% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 5 \cdot 10^{-63}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 9.8 \cdot 10^{+38}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(-2 \cdot \frac{n}{Om}\right) \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 5e-63)
   (sqrt (* 2.0 (* U (* n t))))
   (if (<= l 9.8e+38)
     (sqrt (* (* 2.0 n) (* U t)))
     (pow (* 2.0 (* (* -2.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 <= 5e-63) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else if (l <= 9.8e+38) {
		tmp = sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = pow((2.0 * ((-2.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 <= 5d-63) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else if (l <= 9.8d+38) then
        tmp = sqrt(((2.0d0 * n) * (u * t)))
    else
        tmp = (2.0d0 * (((-2.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 <= 5e-63) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else if (l <= 9.8e+38) {
		tmp = Math.sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = Math.pow((2.0 * ((-2.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 <= 5e-63:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	elif l <= 9.8e+38:
		tmp = math.sqrt(((2.0 * n) * (U * t)))
	else:
		tmp = math.pow((2.0 * ((-2.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 <= 5e-63)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	elseif (l <= 9.8e+38)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t)));
	else
		tmp = Float64(2.0 * Float64(Float64(-2.0 * Float64(n / 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 <= 5e-63)
		tmp = sqrt((2.0 * (U * (n * t))));
	elseif (l <= 9.8e+38)
		tmp = sqrt(((2.0 * n) * (U * t)));
	else
		tmp = (2.0 * ((-2.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, 5e-63], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 9.8e+38], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(-2.0 * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{-63}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

\mathbf{elif}\;\ell \leq 9.8 \cdot 10^{+38}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000002e-63 < l < 9.80000000000000004e38

    1. Initial program 66.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. Simplified72.0%

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

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

    if 9.80000000000000004e38 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 38.1% accurate, 1.9× speedup?

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

\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+39}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.25e-63 < l < 3.3999999999999999e39

    1. Initial program 66.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. Simplified72.0%

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

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

    if 3.3999999999999999e39 < l

    1. Initial program 34.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. Simplified54.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 n around 0 31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.9% accurate, 2.0× speedup?

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

\mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+41}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

    if 2.89999999999999975e-63 < l < 1.65e41

    1. Initial program 66.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. Simplified72.0%

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

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

    if 1.65e41 < l

    1. Initial program 34.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. Simplified54.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 l around -inf 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 35.4% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U* \leq -9 \cdot 10^{-168}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \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* -9e-168)
   (sqrt (* 2.0 (* U (* n 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_ <= -9e-168) {
		tmp = sqrt((2.0 * (U * (n * 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 <= (-9d-168)) then
        tmp = sqrt((2.0d0 * (u * (n * 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_ <= -9e-168) {
		tmp = Math.sqrt((2.0 * (U * (n * 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_ <= -9e-168:
		tmp = math.sqrt((2.0 * (U * (n * 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_ <= -9e-168)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * 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_ <= -9e-168)
		tmp = sqrt((2.0 * (U * (n * 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$, -9e-168], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $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 -9 \cdot 10^{-168}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

\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* < -9.0000000000000002e-168

    1. Initial program 47.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. Simplified52.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 n around 0 32.4%

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

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

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

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

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

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

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

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

    if -9.0000000000000002e-168 < U*

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

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(n \cdot \color{blue}{\left(U \cdot t\right)}\right)\right)}^{0.5} \]
    5. Applied egg-rr32.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 simplification32.0%

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

Alternative 17: 34.6% accurate, 2.1× speedup?

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

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


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

    1. Initial program 47.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. Simplified52.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 n around 0 32.4%

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

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

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

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

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

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

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

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

    if -5.99999999999999983e-168 < U*

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

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

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

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

Alternative 18: 34.6% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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