Toniolo and Linder, Equation (13)

Percentage Accurate: 49.8% → 60.3%
Time: 24.0s
Alternatives: 18
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 49.8% 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: 60.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(U* - U\right) \cdot \frac{\ell}{Om}\\ t_2 := n \cdot \left(U \cdot t\right)\\ t_3 := \sqrt{n \cdot 2}\\ \mathbf{if}\;n \leq -7 \cdot 10^{-139}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot t_1\right)\right)}\\ \mathbf{elif}\;n \leq 7.5 \cdot 10^{-288}:\\ \;\;\;\;\sqrt{2 \cdot t_2 + 2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)\right)}{Om}}\\ \mathbf{elif}\;n \leq 1.4 \cdot 10^{-209}:\\ \;\;\;\;t_3 \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 9 \cdot 10^{+137}:\\ \;\;\;\;{\left(2 \cdot \left(t_2 + \frac{\frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;t_3 \cdot \sqrt[3]{{\left(U \cdot \mathsf{fma}\left(\mathsf{fma}\left(n, t_1, \ell \cdot -2\right), \frac{\ell}{Om}, t\right)\right)}^{1.5}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (- U* U) (/ l Om))) (t_2 (* n (* U t))) (t_3 (sqrt (* n 2.0))))
   (if (<= n -7e-139)
     (sqrt (* (* (* n 2.0) U) (+ t (* (/ l Om) (fma l -2.0 (* n t_1))))))
     (if (<= n 7.5e-288)
       (sqrt
        (+
         (* 2.0 t_2)
         (*
          2.0
          (/ (* n (* l (* U (+ (/ (* n (* l U*)) Om) (* l -2.0))))) Om))))
       (if (<= n 1.4e-209)
         (*
          t_3
          (sqrt
           (* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) (* n (- U* U)))))))))
         (if (<= n 9e+137)
           (pow
            (*
             2.0
             (+
              t_2
              (/
               (+ (/ n (/ Om (* l (- U* U)))) (* l -2.0))
               (/ Om (* n (* U l))))))
            0.5)
           (*
            t_3
            (cbrt
             (pow (* U (fma (fma n t_1 (* l -2.0)) (/ l Om) t)) 1.5)))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (U_42_ - U) * (l / Om);
	double t_2 = n * (U * t);
	double t_3 = sqrt((n * 2.0));
	double tmp;
	if (n <= -7e-139) {
		tmp = sqrt((((n * 2.0) * U) * (t + ((l / Om) * fma(l, -2.0, (n * t_1))))));
	} else if (n <= 7.5e-288) {
		tmp = sqrt(((2.0 * t_2) + (2.0 * ((n * (l * (U * (((n * (l * U_42_)) / Om) + (l * -2.0))))) / Om))));
	} else if (n <= 1.4e-209) {
		tmp = t_3 * sqrt((U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * (n * (U_42_ - U))))))));
	} else if (n <= 9e+137) {
		tmp = pow((2.0 * (t_2 + (((n / (Om / (l * (U_42_ - U)))) + (l * -2.0)) / (Om / (n * (U * l)))))), 0.5);
	} else {
		tmp = t_3 * cbrt(pow((U * fma(fma(n, t_1, (l * -2.0)), (l / Om), t)), 1.5));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(U_42_ - U) * Float64(l / Om))
	t_2 = Float64(n * Float64(U * t))
	t_3 = sqrt(Float64(n * 2.0))
	tmp = 0.0
	if (n <= -7e-139)
		tmp = sqrt(Float64(Float64(Float64(n * 2.0) * U) * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(n * t_1))))));
	elseif (n <= 7.5e-288)
		tmp = sqrt(Float64(Float64(2.0 * t_2) + Float64(2.0 * Float64(Float64(n * Float64(l * Float64(U * Float64(Float64(Float64(n * Float64(l * U_42_)) / Om) + Float64(l * -2.0))))) / Om))));
	elseif (n <= 1.4e-209)
		tmp = Float64(t_3 * sqrt(Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * Float64(n * Float64(U_42_ - U)))))))));
	elseif (n <= 9e+137)
		tmp = Float64(2.0 * Float64(t_2 + Float64(Float64(Float64(n / Float64(Om / Float64(l * Float64(U_42_ - U)))) + Float64(l * -2.0)) / Float64(Om / Float64(n * Float64(U * l)))))) ^ 0.5;
	else
		tmp = Float64(t_3 * cbrt((Float64(U * fma(fma(n, t_1, Float64(l * -2.0)), Float64(l / Om), t)) ^ 1.5)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(U$42$ - U), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -7e-139], N[Sqrt[N[(N[(N[(n * 2.0), $MachinePrecision] * U), $MachinePrecision] * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 7.5e-288], N[Sqrt[N[(N[(2.0 * t$95$2), $MachinePrecision] + N[(2.0 * N[(N[(n * N[(l * N[(U * N[(N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 1.4e-209], N[(t$95$3 * N[Sqrt[N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l / Om), $MachinePrecision] * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 9e+137], N[Power[N[(2.0 * N[(t$95$2 + N[(N[(N[(n / N[(Om / N[(l * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(t$95$3 * N[Power[N[Power[N[(U * N[(N[(n * t$95$1 + N[(l * -2.0), $MachinePrecision]), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], 1.5], $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(U* - U\right) \cdot \frac{\ell}{Om}\\
t_2 := n \cdot \left(U \cdot t\right)\\
t_3 := \sqrt{n \cdot 2}\\
\mathbf{if}\;n \leq -7 \cdot 10^{-139}:\\
\;\;\;\;\sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot t_1\right)\right)}\\

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

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

\mathbf{elif}\;n \leq 9 \cdot 10^{+137}:\\
\;\;\;\;{\left(2 \cdot \left(t_2 + \frac{\frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;t_3 \cdot \sqrt[3]{{\left(U \cdot \mathsf{fma}\left(\mathsf{fma}\left(n, t_1, \ell \cdot -2\right), \frac{\ell}{Om}, t\right)\right)}^{1.5}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if n < -7.00000000000000002e-139

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000002e-139 < n < 7.4999999999999998e-288

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

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

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

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

    if 7.4999999999999998e-288 < n < 1.40000000000000006e-209

    1. Initial program 22.8%

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

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

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

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

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

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

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

    if 1.40000000000000006e-209 < n < 9.0000000000000003e137

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

    if 9.0000000000000003e137 < n

    1. Initial program 43.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. Simplified51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -7 \cdot 10^{-139}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot 2\right) \cdot U\right) \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot \left(\left(U* - U\right) \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{elif}\;n \leq 7.5 \cdot 10^{-288}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(\ell \cdot U*\right)}{Om} + \ell \cdot -2\right)\right)\right)}{Om}}\\ \mathbf{elif}\;n \leq 1.4 \cdot 10^{-209}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 9 \cdot 10^{+137}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\frac{n}{\frac{Om}{\ell \cdot \left(U* - U\right)}} + \ell \cdot -2}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt[3]{{\left(U \cdot \mathsf{fma}\left(\mathsf{fma}\left(n, \left(U* - U\right) \cdot \frac{\ell}{Om}, \ell \cdot -2\right), \frac{\ell}{Om}, t\right)\right)}^{1.5}}\\ \end{array} \]

Alternative 2: 65.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot 2\right) \cdot U\\
t_2 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(U* - U\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)}\\
\mathbf{if}\;t_2 \leq 10^{-156}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot \left(\left(U* - U\right) \cdot \frac{\ell}{Om}\right)\right)\right)}\\

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

    1. Initial program 12.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. Simplified42.0%

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

    if 1.00000000000000004e-156 < (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 66.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. Simplified61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot 2\right) \cdot U\\
t_2 := \sqrt{t_1 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(U* - U\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot \left(\left(U* - U\right) \cdot \frac{\ell}{Om}\right)\right)\right)}\\

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

    1. Initial program 10.3%

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

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

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

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

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

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

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

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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 48.5% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\
\mathbf{if}\;\ell \leq -1.7 \cdot 10^{+187}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -1.7e187 or 5.50000000000000021e97 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e187 < l < -4.09999999999999982e142

    1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.09999999999999982e142 < l < -3.6e-71

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.6e-71 < l < 5.50000000000000021e97

    1. Initial program 59.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+187}:\\ \;\;\;\;\sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq -4.1 \cdot 10^{+142}:\\ \;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq -3.6 \cdot 10^{-71}:\\ \;\;\;\;{\left(-2 \cdot \frac{n \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(2 + \left(U - U*\right) \cdot \frac{n}{Om}\right)\right)\right)\right)}{Om}\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 5.5 \cdot 10^{+97}:\\ \;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\ \end{array} \]

Alternative 5: 56.6% accurate, 1.8× speedup?

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

\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n}{\frac{\frac{Om}{\ell}}{U*}}}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 48.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\
\mathbf{if}\;\ell \leq -1.7 \cdot 10^{+187}:\\
\;\;\;\;t_1\\

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -1.7e187 or 2.7999999999999998e108 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.7e187 < l < -3.5e141

    1. Initial program 29.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e141 < l < -2.20000000000000002e-72

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

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

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

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

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

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

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

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

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

    if -2.20000000000000002e-72 < l < 2.7999999999999998e108

    1. Initial program 59.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -1.7 \cdot 10^{+187}:\\ \;\;\;\;\sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq -3.5 \cdot 10^{+141}:\\ \;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq -2.2 \cdot 10^{-72}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(U \cdot \left(2 - \frac{n \cdot U*}{Om}\right)\right)\right)}{Om}}\\ \mathbf{elif}\;\ell \leq 2.8 \cdot 10^{+108}:\\ \;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(-2 \cdot \left(\ell \cdot \left(\ell \cdot \frac{n}{Om}\right)\right)\right) \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)}\\ \end{array} \]

Alternative 7: 57.3% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -5 \cdot 10^{+72}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\

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

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


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

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.99999999999999992e72 < Om < 4.0999999999999999e86

    1. Initial program 45.8%

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

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

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

    if 4.0999999999999999e86 < Om

    1. Initial program 48.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*51.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 48.8% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -3.5 \cdot 10^{-71} \lor \neg \left(\ell \leq 2.15 \cdot 10^{+102}\right):\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(\ell \cdot \left(n \cdot \ell\right)\right) \cdot \left(U \cdot \left(2 - \frac{n}{\frac{Om}{U*}}\right)\right)}{Om}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.4999999999999999e-71 or 2.15e102 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.4999999999999999e-71 < l < 2.15e102

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

Alternative 9: 47.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.9 \cdot 10^{+159}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\frac{n}{\frac{Om}{\ell \cdot \ell}} \cdot \left(U \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.89999999999999983e159 < U*

    1. Initial program 46.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*50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 47.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.25 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(-n\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \frac{n}{\frac{Om}{U \cdot U*}}\right)}{Om}}\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e162 < U*

    1. Initial program 46.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*50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 47.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.25 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{\left(-n\right) \cdot \frac{n}{\frac{Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)}}}{Om}}\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2499999999999999e162 < U*

    1. Initial program 46.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*50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -1.25 \cdot 10^{+162}:\\
\;\;\;\;\sqrt{\left(n \cdot 2\right) \cdot \frac{n}{\frac{Om \cdot Om}{\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)}}}\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

    if -1.2499999999999999e162 < U*

    1. Initial program 46.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*50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 44.2% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt (* (* n 2.0) (* U (+ t (/ (* -2.0 (* l l)) Om))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt(((n * 2.0) * (U * (t + ((-2.0 * (l * l)) / Om)))));
}
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(((n * 2.0d0) * (u * (t + (((-2.0d0) * (l * l)) / om)))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt(((n * 2.0) * (U * (t + ((-2.0 * (l * l)) / Om)))));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((n * 2.0) * (U * (t + ((-2.0 * (l * l)) / Om)))))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(n * 2.0) * Float64(U * Float64(t + Float64(Float64(-2.0 * Float64(l * l)) / Om)))))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((n * 2.0) * (U * (t + ((-2.0 * (l * l)) / Om)))));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(n * 2.0), $MachinePrecision] * N[(U * N[(t + N[(N[(-2.0 * N[(l * l), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t + \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

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

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

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

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

Alternative 14: 47.5% accurate, 2.0× speedup?

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

\\
\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 47.5% accurate, 2.0× speedup?

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

\\
\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(t - \frac{2 \cdot \ell}{\frac{Om}{\ell}}\right)\right)}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 36.5% accurate, 2.1× speedup?

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

\\
{\left(2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

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

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

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

Alternative 17: 35.6% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (U * (n * t))));
}
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
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))));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * t))))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * t))));
end
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}

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

    \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(t \cdot U\right)}} \]
  4. Taylor expanded in n around 0 35.9%

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

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

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

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

Alternative 18: 35.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot t\right)} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* n 2.0) (* U t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt(((n * 2.0) * (U * t)));
}
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(((n * 2.0d0) * (u * t)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt(((n * 2.0) * (U * t)));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((n * 2.0) * (U * t)))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(n * 2.0) * Float64(U * t)))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((n * 2.0) * (U * t)));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(n * 2.0), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot t\right)}
\end{array}
Derivation
  1. Initial program 45.8%

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

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

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

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

Reproduce

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