Toniolo and Linder, Equation (13)

Percentage Accurate: 49.9% → 62.7%
Time: 29.1s
Alternatives: 12
Speedup: 0.5×

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

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

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

Alternative 1: 62.7% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right) + -2 \cdot \log \left(\frac{1}{l\_m}\right)\right)}\right)}^{2}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
   (if (<= t_2 0.0)
     (* (sqrt U) (sqrt (* n (* 2.0 t))))
     (if (<= t_2 INFINITY)
       (sqrt
        (*
         (- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))
         (* 2.0 (* n U))))
       (pow
        (exp
         (*
          0.25
          (+
           (log
            (*
             -2.0
             (*
              U
              (* n (+ (* 2.0 (/ 1.0 Om)) (/ (* n (- U U*)) (pow Om 2.0)))))))
           (* -2.0 (log (/ 1.0 l_m))))))
        2.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = pow(exp((0.25 * (log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / pow(Om, 2.0))))))) + (-2.0 * log((1.0 / l_m)))))), 2.0);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * Math.pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = Math.sqrt(U) * Math.sqrt((n * (2.0 * t)));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.pow(Math.exp((0.25 * (Math.log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / Math.pow(Om, 2.0))))))) + (-2.0 * Math.log((1.0 / l_m)))))), 2.0);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = n * math.pow((l_m / Om), 2.0)
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))
	tmp = 0
	if t_2 <= 0.0:
		tmp = math.sqrt(U) * math.sqrt((n * (2.0 * t)))
	elif t_2 <= math.inf:
		tmp = math.sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))))
	else:
		tmp = math.pow(math.exp((0.25 * (math.log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / math.pow(Om, 2.0))))))) + (-2.0 * math.log((1.0 / l_m)))))), 2.0)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0))
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(n * Float64(2.0 * t))));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = exp(Float64(0.25 * Float64(log(Float64(-2.0 * Float64(U * Float64(n * Float64(Float64(2.0 * Float64(1.0 / Om)) + Float64(Float64(n * Float64(U - U_42_)) / (Om ^ 2.0))))))) + Float64(-2.0 * log(Float64(1.0 / l_m)))))) ^ 2.0;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = n * ((l_m / Om) ^ 2.0);
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	elseif (t_2 <= Inf)
		tmp = sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	else
		tmp = exp((0.25 * (log((-2.0 * (U * (n * ((2.0 * (1.0 / Om)) + ((n * (U - U_42_)) / (Om ^ 2.0))))))) + (-2.0 * log((1.0 / l_m)))))) ^ 2.0;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Exp[N[(0.25 * N[(N[Log[N[(-2.0 * N[(U * N[(n * N[(N[(2.0 * N[(1.0 / Om), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-2.0 * N[Log[N[(1.0 / l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

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


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

    1. Initial program 10.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. Simplified29.2%

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

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

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow219.3%

        \[\leadsto \color{blue}{e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}} \]
      2. *-commutative19.3%

        \[\leadsto e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      3. exp-prod5.2%

        \[\leadsto \color{blue}{{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      4. exp-sum5.2%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      5. add-exp-log5.2%

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

        \[\leadsto {\left(\color{blue}{\left(\left(U \cdot n\right) \cdot -2\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      7. mul-1-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot e^{\color{blue}{-\log \left(\frac{-1}{t}\right)}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      8. exp-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \color{blue}{\frac{1}{e^{\log \left(\frac{-1}{t}\right)}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      9. add-exp-log5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\color{blue}{\frac{-1}{t}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      10. *-commutative5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \]
    7. Applied egg-rr13.2%

      \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25}} \]
    8. Step-by-step derivation
      1. pow-sqr13.3%

        \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{\left(2 \cdot 0.25\right)}} \]
      2. metadata-eval13.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{U} \cdot \color{blue}{\sqrt{n \cdot \left(-2 \cdot \left(-t\right)\right)}} \]
      2. distribute-rgt-neg-out47.7%

        \[\leadsto \sqrt{U} \cdot \sqrt{n \cdot \color{blue}{\left(--2 \cdot t\right)}} \]
      3. distribute-lft-neg-in47.7%

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

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

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

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

    1. Initial program 66.2%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 60.3% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(2 \cdot \frac{\left(U \cdot -2\right) \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}^{0.25}\right)}^{2}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
   (if (<= t_2 0.0)
     (* (sqrt U) (sqrt (* n (* 2.0 t))))
     (if (<= t_2 INFINITY)
       (sqrt
        (*
         (- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))
         (* 2.0 (* n U))))
       (pow
        (pow (* 2.0 (/ (* (* U -2.0) (* n (pow l_m 2.0))) Om)) 0.25)
        2.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = pow(pow((2.0 * (((U * -2.0) * (n * pow(l_m, 2.0))) / Om)), 0.25), 2.0);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * Math.pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = Math.sqrt(U) * Math.sqrt((n * (2.0 * t)));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.pow(Math.pow((2.0 * (((U * -2.0) * (n * Math.pow(l_m, 2.0))) / Om)), 0.25), 2.0);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = n * math.pow((l_m / Om), 2.0)
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)))
	tmp = 0
	if t_2 <= 0.0:
		tmp = math.sqrt(U) * math.sqrt((n * (2.0 * t)))
	elif t_2 <= math.inf:
		tmp = math.sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))))
	else:
		tmp = math.pow(math.pow((2.0 * (((U * -2.0) * (n * math.pow(l_m, 2.0))) / Om)), 0.25), 2.0)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0))
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(n * Float64(2.0 * t))));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = (Float64(2.0 * Float64(Float64(Float64(U * -2.0) * Float64(n * (l_m ^ 2.0))) / Om)) ^ 0.25) ^ 2.0;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = n * ((l_m / Om) ^ 2.0);
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	elseif (t_2 <= Inf)
		tmp = sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	else
		tmp = ((2.0 * (((U * -2.0) * (n * (l_m ^ 2.0))) / Om)) ^ 0.25) ^ 2.0;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[Power[N[(2.0 * N[(N[(N[(U * -2.0), $MachinePrecision] * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision], 2.0], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left({\left(2 \cdot \frac{\left(U \cdot -2\right) \cdot \left(n \cdot {l\_m}^{2}\right)}{Om}\right)}^{0.25}\right)}^{2}\\


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

    1. Initial program 10.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. Simplified29.2%

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

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

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow219.3%

        \[\leadsto \color{blue}{e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}} \]
      2. *-commutative19.3%

        \[\leadsto e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      3. exp-prod5.2%

        \[\leadsto \color{blue}{{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      4. exp-sum5.2%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      5. add-exp-log5.2%

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

        \[\leadsto {\left(\color{blue}{\left(\left(U \cdot n\right) \cdot -2\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      7. mul-1-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot e^{\color{blue}{-\log \left(\frac{-1}{t}\right)}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      8. exp-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \color{blue}{\frac{1}{e^{\log \left(\frac{-1}{t}\right)}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      9. add-exp-log5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\color{blue}{\frac{-1}{t}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      10. *-commutative5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \]
    7. Applied egg-rr13.2%

      \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25}} \]
    8. Step-by-step derivation
      1. pow-sqr13.3%

        \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{\left(2 \cdot 0.25\right)}} \]
      2. metadata-eval13.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{U} \cdot \color{blue}{\sqrt{n \cdot \left(-2 \cdot \left(-t\right)\right)}} \]
      2. distribute-rgt-neg-out47.7%

        \[\leadsto \sqrt{U} \cdot \sqrt{n \cdot \color{blue}{\left(--2 \cdot t\right)}} \]
      3. distribute-lft-neg-in47.7%

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

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

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

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

    1. Initial program 66.2%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 60.6% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1 \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left({\left(-4 \cdot \left(U \cdot \frac{n}{Om}\right)\right)}^{0.16666666666666666} \cdot \sqrt[3]{l\_m}\right)}^{3}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* n (pow (/ l_m Om) 2.0)))
        (t_2
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_1 (- U* U))))))
   (if (<= t_2 0.0)
     (* (sqrt U) (sqrt (* n (* 2.0 t))))
     (if (<= t_2 INFINITY)
       (sqrt
        (*
         (- t (+ (* t_1 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))
         (* 2.0 (* n U))))
       (pow
        (* (pow (* -4.0 (* U (/ n Om))) 0.16666666666666666) (cbrt l_m))
        3.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = pow((pow((-4.0 * (U * (n / Om))), 0.16666666666666666) * cbrt(l_m)), 3.0);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = n * Math.pow((l_m / Om), 2.0);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_1 * (U_42_ - U)));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = Math.sqrt(U) * Math.sqrt((n * (2.0 * t)));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t - ((t_1 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.pow((Math.pow((-4.0 * (U * (n / Om))), 0.16666666666666666) * Math.cbrt(l_m)), 3.0);
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(n * (Float64(l_m / Om) ^ 2.0))
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_1 * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(n * Float64(2.0 * t))));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(t - Float64(Float64(t_1 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = Float64((Float64(-4.0 * Float64(U * Float64(n / Om))) ^ 0.16666666666666666) * cbrt(l_m)) ^ 3.0;
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$1 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(t - N[(N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[Power[N[(-4.0 * N[(U * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.16666666666666666], $MachinePrecision] * N[Power[l$95$m, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(t - \left(t\_1 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left({\left(-4 \cdot \left(U \cdot \frac{n}{Om}\right)\right)}^{0.16666666666666666} \cdot \sqrt[3]{l\_m}\right)}^{3}\\


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

    1. Initial program 10.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. Simplified29.2%

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

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

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow219.3%

        \[\leadsto \color{blue}{e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}} \]
      2. *-commutative19.3%

        \[\leadsto e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      3. exp-prod5.2%

        \[\leadsto \color{blue}{{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      4. exp-sum5.2%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      5. add-exp-log5.2%

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

        \[\leadsto {\left(\color{blue}{\left(\left(U \cdot n\right) \cdot -2\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      7. mul-1-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot e^{\color{blue}{-\log \left(\frac{-1}{t}\right)}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      8. exp-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \color{blue}{\frac{1}{e^{\log \left(\frac{-1}{t}\right)}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      9. add-exp-log5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\color{blue}{\frac{-1}{t}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      10. *-commutative5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \]
    7. Applied egg-rr13.2%

      \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25}} \]
    8. Step-by-step derivation
      1. pow-sqr13.3%

        \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{\left(2 \cdot 0.25\right)}} \]
      2. metadata-eval13.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{U} \cdot \color{blue}{\sqrt{n \cdot \left(-2 \cdot \left(-t\right)\right)}} \]
      2. distribute-rgt-neg-out47.7%

        \[\leadsto \sqrt{U} \cdot \sqrt{n \cdot \color{blue}{\left(--2 \cdot t\right)}} \]
      3. distribute-lft-neg-in47.7%

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

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

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

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

    1. Initial program 66.2%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 58.7% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_2 := n \cdot t\_1\\ t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2 \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{\left(t - \left(t\_2 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + \left(n \cdot \left(t\_1 \cdot U*\right)\right) \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l_m Om) 2.0))
        (t_2 (* n t_1))
        (t_3
         (*
          (* (* 2.0 n) U)
          (+ (- t (* 2.0 (/ (* l_m l_m) Om))) (* t_2 (- U* U))))))
   (if (<= t_3 0.0)
     (* (sqrt U) (sqrt (* n (* 2.0 t))))
     (if (<= t_3 INFINITY)
       (sqrt
        (*
         (- t (+ (* t_2 (- U U*)) (* 2.0 (* l_m (/ l_m Om)))))
         (* 2.0 (* n U))))
       (sqrt
        (+ (* 2.0 (* U (* n t))) (* (* n (* t_1 U*)) (* n (* 2.0 U)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow((l_m / Om), 2.0);
	double t_2 = n * t_1;
	double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_2 * (U_42_ - U)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(((t - ((t_2 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = sqrt(((2.0 * (U * (n * t))) + ((n * (t_1 * U_42_)) * (n * (2.0 * U)))));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.pow((l_m / Om), 2.0);
	double t_2 = n * t_1;
	double t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_2 * (U_42_ - U)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt(U) * Math.sqrt((n * (2.0 * t)));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t - ((t_2 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.sqrt(((2.0 * (U * (n * t))) + ((n * (t_1 * U_42_)) * (n * (2.0 * U)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.pow((l_m / Om), 2.0)
	t_2 = n * t_1
	t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_2 * (U_42_ - U)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt(U) * math.sqrt((n * (2.0 * t)))
	elif t_3 <= math.inf:
		tmp = math.sqrt(((t - ((t_2 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))))
	else:
		tmp = math.sqrt(((2.0 * (U * (n * t))) + ((n * (t_1 * U_42_)) * (n * (2.0 * U)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m / Om) ^ 2.0
	t_2 = Float64(n * t_1)
	t_3 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(t_2 * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(n * Float64(2.0 * t))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(Float64(t - Float64(Float64(t_2 * Float64(U - U_42_)) + Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(n * t))) + Float64(Float64(n * Float64(t_1 * U_42_)) * Float64(n * Float64(2.0 * U)))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (l_m / Om) ^ 2.0;
	t_2 = n * t_1;
	t_3 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + (t_2 * (U_42_ - U)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt(U) * sqrt((n * (2.0 * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(((t - ((t_2 * (U - U_42_)) + (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	else
		tmp = sqrt(((2.0 * (U * (n * t))) + ((n * (t_1 * U_42_)) * (n * (2.0 * U)))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(n * t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(t - N[(N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[(t$95$1 * U$42$), $MachinePrecision]), $MachinePrecision] * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := n \cdot t\_1\\
t_3 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2 \cdot \left(U* - U\right)\right)\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(t - \left(t\_2 \cdot \left(U - U*\right) + 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + \left(n \cdot \left(t\_1 \cdot U*\right)\right) \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\


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

    1. Initial program 10.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. Simplified29.2%

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

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

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow219.3%

        \[\leadsto \color{blue}{e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}} \]
      2. *-commutative19.3%

        \[\leadsto e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      3. exp-prod5.2%

        \[\leadsto \color{blue}{{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      4. exp-sum5.2%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      5. add-exp-log5.2%

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

        \[\leadsto {\left(\color{blue}{\left(\left(U \cdot n\right) \cdot -2\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      7. mul-1-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot e^{\color{blue}{-\log \left(\frac{-1}{t}\right)}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      8. exp-neg5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \color{blue}{\frac{1}{e^{\log \left(\frac{-1}{t}\right)}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      9. add-exp-log5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\color{blue}{\frac{-1}{t}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      10. *-commutative5.2%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \]
    7. Applied egg-rr13.2%

      \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25}} \]
    8. Step-by-step derivation
      1. pow-sqr13.3%

        \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{\left(2 \cdot 0.25\right)}} \]
      2. metadata-eval13.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{U} \cdot \color{blue}{\sqrt{n \cdot \left(-2 \cdot \left(-t\right)\right)}} \]
      2. distribute-rgt-neg-out47.7%

        \[\leadsto \sqrt{U} \cdot \sqrt{n \cdot \color{blue}{\left(--2 \cdot t\right)}} \]
      3. distribute-lft-neg-in47.7%

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

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

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

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

    1. Initial program 66.2%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 48.0% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.2 \cdot 10^{+110}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{elif}\;Om \leq 3.05 \cdot 10^{-15}:\\ \;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right) + 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -1.2e+110)
   (sqrt (* 2.0 (fabs (* U (* n t)))))
   (if (<= Om 3.05e-15)
     (sqrt
      (+
       (* n (* (* 2.0 (* n U)) (* (pow (/ l_m Om) 2.0) (- U* U))))
       (* 2.0 (* t (* n U)))))
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om))))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.2e+110) {
		tmp = sqrt((2.0 * fabs((U * (n * t)))));
	} else if (Om <= 3.05e-15) {
		tmp = sqrt(((n * ((2.0 * (n * U)) * (pow((l_m / Om), 2.0) * (U_42_ - U)))) + (2.0 * (t * (n * U)))));
	} else {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (om <= (-1.2d+110)) then
        tmp = sqrt((2.0d0 * abs((u * (n * t)))))
    else if (om <= 3.05d-15) then
        tmp = sqrt(((n * ((2.0d0 * (n * u)) * (((l_m / om) ** 2.0d0) * (u_42 - u)))) + (2.0d0 * (t * (n * u)))))
    else
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.2e+110) {
		tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
	} else if (Om <= 3.05e-15) {
		tmp = Math.sqrt(((n * ((2.0 * (n * U)) * (Math.pow((l_m / Om), 2.0) * (U_42_ - U)))) + (2.0 * (t * (n * U)))));
	} else {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if Om <= -1.2e+110:
		tmp = math.sqrt((2.0 * math.fabs((U * (n * t)))))
	elif Om <= 3.05e-15:
		tmp = math.sqrt(((n * ((2.0 * (n * U)) * (math.pow((l_m / Om), 2.0) * (U_42_ - U)))) + (2.0 * (t * (n * U)))))
	else:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.2e+110)
		tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t)))));
	elseif (Om <= 3.05e-15)
		tmp = sqrt(Float64(Float64(n * Float64(Float64(2.0 * Float64(n * U)) * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U)))) + Float64(2.0 * Float64(t * Float64(n * U)))));
	else
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (Om <= -1.2e+110)
		tmp = sqrt((2.0 * abs((U * (n * t)))));
	elseif (Om <= 3.05e-15)
		tmp = sqrt(((n * ((2.0 * (n * U)) * (((l_m / Om) ^ 2.0) * (U_42_ - U)))) + (2.0 * (t * (n * U)))));
	else
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.2e+110], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 3.05e-15], N[Sqrt[N[(N[(n * N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.2 \cdot 10^{+110}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

\mathbf{elif}\;Om \leq 3.05 \cdot 10^{-15}:\\
\;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right) + 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.20000000000000006e110 < Om < 3.04999999999999986e-15

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.04999999999999986e-15 < Om

    1. Initial program 52.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.2 \cdot 10^{+110}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{elif}\;Om \leq 3.05 \cdot 10^{-15}:\\ \;\;\;\;\sqrt{n \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right) + 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 47.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq 7.4 \cdot 10^{-47}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right)\right) \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\

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


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

    1. Initial program 47.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.4000000000000001e-47 < Om

    1. Initial program 53.4%

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

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

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

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

Alternative 7: 45.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 3.9999999999999999e101

    1. Initial program 50.8%

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

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

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

    if 3.9999999999999999e101 < U

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. unpow-prod-down73.6%

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

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

        \[\leadsto \sqrt{2 \cdot U} \cdot \color{blue}{\sqrt{n \cdot t}} \]
    6. Applied egg-rr73.6%

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

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

Alternative 8: 40.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -4.999999999999985e-310

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. add-sqr-sqrt42.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < U

    1. Initial program 44.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. Simplified47.2%

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

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

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}\right)}}^{2} \]
    6. Step-by-step derivation
      1. unpow221.5%

        \[\leadsto \color{blue}{e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)}} \]
      2. *-commutative21.5%

        \[\leadsto e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      3. exp-prod17.4%

        \[\leadsto \color{blue}{{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25}} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      4. exp-sum17.4%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot n\right)\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      5. add-exp-log17.4%

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

        \[\leadsto {\left(\color{blue}{\left(\left(U \cdot n\right) \cdot -2\right)} \cdot e^{-1 \cdot \log \left(\frac{-1}{t}\right)}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      7. mul-1-neg17.4%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot e^{\color{blue}{-\log \left(\frac{-1}{t}\right)}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      8. exp-neg17.4%

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \color{blue}{\frac{1}{e^{\log \left(\frac{-1}{t}\right)}}}\right)}^{0.25} \cdot e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right)} \]
      9. add-exp-log17.6%

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

        \[\leadsto {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(-2 \cdot \left(U \cdot n\right)\right) + -1 \cdot \log \left(\frac{-1}{t}\right)\right) \cdot 0.25}} \]
    7. Applied egg-rr35.7%

      \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25} \cdot {\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{0.25}} \]
    8. Step-by-step derivation
      1. pow-sqr35.9%

        \[\leadsto \color{blue}{{\left(\left(\left(U \cdot n\right) \cdot -2\right) \cdot \frac{1}{\frac{-1}{t}}\right)}^{\left(2 \cdot 0.25\right)}} \]
      2. metadata-eval35.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{U} \cdot \color{blue}{\sqrt{n \cdot \left(-2 \cdot \left(-t\right)\right)}} \]
      2. distribute-rgt-neg-out49.8%

        \[\leadsto \sqrt{U} \cdot \sqrt{n \cdot \color{blue}{\left(--2 \cdot t\right)}} \]
      3. distribute-lft-neg-in49.8%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{n \cdot \left(2 \cdot t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 40.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -4.999999999999985e-310

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. add-sqr-sqrt42.7%

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < U

    1. Initial program 44.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. Simplified47.2%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 38.9% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|} \]
  10. Add Preprocessing

Alternative 11: 38.2% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

Alternative 12: 36.1% accurate, 2.1× speedup?

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

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

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

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

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

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

Reproduce

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