Toniolo and Linder, Equation (13)

Percentage Accurate: 50.2% → 67.4%
Time: 26.8s
Alternatives: 24
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 24 alternatives:

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

Initial Program: 50.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: 67.4% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\

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


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

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \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)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*50.2%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \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)}} \]
      2. *-commutative50.2%

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

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

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

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

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

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

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

    1. Initial program 67.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 67.7% accurate, 0.3× speedup?

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\

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


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

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \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)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*50.2%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \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)}} \]
      2. *-commutative50.2%

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

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

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

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

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

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

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

    1. Initial program 67.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 68.0% accurate, 0.5× speedup?

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\

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


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

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \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)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*50.2%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \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)}} \]
      2. *-commutative50.2%

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

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

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

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

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

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

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

    1. Initial program 67.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.6% accurate, 1.0× speedup?

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


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

    1. Initial program 55.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. Simplified60.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 61.1%

      \[\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.50000000000000012e107 < l < 6.60000000000000034e181

    1. Initial program 34.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. Simplified83.9%

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

    if 6.60000000000000034e181 < l

    1. Initial program 12.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. Simplified39.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 49.8%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 62.6% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 3.1 \cdot 10^{+65}:\\ \;\;\;\;\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 8.8 \cdot 10^{+182}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{\left(U - U*\right) \cdot \left(n \cdot \ell\right)}{Om} - \ell \cdot -2\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{n \cdot \left(U \cdot \left(\frac{U*}{Om} \cdot \frac{n}{Om} + \frac{-2}{Om}\right)\right)}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 3.1e+65)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (if (<= l 8.8e+182)
     (sqrt
      (-
       (* 2.0 (* n (* U t)))
       (*
        2.0
        (/ (* (* n (* U l)) (- (/ (* (- U U*) (* n l)) Om) (* l -2.0))) Om))))
     (*
      (sqrt 2.0)
      (* l (sqrt (* n (* U (+ (* (/ U* Om) (/ n 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 <= 3.1e+65) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (l <= 8.8e+182) {
		tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	} else {
		tmp = sqrt(2.0) * (l * sqrt((n * (U * (((U_42_ / Om) * (n / 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 <= 3.1d+65) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else if (l <= 8.8d+182) then
        tmp = sqrt(((2.0d0 * (n * (u * t))) - (2.0d0 * (((n * (u * l)) * ((((u - u_42) * (n * l)) / om) - (l * (-2.0d0)))) / om))))
    else
        tmp = sqrt(2.0d0) * (l * sqrt((n * (u * (((u_42 / om) * (n / 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 <= 3.1e+65) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (l <= 8.8e+182) {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	} else {
		tmp = Math.sqrt(2.0) * (l * Math.sqrt((n * (U * (((U_42_ / Om) * (n / Om)) + (-2.0 / Om))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 3.1e+65:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	elif l <= 8.8e+182:
		tmp = math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))))
	else:
		tmp = math.sqrt(2.0) * (l * math.sqrt((n * (U * (((U_42_ / Om) * (n / Om)) + (-2.0 / Om))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 3.1e+65)
		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 <= 8.8e+182)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) - Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(Float64(Float64(U - U_42_) * Float64(n * l)) / Om) - Float64(l * -2.0))) / Om))));
	else
		tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n * Float64(U * Float64(Float64(Float64(U_42_ / Om) * Float64(n / Om)) + Float64(-2.0 / Om)))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 3.1e+65)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	elseif (l <= 8.8e+182)
		tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	else
		tmp = sqrt(2.0) * (l * sqrt((n * (U * (((U_42_ / Om) * (n / 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, 3.1e+65], 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, 8.8e+182], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n * N[(U * N[(N[(N[(U$42$ / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.1 \cdot 10^{+65}:\\
\;\;\;\;\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 8.8 \cdot 10^{+182}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{\left(U - U*\right) \cdot \left(n \cdot \ell\right)}{Om} - \ell \cdot -2\right)}{Om}}\\

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


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

    1. Initial program 56.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. Simplified59.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 60.5%

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

    if 3.09999999999999991e65 < l < 8.79999999999999986e182

    1. Initial program 39.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. Simplified81.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 77.5%

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

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

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

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

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

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

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

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

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

    if 8.79999999999999986e182 < l

    1. Initial program 12.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. Simplified39.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 36.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \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)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*36.7%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \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)}} \]
      2. *-commutative36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 62.8% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 7.5 \cdot 10^{+64}:\\ \;\;\;\;\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 9.2 \cdot 10^{+181}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{\left(U - U*\right) \cdot \left(n \cdot \ell\right)}{Om} - \ell \cdot -2\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + n \cdot \frac{U* - U}{Om}\right)}}}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 7.5e+64)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (if (<= l 9.2e+181)
     (sqrt
      (-
       (* 2.0 (* n (* U t)))
       (*
        2.0
        (/ (* (* n (* U l)) (- (/ (* (- U U*) (* n l)) Om) (* l -2.0))) Om))))
     (*
      (sqrt 2.0)
      (* l (sqrt (/ n (/ Om (* U (+ -2.0 (* n (/ (- U* U) Om))))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 7.5e+64) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (l <= 9.2e+181) {
		tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	} else {
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n * ((U_42_ - U) / 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 <= 7.5d+64) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else if (l <= 9.2d+181) then
        tmp = sqrt(((2.0d0 * (n * (u * t))) - (2.0d0 * (((n * (u * l)) * ((((u - u_42) * (n * l)) / om) - (l * (-2.0d0)))) / om))))
    else
        tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (n * ((u_42 - u) / 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 <= 7.5e+64) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (l <= 9.2e+181) {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	} else {
		tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (n * ((U_42_ - U) / Om))))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 7.5e+64:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	elif l <= 9.2e+181:
		tmp = math.sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))))
	else:
		tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (n * ((U_42_ - U) / Om))))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 7.5e+64)
		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 <= 9.2e+181)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) - Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(Float64(Float64(U - U_42_) * Float64(n * l)) / Om) - Float64(l * -2.0))) / Om))));
	else
		tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n * Float64(Float64(U_42_ - U) / Om)))))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 7.5e+64)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	elseif (l <= 9.2e+181)
		tmp = sqrt(((2.0 * (n * (U * t))) - (2.0 * (((n * (U * l)) * ((((U - U_42_) * (n * l)) / Om) - (l * -2.0))) / Om))));
	else
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n * ((U_42_ - U) / 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, 7.5e+64], 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, 9.2e+181], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.5 \cdot 10^{+64}:\\
\;\;\;\;\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 9.2 \cdot 10^{+181}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{\left(U - U*\right) \cdot \left(n \cdot \ell\right)}{Om} - \ell \cdot -2\right)}{Om}}\\

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


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

    1. Initial program 56.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. Simplified59.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 60.5%

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

    if 7.5000000000000005e64 < l < 9.1999999999999995e181

    1. Initial program 39.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. Simplified81.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 77.5%

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

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

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

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

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

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

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

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

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

    if 9.1999999999999995e181 < l

    1. Initial program 12.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. Simplified39.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 49.8%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 55.8% accurate, 1.7× speedup?

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

\mathbf{elif}\;Om \leq 3.3 \cdot 10^{+65}:\\
\;\;\;\;\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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(U* - U\right) \cdot \frac{n \cdot \left(\ell \cdot \ell\right)}{Om \cdot Om}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -6e117

    1. Initial program 39.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*46.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-neg46.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-46.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-neg46.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*65.3%

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

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

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

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

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

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

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

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

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

    if -6e117 < Om < 3.30000000000000023e65

    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. Simplified62.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 65.6%

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

    if 3.30000000000000023e65 < Om

    1. Initial program 57.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. Taylor expanded in n around 0 59.1%

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

        \[\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 \cdot \color{blue}{\left(\ell \cdot \ell\right)}}{{Om}^{2}} \cdot \left(U - U*\right)\right)} \]
      2. unpow259.1%

        \[\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 \cdot \left(\ell \cdot \ell\right)}{\color{blue}{Om \cdot Om}} \cdot \left(U - U*\right)\right)} \]
    4. Simplified59.1%

      \[\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 \left(\ell \cdot \ell\right)}{Om \cdot Om}} \cdot \left(U - U*\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification63.7%

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

Alternative 8: 57.6% accurate, 1.7× speedup?

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

\mathbf{elif}\;Om \leq 2.05 \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{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{n}{\frac{t_1}{\ell \cdot -2 - \frac{n}{t_1}}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -2.7e118

    1. Initial program 39.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*46.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-neg46.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-46.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-neg46.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*65.3%

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

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

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

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

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

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

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

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

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

    if -2.7e118 < Om < 2.04999999999999993e89

    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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 59.1% accurate, 1.7× speedup?

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

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

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


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

    1. Initial program 56.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. Simplified59.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 60.5%

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

    if 1.00000000000000006e63 < l < 3.1000000000000002e146

    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. Simplified81.8%

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

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

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

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

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

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

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

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

    if 3.1000000000000002e146 < l

    1. Initial program 9.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. Simplified50.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 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. Taylor expanded in U* around inf 56.3%

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

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

Alternative 10: 60.2% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 3.7 \cdot 10^{+61}:\\ \;\;\;\;\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(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n \cdot \ell}{\frac{Om}{U* - U}}}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 3.7e+61)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (pow
    (*
     2.0
     (+
      (* n (* U t))
      (/ (+ (* l -2.0) (/ (* n l) (/ Om (- U* U)))) (/ Om (* n (* U 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 <= 3.7e+61) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = pow((2.0 * ((n * (U * t)) + (((l * -2.0) + ((n * l) / (Om / (U_42_ - U)))) / (Om / (n * (U * 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 <= 3.7d+61) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else
        tmp = (2.0d0 * ((n * (u * t)) + (((l * (-2.0d0)) + ((n * l) / (om / (u_42 - u)))) / (om / (n * (u * 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 <= 3.7e+61) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = Math.pow((2.0 * ((n * (U * t)) + (((l * -2.0) + ((n * l) / (Om / (U_42_ - U)))) / (Om / (n * (U * l)))))), 0.5);
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 3.7e+61:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	else:
		tmp = math.pow((2.0 * ((n * (U * t)) + (((l * -2.0) + ((n * l) / (Om / (U_42_ - U)))) / (Om / (n * (U * l)))))), 0.5)
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 3.7e+61)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	else
		tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(l * -2.0) + Float64(Float64(n * l) / Float64(Om / Float64(U_42_ - U)))) / Float64(Om / Float64(n * Float64(U * 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 <= 3.7e+61)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	else
		tmp = (2.0 * ((n * (U * t)) + (((l * -2.0) + ((n * l) / (Om / (U_42_ - U)))) / (Om / (n * (U * 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, 3.7e+61], 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[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * l), $MachinePrecision] / N[(Om / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 3.7 \cdot 10^{+61}:\\
\;\;\;\;\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(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n \cdot \ell}{\frac{Om}{U* - U}}}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\


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

    1. Initial program 56.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. Simplified59.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 60.5%

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

    if 3.70000000000000003e61 < l

    1. Initial program 25.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. Simplified60.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 63.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. Taylor expanded in U* around 0 53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 57.9% accurate, 1.8× speedup?

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

\mathbf{else}:\\
\;\;\;\;\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)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -3.8999999999999999e117 or 3.00000000000000013e89 < Om

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

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

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

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

        \[\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*63.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-neg63.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*61.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. Simplified61.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)}} \]
    4. Taylor expanded in Om around inf 47.6%

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

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

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

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

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

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

    if -3.8999999999999999e117 < Om < 3.00000000000000013e89

    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. Simplified62.4%

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

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

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

Alternative 12: 54.8% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 55.3%

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

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

    if 4.9999999999999998e-179 < l < 5.4999999999999998e128

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

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

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

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

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

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

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

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

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

    if 5.4999999999999998e128 < l

    1. Initial program 13.9%

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

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

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

Alternative 13: 54.9% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+128}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}\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 3 regimes
  2. if l < 9.50000000000000037e-179

    1. Initial program 55.3%

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

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

    if 9.50000000000000037e-179 < l < 3.19999999999999986e128

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

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

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

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

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

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

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

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

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

    if 3.19999999999999986e128 < l

    1. Initial program 13.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-179}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{elif}\;\ell \leq 3.2 \cdot 10^{+128}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}\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 14: 51.6% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -5.59999999999999997e35 or 2.4e12 < U*

    1. Initial program 52.7%

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

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

      \[\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)}} \]
    4. Taylor expanded in n around inf 52.3%

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

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

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

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

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

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

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

    if -5.59999999999999997e35 < U* < 2.4e12

    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 46.9% accurate, 1.8× speedup?

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

\mathbf{elif}\;t \leq 5.8 \cdot 10^{-247}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\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 3 regimes
  2. if t < -4.7e-213

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7e-213 < t < 5.8e-247

    1. Initial program 43.9%

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

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

        \[\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. associate-*r*48.9%

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

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

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

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

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

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

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

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

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

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

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

    if 5.8e-247 < t

    1. Initial program 53.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*54.2%

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

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

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

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

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

        \[\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.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. Simplified55.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 44.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. unpow244.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/49.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. Simplified49.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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification50.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.7 \cdot 10^{-213}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot \ell}{\frac{Om}{\ell}}\right)\right)}\\ \mathbf{elif}\;t \leq 5.8 \cdot 10^{-247}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\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 16: 45.1% accurate, 1.8× speedup?

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

\mathbf{elif}\;t \leq 8 \cdot 10^{-79}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(2 - \frac{n \cdot U*}{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 3 regimes
  2. if t < -5.6e-213

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6e-213 < t < 8e-79

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

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

      \[\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*43.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. associate-*r*43.3%

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

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

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

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

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

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

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

    if 8e-79 < t

    1. Initial program 58.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Step-by-step derivation
      1. associate-*l*59.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-neg59.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-59.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-neg59.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*64.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-neg64.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*63.1%

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

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

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

        \[\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/55.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. Simplified55.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 3 regimes into one program.
  4. Final simplification51.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.6 \cdot 10^{-213}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot \ell}{\frac{Om}{\ell}}\right)\right)}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-79}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{Om}{U \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(2 - \frac{n \cdot U*}{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 17: 44.0% accurate, 1.9× speedup?

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

\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+100}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 55.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. Simplified60.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 43.7%

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

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

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

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

    if 1.6e-81 < l < 2.4999999999999999e100

    1. Initial program 58.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. Simplified60.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 20.3%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    6. Taylor expanded in n around 0 20.3%

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

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

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

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

    if 2.4999999999999999e100 < l

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 39.3% accurate, 2.0× speedup?

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

\mathbf{elif}\;\ell \leq 9.2 \cdot 10^{+98}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 55.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. Simplified60.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 43.7%

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

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

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

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

    if 2.04999999999999992e-81 < l < 9.20000000000000053e98

    1. Initial program 58.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. Simplified60.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 20.3%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    6. Taylor expanded in n around 0 20.3%

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

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

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

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

    if 9.20000000000000053e98 < l

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 46.9% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \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} \]
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 (/ 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 * (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 * (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 * (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 * (l / Om)))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (l * (l / Om)))))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(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|\\
\\
\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}
Derivation
  1. Initial program 49.9%

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

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

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

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

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

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

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

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

    \[\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)} \]
  7. Final simplification47.1%

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

Alternative 20: 46.9% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 35.9% accurate, 2.1× speedup?

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

\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.49999999999999968e67

    1. Initial program 57.5%

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    6. Taylor expanded in n around 0 23.9%

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

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

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

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

    if -5.49999999999999968e67 < U

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

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

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

Alternative 22: 36.8% accurate, 2.1× speedup?

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

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


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

    1. Initial program 57.5%

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    6. Taylor expanded in n around 0 23.9%

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

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

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

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

    if -5.0000000000000004e68 < U

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

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

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

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

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

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

Alternative 23: 35.6% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;U \leq -2.35 \cdot 10^{+67}:\\ \;\;\;\;\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 -2.35e+67)
   (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 <= -2.35e+67) {
		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 <= (-2.35d+67)) 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 <= -2.35e+67) {
		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 <= -2.35e+67:
		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 <= -2.35e+67)
		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 <= -2.35e+67)
		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, -2.35e+67], 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 -2.35 \cdot 10^{+67}:\\
\;\;\;\;\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 < -2.35000000000000009e67

    1. Initial program 57.5%

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    6. Step-by-step derivation
      1. unpow1/220.5%

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    7. Applied egg-rr37.1%

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

    if -2.35000000000000009e67 < U

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -2.35 \cdot 10^{+67}:\\ \;\;\;\;\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 24: 35.8% 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 49.9%

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

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

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

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

    \[\leadsto \color{blue}{{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
  6. Step-by-step derivation
    1. unpow1/234.6%

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

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

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

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

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

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

Reproduce

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