Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 62.8%
Time: 28.3s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 49.5% accurate, 1.0× speedup?

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

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

Alternative 1: 62.8% accurate, 0.2× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_3 \leq 4 \cdot 10^{-158}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, t_2 \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{elif}\;t_3 \leq 10^{+138}:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot {\left({\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2} \cdot \sqrt[3]{n}\right)}^{3}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\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 (* (* 2.0 n) U))
        (t_2 (* n (pow (/ l Om) 2.0)))
        (t_3 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) (* t_2 (- U* U)))))))
   (if (<= t_3 4e-158)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma 2.0 (/ (pow l 2.0) Om) (* t_2 (- U U*)))))))
     (if (<= t_3 1e+138)
       (sqrt
        (*
         t_1
         (-
          (- t (* 2.0 (* l (/ l Om))))
          (* (- U U*) (pow (* (pow (cbrt (/ l Om)) 2.0) (cbrt n)) 3.0)))))
       (*
        (sqrt
         (* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
        (* l (sqrt 2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * pow((l / Om), 2.0);
	double t_3 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + (t_2 * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 4e-158) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (pow(l, 2.0) / Om), (t_2 * (U - U_42_))))));
	} else if (t_3 <= 1e+138) {
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) - ((U - U_42_) * pow((pow(cbrt((l / Om)), 2.0) * cbrt(n)), 3.0)))));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * U)
	t_2 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_3 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(t_2 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 4e-158)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64((l ^ 2.0) / Om), Float64(t_2 * Float64(U - U_42_)))))));
	elseif (t_3 <= 1e+138)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) - Float64(Float64(U - U_42_) * (Float64((cbrt(Float64(l / Om)) ^ 2.0) * cbrt(n)) ^ 3.0)))));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 4e-158], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+138], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(U - U$42$), $MachinePrecision] * N[Power[N[(N[Power[N[Power[N[(l / Om), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[n, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_2 \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_3 \leq 4 \cdot 10^{-158}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, t_2 \cdot \left(U - U*\right)\right)\right)}\\

\mathbf{elif}\;t_3 \leq 10^{+138}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) - \left(U - U*\right) \cdot {\left({\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2} \cdot \sqrt[3]{n}\right)}^{3}\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\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*))))) < 4.00000000000000026e-158

    1. Initial program 14.4%

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. pow1/214.4%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000026e-158 < (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*))))) < 1e138

    1. Initial program 97.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/97.3%

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

      \[\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)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt97.2%

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

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

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

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

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

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

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

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

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

    if 1e138 < (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 16.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. Simplified27.4%

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

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

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

Alternative 2: 62.6% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_3 := t_2 \cdot \left(U* - U\right)\\ t_4 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3\right)}\\ \mathbf{if}\;t_4 \leq 4 \cdot 10^{-158}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, t_2 \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{elif}\;t_4 \leq 10^{+138}:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_3\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\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 (* (* 2.0 n) U))
        (t_2 (* n (pow (/ l Om) 2.0)))
        (t_3 (* t_2 (- U* U)))
        (t_4 (sqrt (* t_1 (+ (- t (* 2.0 (/ (* l l) Om))) t_3)))))
   (if (<= t_4 4e-158)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma 2.0 (/ (pow l 2.0) Om) (* t_2 (- U U*)))))))
     (if (<= t_4 1e+138)
       (sqrt (* t_1 (+ (- t (* 2.0 (* l (/ l Om)))) t_3)))
       (*
        (sqrt
         (* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.0 Om))))))
        (* l (sqrt 2.0)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * U;
	double t_2 = n * pow((l / Om), 2.0);
	double t_3 = t_2 * (U_42_ - U);
	double t_4 = sqrt((t_1 * ((t - (2.0 * ((l * l) / Om))) + t_3)));
	double tmp;
	if (t_4 <= 4e-158) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (pow(l, 2.0) / Om), (t_2 * (U - U_42_))))));
	} else if (t_4 <= 1e+138) {
		tmp = sqrt((t_1 * ((t - (2.0 * (l * (l / Om)))) + t_3)));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om)))))) * (l * sqrt(2.0));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * U)
	t_2 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_3 = Float64(t_2 * Float64(U_42_ - U))
	t_4 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_3)))
	tmp = 0.0
	if (t_4 <= 4e-158)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64((l ^ 2.0) / Om), Float64(t_2 * Float64(U - U_42_)))))));
	elseif (t_4 <= 1e+138)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_3)));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))))) * Float64(l * sqrt(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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 4e-158], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, 1e+138], N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_1 := \left(2 \cdot n\right) \cdot U\\
t_2 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_3 := t_2 \cdot \left(U* - U\right)\\
t_4 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_3\right)}\\
\mathbf{if}\;t_4 \leq 4 \cdot 10^{-158}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, t_2 \cdot \left(U - U*\right)\right)\right)}\\

\mathbf{elif}\;t_4 \leq 10^{+138}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_3\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\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*))))) < 4.00000000000000026e-158

    1. Initial program 14.4%

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

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

      \[\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)} \]
    4. Step-by-step derivation
      1. pow1/214.4%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000026e-158 < (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*))))) < 1e138

    1. Initial program 97.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/97.3%

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

      \[\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 1e138 < (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 16.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. Simplified27.4%

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

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

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

Alternative 3: 59.5% accurate, 0.3× speedup?

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

\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}:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}^{0.5}\\


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

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

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

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

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

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

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

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

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

    1. Initial program 68.7%

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

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

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

    if +inf.0 < (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. Simplified8.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.4% accurate, 0.4× speedup?

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

\mathbf{elif}\;t_4 \leq 10^{+276}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_3\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\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.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. Simplified44.3%

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

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

    1. Initial program 96.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/96.4%

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

      \[\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 1.0000000000000001e276 < (*.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 17.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. Simplified26.0%

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

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

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

Alternative 5: 62.0% accurate, 0.4× speedup?

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

\mathbf{elif}\;t_4 \leq 10^{+276}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_3\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\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.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. Simplified44.3%

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

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

    1. Initial program 96.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/96.4%

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

      \[\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 1.0000000000000001e276 < (*.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 17.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. Simplified26.0%

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

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

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

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

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

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

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

Alternative 6: 61.7% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 11.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. Simplified44.3%

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

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

    1. Initial program 68.4%

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

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

      \[\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. Step-by-step derivation
      1. associate-*l/3.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-rr3.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)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt3.2%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)\right)\right)}^{0.5} \cdot {\left(\frac{1}{{Om}^{2}}\right)}^{0.5}} \]
      4. pow1/229.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(\left(U \cdot U*\right) \cdot \color{blue}{{\left(\ell \cdot n\right)}^{2}}\right)} \cdot {\left({Om}^{-2}\right)}^{0.5} \]
      11. unpow1/236.0%

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

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

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

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

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

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

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

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

Alternative 7: 61.7% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 11.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. Simplified44.3%

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

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

    1. Initial program 68.4%

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

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

      \[\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. Step-by-step derivation
      1. associate-*l/3.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-rr3.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)} \]
    4. Step-by-step derivation
      1. add-cube-cbrt3.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.8% accurate, 1.0× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right)\right)}^{0.5} \]
      7. cancel-sign-sub-inv63.8%

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

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

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

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

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

    if -2.3e32 < U

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

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

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

Alternative 9: 51.1% accurate, 1.0× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -3.8000000000000001e-101 or 1.52e-34 < U

    1. Initial program 63.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. Simplified66.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right)\right)}^{0.5} \]
      7. cancel-sign-sub-inv67.9%

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

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

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

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

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

    if -3.8000000000000001e-101 < U < 1.52e-34

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 47.1% accurate, 1.0× speedup?

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

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


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

    1. Initial program 49.9%

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

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

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

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

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

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

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

    if -5.99999999999999967e33 < U

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(n \cdot U\right) \cdot \left(t - \frac{2}{\frac{Om}{{\ell}^{2}}}\right)\right) \cdot 2\right)}}^{0.5} \]
      3. unpow-prod-down50.0%

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

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

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

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

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

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

Alternative 11: 46.4% accurate, 1.1× speedup?

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 3.49999999999999981e-290 or 5.29999999999999973e-185 < n

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.49999999999999981e-290 < n < 5.29999999999999973e-185

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}} \]
      3. *-commutative75.1%

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

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification54.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq 3.5 \cdot 10^{-290} \lor \neg \left(n \leq 5.3 \cdot 10^{-185}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \end{array} \]

Alternative 12: 45.8% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.99999999999999996e34

    1. Initial program 41.7%

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \cdot \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      3. pow1/252.2%

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}}} \]
      4. pow-prod-down31.1%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right) \cdot \left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)\right)}^{0.5}}} \]
      5. pow231.1%

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

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

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

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

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

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right) \cdot \left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}}} \]
      3. rem-sqrt-square39.3%

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

        \[\leadsto \sqrt{\left|2 \cdot \color{blue}{\left(n \cdot \left(U \cdot t\right)\right)}\right|} \]
    7. Simplified49.3%

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

    if -6.99999999999999996e34 < t

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 46.4% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.15999999999999998e36

    1. Initial program 41.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \sqrt{\color{blue}{\left(t \cdot \left(n \cdot U\right)\right) \cdot \left(t \cdot \left(n \cdot U\right)\right)}}} \]
      2. rem-sqrt-square39.3%

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

        \[\leadsto \sqrt{2 \cdot \left|\color{blue}{\left(t \cdot n\right) \cdot U}\right|} \]
      4. *-commutative52.7%

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

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

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

    if -1.15999999999999998e36 < t

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 46.4% accurate, 1.9× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.17999999999999993e-107

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

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

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

    if 1.17999999999999993e-107 < l

    1. Initial program 47.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 36.7% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 5.2000000000000003e-213

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

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

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

    if 5.2000000000000003e-213 < n

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

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

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

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

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

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

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

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

Alternative 16: 36.7% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 6.5000000000000004e-214

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

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

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

    if 6.5000000000000004e-214 < n

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

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

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

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

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

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

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

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

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

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

Alternative 17: 35.2% accurate, 2.1× speedup?

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

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

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

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

Alternative 18: 34.9% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* 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(2.0 * Float64(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[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

Reproduce

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