Toniolo and Linder, Equation (13)

Percentage Accurate: 49.7% → 65.3%
Time: 51.0s
Alternatives: 21
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 21 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.7% 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: 65.3% accurate, 0.2× speedup?

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

\mathbf{elif}\;t_3 \leq 2 \cdot 10^{-322}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t_2}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;{\left(\sqrt{\sqrt{t_4 \cdot t_2}}\right)}^{2}\\

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


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

    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. Simplified20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e-114 < (*.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.97626e-322

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(\left(t - 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)}^{0.5} \]
      7. associate-*r*10.4%

        \[\leadsto {\left(\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \left(\left(t - 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)}^{0.5} \]
      8. associate-*l*39.7%

        \[\leadsto {\color{blue}{\left(\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)\right)}}^{0.5} \]
    4. Applied egg-rr39.8%

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

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

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

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

    if 1.97626e-322 < (*.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 73.5%

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 64.6% accurate, 0.2× speedup?

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

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

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

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


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

    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. Simplified20.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e-114 < (*.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.97626e-322

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(\left(t - 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)}^{0.5} \]
      7. associate-*r*10.4%

        \[\leadsto {\left(\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \left(\left(t - 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)}^{0.5} \]
      8. associate-*l*39.7%

        \[\leadsto {\color{blue}{\left(\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)\right)}}^{0.5} \]
    4. Applied egg-rr39.8%

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

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

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

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

    if 1.97626e-322 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.0000000000000002e302

    1. Initial program 95.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. clear-num95.7%

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

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

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

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

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

    if 2.0000000000000002e302 < (*.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 29.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. Simplified31.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq -1 \cdot 10^{-114}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \ell \cdot \left(\ell \cdot \left(\frac{2}{Om} + \frac{U - U*}{Om} \cdot \frac{n}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 2 \cdot 10^{-322}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 2 \cdot 10^{+302}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + 2 \cdot \frac{-1}{\frac{Om}{\ell \cdot \ell}}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\left(\log \left(\left(n \cdot U\right) \cdot \left(\frac{-2}{Om} - \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right) - -2 \cdot \log \ell\right)}\right)}^{2}\\ \end{array} \]

Alternative 3: 60.9% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]
    7. Applied egg-rr34.9%

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

    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*))))) < 2.00000000000000003e151

    1. Initial program 95.1%

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

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

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

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

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

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

    if 2.00000000000000003e151 < (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 28.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. Simplified30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 60.9% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]
    7. Applied egg-rr34.9%

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

    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*))))) < 2.00000000000000003e151

    1. Initial program 95.1%

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

    if 2.00000000000000003e151 < (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 28.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. Simplified30.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 58.2% accurate, 0.5× speedup?

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

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


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

    1. Initial program 61.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.29999999999999998e-307 < n

    1. Initial program 50.6%

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(\left(t - 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)}^{0.5} \]
      7. associate-*r*50.6%

        \[\leadsto {\left(\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \left(\left(t - 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)}^{0.5} \]
      8. associate-*l*56.3%

        \[\leadsto {\color{blue}{\left(\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)\right)}}^{0.5} \]
    4. Applied egg-rr67.2%

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

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

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

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

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

Alternative 6: 58.2% accurate, 1.0× speedup?

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

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


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

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

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

    if 2.00000000000000006e-53 < l

    1. Initial program 43.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. Simplified46.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 55.8% accurate, 1.8× speedup?

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

\mathbf{elif}\;\ell \leq 1.2 \cdot 10^{-52}:\\
\;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\left(\ell \cdot \ell\right) \cdot \frac{n}{Om}\right) \cdot t_2\right)}\\

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


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

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

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

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

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

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

    if 2.4000000000000002e-165 < l < 1.2000000000000001e-52

    1. Initial program 67.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2000000000000001e-52 < l

    1. Initial program 43.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. Simplified46.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.8% accurate, 1.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -2e19 or 3.29999999999999999e102 < n

    1. Initial program 59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e19 < n < 3.29999999999999999e102

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 48.8% accurate, 1.8× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8000000000000001e-179 < Om < 2.20000000000000008e-202

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000008e-202 < Om

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 54.0% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -1.8e19

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e19 < n < 3.29999999999999999e102

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.29999999999999999e102 < n

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.7% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -2.99999999999999983e-199

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999983e-199 < Om < 6.00000000000000022e-202

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.00000000000000022e-202 < Om

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 48.7% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -2.4999999999999998e-199

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.4999999999999998e-199 < Om < 7.5000000000000003e-204

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

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

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

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

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

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

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

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

    if 7.5000000000000003e-204 < Om

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 48.4% accurate, 1.9× speedup?

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.00000000000000026e-68 < Om

    1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 43.4% accurate, 2.0× speedup?

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

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


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

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

    if 8.99999999999999958e47 < l

    1. Initial program 42.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 48.2% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 40.5% accurate, 2.0× speedup?

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

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


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

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

    if 1.95e48 < l

    1. Initial program 42.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 40.4% accurate, 2.0× speedup?

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

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


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

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

    if 6.90000000000000032e50 < l

    1. Initial program 42.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 44.1% accurate, 2.0× speedup?

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

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


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

    1. Initial program 60.1%

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

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

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

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

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

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

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

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

    if 5.9999999999999999e48 < l

    1. Initial program 42.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. Simplified47.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 37.9% accurate, 2.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -3.70000000000000019e191

    1. Initial program 60.6%

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

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

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

    if -3.70000000000000019e191 < Om

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

Alternative 20: 36.0% accurate, 2.1× speedup?

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

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

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

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

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

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

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

Alternative 21: 35.6% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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