Toniolo and Linder, Equation (13)

Percentage Accurate: 49.3% → 68.1%
Time: 23.4s
Alternatives: 20
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 49.3% accurate, 1.0× speedup?

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

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

Alternative 1: 68.1% accurate, 0.4× 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 0:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\left(\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}\right)\right)}^{0.5}\\ \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 \mathsf{fma}\left(U* - U, \frac{n}{Om}, -2\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 0.0)
     (pow
      (*
       2.0
       (+
        (* n (* U t))
        (/ (* (+ (* l -2.0) (* (/ n (/ Om l)) (- U* U))) (* n (* U l))) Om)))
      0.5)
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
       (*
        (sqrt 2.0)
        (* l (sqrt (/ n (/ Om (* U (fma (- U* U) (/ n Om) -2.0)))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (n * pow((l / Om), 2.0)) * (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 <= 0.0) {
		tmp = pow((2.0 * ((n * (U * t)) + ((((l * -2.0) + ((n / (Om / l)) * (U_42_ - U))) * (n * (U * l))) / Om))), 0.5);
	} 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 * fma((U_42_ - U), (n / Om), -2.0))))));
	}
	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 <= 0.0)
		tmp = Float64(2.0 * Float64(Float64(n * Float64(U * t)) + Float64(Float64(Float64(Float64(l * -2.0) + Float64(Float64(n / Float64(Om / l)) * Float64(U_42_ - U))) * Float64(n * Float64(U * l))) / Om))) ^ 0.5;
	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 * fma(Float64(U_42_ - U), Float64(n / Om), -2.0)))))));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * 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, 0.0], N[Power[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n / N[(Om / l), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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[(N[(U$42$ - U), $MachinePrecision] * N[(n / Om), $MachinePrecision] + -2.0), $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 0:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\left(\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)\right) \cdot \left(n \cdot \left(U \cdot \ell\right)\right)}{Om}\right)\right)}^{0.5}\\

\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 \mathsf{fma}\left(U* - U, \frac{n}{Om}, -2\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*)))) < 0.0

    1. Initial program 11.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. Simplified40.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 42.1%

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

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{\color{blue}{\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} \]
      6. *-commutative37.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.3%

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\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 0 40.9%

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

        \[\leadsto \sqrt{2} \cdot \color{blue}{\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*57.6%

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

        \[\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. associate-*l/57.5%

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

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

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

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

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

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

Alternative 2: 66.2% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \ell \cdot \frac{\ell}{Om}\\ t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ t_3 := \left(2 \cdot n\right) \cdot U\\ t_4 := \sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)}\\ \mathbf{if}\;t_4 \leq 0:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot t_1\right)\right)}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot t_1\right) + t_2\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(\ell \cdot \frac{n}{Om}\right) \cdot \left(\left(U \cdot \ell\right) \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{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
 (let* ((t_1 (* l (/ l Om)))
        (t_2 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
        (t_3 (* (* 2.0 n) U))
        (t_4 (sqrt (* t_3 (+ (- t (* 2.0 (/ (* l l) Om))) t_2)))))
   (if (<= t_4 0.0)
     (sqrt (* (* 2.0 n) (* U (+ t (* -2.0 t_1)))))
     (if (<= t_4 INFINITY)
       (sqrt (* t_3 (+ (- t (* 2.0 t_1)) t_2)))
       (sqrt
        (*
         -2.0
         (* (* l (/ n Om)) (* (* U l) (+ 2.0 (* (- U U*) (/ n Om)))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = l * (l / Om);
	double t_2 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
	double t_3 = (2.0 * n) * U;
	double t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
	double tmp;
	if (t_4 <= 0.0) {
		tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
	} else {
		tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
	}
	return tmp;
}
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 * (l / Om);
	double t_2 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
	double t_3 = (2.0 * n) * U;
	double t_4 = Math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
	double tmp;
	if (t_4 <= 0.0) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
	} else if (t_4 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
	} else {
		tmp = Math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = l * (l / Om)
	t_2 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U)
	t_3 = (2.0 * n) * U
	t_4 = math.sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)))
	tmp = 0
	if t_4 <= 0.0:
		tmp = math.sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))))
	elif t_4 <= math.inf:
		tmp = math.sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)))
	else:
		tmp = math.sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l * Float64(l / Om))
	t_2 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))
	t_3 = Float64(Float64(2.0 * n) * U)
	t_4 = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_2)))
	tmp = 0.0
	if (t_4 <= 0.0)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(-2.0 * t_1)))));
	elseif (t_4 <= Inf)
		tmp = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * t_1)) + t_2)));
	else
		tmp = sqrt(Float64(-2.0 * Float64(Float64(l * Float64(n / Om)) * Float64(Float64(U * l) * Float64(2.0 + Float64(Float64(U - U_42_) * Float64(n / Om)))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = l * (l / Om);
	t_2 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U);
	t_3 = (2.0 * n) * U;
	t_4 = sqrt((t_3 * ((t - (2.0 * ((l * l) / Om))) + t_2)));
	tmp = 0.0;
	if (t_4 <= 0.0)
		tmp = sqrt(((2.0 * n) * (U * (t + (-2.0 * t_1)))));
	elseif (t_4 <= Inf)
		tmp = sqrt((t_3 * ((t - (2.0 * t_1)) + t_2)));
	else
		tmp = sqrt((-2.0 * ((l * (n / Om)) * ((U * l) * (2.0 + ((U - U_42_) * (n / Om)))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(l * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(U * l), $MachinePrecision] * N[(2.0 + N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \ell \cdot \frac{\ell}{Om}\\
t_2 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := \sqrt{t_3 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2\right)}\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot t_1\right)\right)}\\

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

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


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

    1. Initial program 12.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. Simplified39.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 n around 0 39.8%

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

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

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

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

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

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

    1. Initial program 68.3%

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

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

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

      \[\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 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

    1. Initial program 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. Simplified33.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 49.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*53.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. unpow253.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 63.4% accurate, 1.0× speedup?

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

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


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

    1. Initial program 54.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. 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 U around 0 59.8%

      \[\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. Step-by-step derivation
      1. *-commutative59.8%

        \[\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)}} \]
      2. fma-def59.8%

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

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

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

    if 1.2e115 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.7% accurate, 1.0× speedup?

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


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

    1. Initial program 54.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. 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 U around 0 59.8%

      \[\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 5.5000000000000001e114 < l

    1. Initial program 30.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. Simplified54.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 0 47.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\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 0 71.5%

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

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

Alternative 5: 62.7% accurate, 1.0× speedup?

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

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


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

    1. Initial program 54.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. 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 U around 0 59.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 62.5% accurate, 1.0× speedup?

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


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

    1. Initial program 54.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. 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 U around 0 59.8%

      \[\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 4.5000000000000001e114 < l

    1. Initial program 30.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. Simplified54.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 0 47.0%

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\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 0 71.5%

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

        \[\leadsto \sqrt{2} \cdot \color{blue}{\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*78.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. *-commutative78.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. associate-*l/78.3%

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

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

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

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

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

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

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

Alternative 7: 56.6% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq 1.8 \cdot 10^{-186}:\\ \;\;\;\;\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{\left(U* - U\right) \cdot \left(n \cdot \ell\right)}{Om}}{\frac{Om}{U \cdot \left(n \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 (<= Om 1.8e-186)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (pow
    (*
     2.0
     (+
      (* n (* U t))
      (/ (+ (* l -2.0) (/ (* (- U* U) (* n l)) Om)) (/ Om (* U (* n l))))))
    0.5)))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= 1.8e-186) {
		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) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * 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 (om <= 1.8d-186) 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)) + (((u_42 - u) * (n * l)) / om)) / (om / (u * (n * 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 (Om <= 1.8e-186) {
		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) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))), 0.5);
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if Om <= 1.8e-186:
		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) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * l)))))), 0.5)
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (Om <= 1.8e-186)
		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(Float64(U_42_ - U) * Float64(n * l)) / Om)) / Float64(Om / Float64(U * Float64(n * 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 (Om <= 1.8e-186)
		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) + (((U_42_ - U) * (n * l)) / Om)) / (Om / (U * (n * 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[Om, 1.8e-186], 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[(U$42$ - U), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq 1.8 \cdot 10^{-186}:\\
\;\;\;\;\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{\left(U* - U\right) \cdot \left(n \cdot \ell\right)}{Om}}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 1.7999999999999999e-186

    1. Initial program 51.4%

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

    1. Initial program 49.2%

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

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

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{\color{blue}{\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} \]
      6. *-commutative72.0%

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

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

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

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

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

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

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

Alternative 8: 59.8% accurate, 1.8× speedup?

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

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


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

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 53.6% accurate, 1.8× speedup?

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

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


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

    1. Initial program 54.2%

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

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

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

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

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

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

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

    if 2.64999999999999989e79 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 47.2% accurate, 1.9× speedup?

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

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


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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      3. associate-*r/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)} \]
    5. Simplified55.9%

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

    if 4.0000000000000002e242 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 47.1% accurate, 1.9× speedup?

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

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


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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      3. associate-*r/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)} \]
    5. Simplified55.9%

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

    if 4.0000000000000002e242 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 47.2% accurate, 1.9× speedup?

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

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


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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      3. associate-*r/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)} \]
    5. Simplified55.9%

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

    if 4.0000000000000002e242 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 47.1% accurate, 1.9× speedup?

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

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


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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      3. associate-*r/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)} \]
    5. Simplified55.9%

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

    if 4.0000000000000002e242 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 46.9% accurate, 1.9× speedup?

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

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


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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + -2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      3. associate-*r/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)} \]
    5. Simplified55.9%

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

    if 4.0000000000000002e242 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 44.2% accurate, 1.9× speedup?

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

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


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

    1. Initial program 53.4%

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

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

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

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

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

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

    if 1.1e32 < l

    1. Initial program 40.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. Simplified58.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 l around -inf 50.4%

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

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

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

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

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

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

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

      \[\leadsto \sqrt{-2 \cdot \frac{n}{\color{blue}{0.5 \cdot \frac{Om}{{\ell}^{2} \cdot U}}}} \]
    7. Step-by-step derivation
      1. associate-*r/38.9%

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

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

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

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

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

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

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

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

Alternative 16: 39.2% accurate, 2.0× speedup?

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

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

    if 8.49999999999999938e41 < l

    1. Initial program 40.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 l around -inf 51.2%

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

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

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

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

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

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

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

      \[\leadsto \sqrt{-2 \cdot \frac{n}{\color{blue}{0.5 \cdot \frac{Om}{{\ell}^{2} \cdot U}}}} \]
    7. Step-by-step derivation
      1. associate-*r/39.5%

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

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

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

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

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

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

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

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

Alternative 17: 39.5% accurate, 2.0× speedup?

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

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


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

    1. Initial program 53.1%

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

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

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

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

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

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

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

    if 6.6999999999999996e41 < l

    1. Initial program 40.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 l around -inf 51.2%

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

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

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

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

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

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

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

      \[\leadsto \sqrt{-2 \cdot \frac{n}{\color{blue}{0.5 \cdot \frac{Om}{{\ell}^{2} \cdot U}}}} \]
    7. Step-by-step derivation
      1. associate-*r/39.5%

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

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

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

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

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

Alternative 18: 47.3% 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 50.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. Simplified58.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 n around 0 48.2%

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

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

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

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

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

    \[\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 19: 36.6% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

Alternative 20: 35.1% accurate, 2.1× speedup?

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

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

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

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

Reproduce

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