Toniolo and Linder, Equation (13)

Percentage Accurate: 49.2% → 67.9%
Time: 22.3s
Alternatives: 15
Speedup: 1.9×

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 15 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.2% accurate, 1.0× speedup?

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

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

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

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

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

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

      \[\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. Step-by-step derivation
      1. associate-*l/9.9%

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

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

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

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.0000000000000002e151

    1. Initial program 97.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)} \]

    if 5.0000000000000002e151 < (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 21.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. Simplified27.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 56.3% accurate, 1.0× speedup?

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

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


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

    1. Initial program 49.9%

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

      \[\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. Step-by-step derivation
      1. associate-*l/50.4%

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

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

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

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

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

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

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

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

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

    if 3.89999999999999999e31 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 49.0% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+31}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot t_1\right)\right)\right)}^{0.5}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < 4.19999999999999996e-163

    1. Initial program 49.2%

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

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

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

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

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

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

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

    if 4.19999999999999996e-163 < l < 2.3600000000000001e-23

    1. Initial program 64.2%

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

      \[\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. Step-by-step derivation
      1. associate-*l/64.2%

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

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

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

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

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

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

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

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

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

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

    if 2.3600000000000001e-23 < l < 3.3999999999999998e31

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

      \[\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. Step-by-step derivation
      1. associate-*l/32.9%

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

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

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

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

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

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

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

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

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

    if 3.3999999999999998e31 < l < 2.20000000000000014e143

    1. Initial program 49.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. Simplified49.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 inf 43.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000014e143 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.2 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{elif}\;\ell \leq 2.36 \cdot 10^{-23}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \frac{n}{\frac{Om}{\ell \cdot \ell} \cdot \frac{Om}{U*}}\right)}\\ \mathbf{elif}\;\ell \leq 3.4 \cdot 10^{+31}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 2.2 \cdot 10^{+143}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(U \cdot \left(\frac{2}{Om} - \frac{n}{Om} \cdot \frac{U*}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(\sqrt{2} \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\right)\\ \end{array} \]

Alternative 4: 41.1% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 49.9%

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

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

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

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

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

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

    if 6.2000000000000001e28 < l < 8.79999999999999998e150

    1. Initial program 48.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. Simplified45.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 l around inf 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.79999999999999998e150 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 40.9% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 49.9%

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

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

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

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

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

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

    if 4.19999999999999978e28 < l < 1.04000000000000005e152

    1. Initial program 48.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. Simplified45.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 l around inf 40.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04000000000000005e152 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 43.2% accurate, 1.9× speedup?

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

    if 4.79999999999999982 < l

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

      \[\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. Step-by-step derivation
      1. associate-*l/41.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 42.9% accurate, 1.9× speedup?

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

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


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

    1. Initial program 49.9%

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

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

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

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

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

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

    if 1.3000000000000001e28 < l

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 52.2% accurate, 1.9× speedup?

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

    \[\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. Step-by-step derivation
    1. associate-*l/49.1%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 38.0% accurate, 2.0× speedup?

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

    if 4.79999999999999982 < l

    1. Initial program 37.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. Simplified40.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 l around inf 36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 38.2% accurate, 2.0× speedup?

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

    if 4.79999999999999982 < l

    1. Initial program 37.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. Simplified40.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 l around inf 36.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 38.2% accurate, 2.0× speedup?

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

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


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

    1. Initial program 49.9%

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

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

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

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

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

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

    if 4.19999999999999978e28 < l

    1. Initial program 39.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.7% accurate, 2.0× speedup?

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

    \[\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. Step-by-step derivation
    1. associate-*l/49.1%

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

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

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

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

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

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

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

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

Alternative 13: 36.8% accurate, 2.1× speedup?

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

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

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

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

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

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

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

Alternative 14: 35.3% accurate, 2.1× speedup?

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

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

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

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

Alternative 15: 35.3% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

Reproduce

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