Toniolo and Linder, Equation (13)

Percentage Accurate: 50.5% → 65.1%
Time: 22.0s
Alternatives: 27
Speedup: 2.2×

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 27 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: 50.5% accurate, 1.0× speedup?

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

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

Alternative 1: 65.1% accurate, 1.9× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 2 \cdot 10^{-146}:\\ \;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \cdot \mathsf{fma}\left(\left(n \cdot \frac{l\_m}{Om}\right) \cdot \left(U* - U\right), \frac{l\_m}{Om}, \mathsf{fma}\left(l\_m \cdot -2, \frac{l\_m}{Om}, t\right)\right)}\\ \mathbf{elif}\;l\_m \leq 1.5 \cdot 10^{+187}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(n \cdot U\right) \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)}{Om}} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 2e-146)
   (sqrt
    (*
     (* U (* 2.0 n))
     (fma
      (* (* n (/ l_m Om)) (- U* U))
      (/ l_m Om)
      (fma (* l_m -2.0) (/ l_m Om) t))))
   (if (<= l_m 1.5e+187)
     (sqrt
      (*
       (* 2.0 n)
       (fma
        (fma (- U U*) (/ (* l_m (- n)) Om) (* l_m -2.0))
        (* U (/ l_m Om))
        (* U t))))
     (*
      (sqrt (/ (* (* n U) (fma (- n) (/ (- U U*) Om) -2.0)) Om))
      (* l_m (sqrt 2.0))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 2e-146) {
		tmp = sqrt(((U * (2.0 * n)) * fma(((n * (l_m / Om)) * (U_42_ - U)), (l_m / Om), fma((l_m * -2.0), (l_m / Om), t))));
	} else if (l_m <= 1.5e+187) {
		tmp = sqrt(((2.0 * n) * fma(fma((U - U_42_), ((l_m * -n) / Om), (l_m * -2.0)), (U * (l_m / Om)), (U * t))));
	} else {
		tmp = sqrt((((n * U) * fma(-n, ((U - U_42_) / Om), -2.0)) / Om)) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 2e-146)
		tmp = sqrt(Float64(Float64(U * Float64(2.0 * n)) * fma(Float64(Float64(n * Float64(l_m / Om)) * Float64(U_42_ - U)), Float64(l_m / Om), fma(Float64(l_m * -2.0), Float64(l_m / Om), t))));
	elseif (l_m <= 1.5e+187)
		tmp = sqrt(Float64(Float64(2.0 * n) * fma(fma(Float64(U - U_42_), Float64(Float64(l_m * Float64(-n)) / Om), Float64(l_m * -2.0)), Float64(U * Float64(l_m / Om)), Float64(U * t))));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(n * U) * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0)) / Om)) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 2e-146], N[Sqrt[N[(N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + N[(N[(l$95$m * -2.0), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.5e+187], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(N[(l$95$m * (-n)), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l\_m \leq 1.5 \cdot 10^{+187}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\

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


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

    1. Initial program 53.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

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

    if 2.00000000000000005e-146 < l < 1.5e187

    1. Initial program 48.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

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

    if 1.5e187 < l

    1. Initial program 9.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

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

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

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

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

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

Alternative 2: 61.7% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := t\_1 \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)\\ t_3 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(l\_m, \frac{\mathsf{fma}\left(U*, \frac{l\_m \cdot n}{Om}, l\_m \cdot -2\right)}{Om}, t\right)\right)}\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+112}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{+301}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(l\_m \cdot n\right) \cdot \left(l\_m \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (*
          t_1
          (-
           (* (* n (pow (/ l_m Om) 2.0)) (- U* U))
           (- (* 2.0 (/ (* l_m l_m) Om)) t))))
        (t_3
         (sqrt
          (*
           (* 2.0 n)
           (* U (fma l_m (/ (fma U* (/ (* l_m n) Om) (* l_m -2.0)) Om) t))))))
   (if (<= t_2 2e+112)
     t_3
     (if (<= t_2 1e+301)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (if (<= t_2 INFINITY)
         t_3
         (sqrt
          (/
           (* 2.0 (* U (* (* l_m n) (* l_m (fma (- n) (/ (- U U*) Om) -2.0)))))
           Om)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = t_1 * (((n * pow((l_m / Om), 2.0)) * (U_42_ - U)) - ((2.0 * ((l_m * l_m) / Om)) - t));
	double t_3 = sqrt(((2.0 * n) * (U * fma(l_m, (fma(U_42_, ((l_m * n) / Om), (l_m * -2.0)) / Om), t))));
	double tmp;
	if (t_2 <= 2e+112) {
		tmp = t_3;
	} else if (t_2 <= 1e+301) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_3;
	} else {
		tmp = sqrt(((2.0 * (U * ((l_m * n) * (l_m * fma(-n, ((U - U_42_) / Om), -2.0))))) / Om));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = Float64(t_1 * Float64(Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t)))
	t_3 = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(l_m, Float64(fma(U_42_, Float64(Float64(l_m * n) / Om), Float64(l_m * -2.0)) / Om), t))))
	tmp = 0.0
	if (t_2 <= 2e+112)
		tmp = t_3;
	elseif (t_2 <= 1e+301)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	elseif (t_2 <= Inf)
		tmp = t_3;
	else
		tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(Float64(l_m * n) * Float64(l_m * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0))))) / Om));
	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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(l$95$m * N[(N[(U$42$ * N[(N[(l$95$m * n), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e+112], t$95$3, If[LessEqual[t$95$2, 1e+301], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$3, N[Sqrt[N[(N[(2.0 * N[(U * N[(N[(l$95$m * n), $MachinePrecision] * N[(l$95$m * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.9999999999999999e112 or 1.00000000000000005e301 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < +inf.0

    1. Initial program 49.2%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\ell \cdot \frac{-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}}{Om}} + t\right)\right)} \]
      4. lower-fma.f64N/A

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

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\ell, \frac{\color{blue}{\mathsf{fma}\left(U*, \frac{\ell \cdot n}{Om}, -2 \cdot \ell\right)}}{Om}, t\right)\right)} \]
      9. lower-/.f64N/A

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

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

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

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

    if 1.9999999999999999e112 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.00000000000000005e301

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6481.7

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + -1 \cdot \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right)\right)\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

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

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

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

Alternative 3: 57.5% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := \sqrt{t\_1 \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(l\_m \cdot n\right) \cdot \left(l\_m \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (sqrt
          (*
           t_1
           (-
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U))
            (- (* 2.0 (/ (* l_m l_m) Om)) t))))))
   (if (<= t_2 0.0)
     (* (sqrt n) (sqrt (* 2.0 (* U (fma (/ l_m Om) (* l_m -2.0) t)))))
     (if (<= t_2 5e+150)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (sqrt
        (/
         (* 2.0 (* U (* (* l_m n) (* l_m (fma (- n) (/ (- U U*) Om) -2.0)))))
         Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = sqrt((t_1 * (((n * pow((l_m / Om), 2.0)) * (U_42_ - U)) - ((2.0 * ((l_m * l_m) / Om)) - t))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(n) * sqrt((2.0 * (U * fma((l_m / Om), (l_m * -2.0), t))));
	} else if (t_2 <= 5e+150) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = sqrt(((2.0 * (U * ((l_m * n) * (l_m * fma(-n, ((U - U_42_) / Om), -2.0))))) / Om));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = sqrt(Float64(t_1 * Float64(Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t)))));
	elseif (t_2 <= 5e+150)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(Float64(l_m * n) * Float64(l_m * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0))))) / Om));
	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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * N[(N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+150], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(U * N[(N[(l$95$m * n), $MachinePrecision] * N[(l$95$m * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

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


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

    1. Initial program 8.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5.00000000000000009e150

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

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

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

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

    if 5.00000000000000009e150 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 17.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + -1 \cdot \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right)\right)\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

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

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

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

Alternative 4: 57.0% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := \sqrt{t\_1 \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\left(l\_m \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)\right) \cdot \left(l\_m \cdot U\right)}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (sqrt
          (*
           t_1
           (-
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U))
            (- (* 2.0 (/ (* l_m l_m) Om)) t))))))
   (if (<= t_2 0.0)
     (* (sqrt n) (sqrt (* 2.0 (* U (fma (/ l_m Om) (* l_m -2.0) t)))))
     (if (<= t_2 5e+150)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (sqrt
        (*
         (* 2.0 n)
         (/ (* (* l_m (fma (- n) (/ (- U U*) Om) -2.0)) (* l_m U)) Om)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = sqrt((t_1 * (((n * pow((l_m / Om), 2.0)) * (U_42_ - U)) - ((2.0 * ((l_m * l_m) / Om)) - t))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(n) * sqrt((2.0 * (U * fma((l_m / Om), (l_m * -2.0), t))));
	} else if (t_2 <= 5e+150) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = sqrt(((2.0 * n) * (((l_m * fma(-n, ((U - U_42_) / Om), -2.0)) * (l_m * U)) / Om)));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = sqrt(Float64(t_1 * Float64(Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t)))));
	elseif (t_2 <= 5e+150)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(Float64(l_m * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0)) * Float64(l_m * U)) / Om)));
	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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * N[(N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+150], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(l$95$m * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision] * N[(l$95$m * U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

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


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

    1. Initial program 8.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5.00000000000000009e150

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

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

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

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

    if 5.00000000000000009e150 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 17.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

      \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \color{blue}{\frac{U \cdot \left(\ell \cdot \left(-2 \cdot \ell + -1 \cdot \frac{\ell \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right)\right)}{Om}}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

Alternative 5: 64.9% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := t\_1 \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{+112}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(l\_m, \frac{\mathsf{fma}\left(U*, \frac{l\_m \cdot n}{Om}, l\_m \cdot -2\right)}{Om}, t\right)\right)}\\ \mathbf{elif}\;t\_2 \leq 10^{+301}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(n \cdot U\right) \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)}{Om}} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (*
          t_1
          (-
           (* (* n (pow (/ l_m Om) 2.0)) (- U* U))
           (- (* 2.0 (/ (* l_m l_m) Om)) t)))))
   (if (<= t_2 2e+112)
     (sqrt
      (*
       (* 2.0 n)
       (* U (fma l_m (/ (fma U* (/ (* l_m n) Om) (* l_m -2.0)) Om) t))))
     (if (<= t_2 1e+301)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (*
        (sqrt (/ (* (* n U) (fma (- n) (/ (- U U*) Om) -2.0)) Om))
        (* l_m (sqrt 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 = U * (2.0 * n);
	double t_2 = t_1 * (((n * pow((l_m / Om), 2.0)) * (U_42_ - U)) - ((2.0 * ((l_m * l_m) / Om)) - t));
	double tmp;
	if (t_2 <= 2e+112) {
		tmp = sqrt(((2.0 * n) * (U * fma(l_m, (fma(U_42_, ((l_m * n) / Om), (l_m * -2.0)) / Om), t))));
	} else if (t_2 <= 1e+301) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = sqrt((((n * U) * fma(-n, ((U - U_42_) / Om), -2.0)) / Om)) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = Float64(t_1 * Float64(Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t)))
	tmp = 0.0
	if (t_2 <= 2e+112)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(l_m, Float64(fma(U_42_, Float64(Float64(l_m * n) / Om), Float64(l_m * -2.0)) / Om), t))));
	elseif (t_2 <= 1e+301)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(n * U) * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0)) / Om)) * Float64(l_m * sqrt(2.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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 2e+112], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(l$95$m * N[(N[(U$42$ * N[(N[(l$95$m * n), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 1e+301], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

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


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

    1. Initial program 62.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\ell \cdot \frac{-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}}{Om}} + t\right)\right)} \]
      4. lower-fma.f64N/A

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

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\ell, \frac{\color{blue}{\mathsf{fma}\left(U*, \frac{\ell \cdot n}{Om}, -2 \cdot \ell\right)}}{Om}, t\right)\right)} \]
      9. lower-/.f64N/A

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

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

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

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

    if 1.9999999999999999e112 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 1.00000000000000005e301

    1. Initial program 99.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6481.7

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

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

    if 1.00000000000000005e301 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 18.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

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

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

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

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

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

Alternative 6: 50.7% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := \sqrt{t\_1 \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - \left(2 \cdot \frac{l\_m \cdot l\_m}{Om} - t\right)\right)}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (sqrt
          (*
           t_1
           (-
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U))
            (- (* 2.0 (/ (* l_m l_m) Om)) t))))))
   (if (<= t_2 0.0)
     (* (sqrt n) (sqrt (* 2.0 (* U t))))
     (if (<= t_2 5e+150)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -2.0) t))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = sqrt((t_1 * (((n * pow((l_m / Om), 2.0)) * (U_42_ - U)) - ((2.0 * ((l_m * l_m) / Om)) - t))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(n) * sqrt((2.0 * (U * t)));
	} else if (t_2 <= 5e+150) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = sqrt(Float64(t_1 * Float64(Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)) - Float64(Float64(2.0 * Float64(Float64(l_m * l_m) / Om)) - t))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(U * t))));
	elseif (t_2 <= 5e+150)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	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[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * N[(N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] - N[(N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+150], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

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


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

    1. Initial program 8.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right) \cdot 2}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right)} \cdot 2} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(n \cdot U\right)} \cdot t\right) \cdot 2} \]
      6. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(U \cdot t\right)\right)} \cdot 2} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(\left(U \cdot t\right) \cdot 2\right)}} \]
      8. sqrt-prodN/A

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

        \[\leadsto \color{blue}{{n}^{\frac{1}{2}}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{{n}^{\frac{1}{2}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2}} \]
      11. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      12. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      13. lower-sqrt.f64N/A

        \[\leadsto \sqrt{n} \cdot \color{blue}{\sqrt{\left(U \cdot t\right) \cdot 2}} \]
      14. lower-*.f64N/A

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 5.00000000000000009e150

    1. Initial program 96.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

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

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

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

    if 5.00000000000000009e150 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 17.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

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

Alternative 7: 64.0% accurate, 1.9× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 9.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), t\right)\right)}\\ \mathbf{elif}\;l\_m \leq 7 \cdot 10^{+187}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U - U*\right), \frac{-l\_m}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(n \cdot U\right) \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)}{Om}} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 9.6e-102)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (fma (/ l_m Om) (fma (- U U*) (/ (* l_m (- n)) Om) (* l_m -2.0)) t))))
   (if (<= l_m 7e+187)
     (sqrt
      (*
       (* 2.0 n)
       (fma
        (fma (* n (- U U*)) (/ (- l_m) Om) (* l_m -2.0))
        (* U (/ l_m Om))
        (* U t))))
     (*
      (sqrt (/ (* (* n U) (fma (- n) (/ (- U U*) Om) -2.0)) Om))
      (* l_m (sqrt 2.0))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 9.6e-102) {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), fma((U - U_42_), ((l_m * -n) / Om), (l_m * -2.0)), t))));
	} else if (l_m <= 7e+187) {
		tmp = sqrt(((2.0 * n) * fma(fma((n * (U - U_42_)), (-l_m / Om), (l_m * -2.0)), (U * (l_m / Om)), (U * t))));
	} else {
		tmp = sqrt((((n * U) * fma(-n, ((U - U_42_) / Om), -2.0)) / Om)) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 9.6e-102)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), fma(Float64(U - U_42_), Float64(Float64(l_m * Float64(-n)) / Om), Float64(l_m * -2.0)), t))));
	elseif (l_m <= 7e+187)
		tmp = sqrt(Float64(Float64(2.0 * n) * fma(fma(Float64(n * Float64(U - U_42_)), Float64(Float64(-l_m) / Om), Float64(l_m * -2.0)), Float64(U * Float64(l_m / Om)), Float64(U * t))));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(n * U) * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0)) / Om)) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 9.6e-102], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(N[(l$95$m * (-n)), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 7e+187], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[((-l$95$m) / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 9.6 \cdot 10^{-102}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), t\right)\right)}\\

\mathbf{elif}\;l\_m \leq 7 \cdot 10^{+187}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U - U*\right), \frac{-l\_m}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\

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


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

    1. Initial program 54.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

    if 9.6e-102 < l < 6.9999999999999995e187

    1. Initial program 44.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

      \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(U - U*, \frac{n \cdot \ell}{-Om}, \ell \cdot -2\right), \frac{\ell}{Om} \cdot U, U \cdot t\right)}} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{n \cdot \ell}{\color{blue}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      4. div-invN/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \frac{1}{\mathsf{neg}\left(Om\right)}\right)} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      5. div-invN/A

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{n \cdot \ell}{\mathsf{neg}\left(Om\right)} + \color{blue}{\ell \cdot -2}, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      8. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \color{blue}{\frac{n \cdot \ell}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\color{blue}{n \cdot \ell}}{\mathsf{neg}\left(Om\right)} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      10. associate-/l*N/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\color{blue}{\left(\left(U - U*\right) \cdot n\right) \cdot \frac{\ell}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\left(U - U*\right) \cdot n, \frac{\ell}{\mathsf{neg}\left(Om\right)}, \ell \cdot -2\right)}, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(U - U*\right) \cdot n}, \frac{\ell}{\mathsf{neg}\left(Om\right)}, \ell \cdot -2\right), \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      14. lower-/.f6467.7

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

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

    if 6.9999999999999995e187 < l

    1. Initial program 9.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 9.6 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(U - U*, \frac{\ell \cdot \left(-n\right)}{Om}, \ell \cdot -2\right), t\right)\right)}\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{+187}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U - U*\right), \frac{-\ell}{Om}, \ell \cdot -2\right), U \cdot \frac{\ell}{Om}, U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(n \cdot U\right) \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)}{Om}} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 62.7% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;n \leq 1.12 \cdot 10^{-299}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U - U*\right), \frac{-l\_m}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), t\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= n 1.12e-299)
   (sqrt
    (*
     (* 2.0 n)
     (fma
      (fma (* n (- U U*)) (/ (- l_m) Om) (* l_m -2.0))
      (* U (/ l_m Om))
      (* U t))))
   (*
    (sqrt (* 2.0 n))
    (sqrt
     (*
      U
      (fma (/ l_m Om) (fma (- U U*) (/ (* l_m (- n)) Om) (* l_m -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 (n <= 1.12e-299) {
		tmp = sqrt(((2.0 * n) * fma(fma((n * (U - U_42_)), (-l_m / Om), (l_m * -2.0)), (U * (l_m / Om)), (U * t))));
	} else {
		tmp = sqrt((2.0 * n)) * sqrt((U * fma((l_m / Om), fma((U - U_42_), ((l_m * -n) / Om), (l_m * -2.0)), t)));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (n <= 1.12e-299)
		tmp = sqrt(Float64(Float64(2.0 * n) * fma(fma(Float64(n * Float64(U - U_42_)), Float64(Float64(-l_m) / Om), Float64(l_m * -2.0)), Float64(U * Float64(l_m / Om)), Float64(U * t))));
	else
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * fma(Float64(l_m / Om), fma(Float64(U - U_42_), Float64(Float64(l_m * Float64(-n)) / Om), Float64(l_m * -2.0)), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 1.12e-299], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] * N[((-l$95$m) / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] * N[(U * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(N[(l$95$m * (-n)), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.12 \cdot 10^{-299}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(n \cdot \left(U - U*\right), \frac{-l\_m}{Om}, l\_m \cdot -2\right), U \cdot \frac{l\_m}{Om}, U \cdot t\right)}\\

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


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

    1. Initial program 43.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

      \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(U - U*, \frac{n \cdot \ell}{-Om}, \ell \cdot -2\right), \frac{\ell}{Om} \cdot U, U \cdot t\right)}} \]
    8. Step-by-step derivation
      1. lift--.f64N/A

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{n \cdot \ell}{\color{blue}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      4. div-invN/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \frac{1}{\mathsf{neg}\left(Om\right)}\right)} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      5. div-invN/A

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{n \cdot \ell}{\mathsf{neg}\left(Om\right)} + \color{blue}{\ell \cdot -2}, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      8. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \color{blue}{\frac{n \cdot \ell}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\color{blue}{n \cdot \ell}}{\mathsf{neg}\left(Om\right)} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      10. associate-/l*N/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\color{blue}{\left(\left(U - U*\right) \cdot n\right) \cdot \frac{\ell}{\mathsf{neg}\left(Om\right)}} + \ell \cdot -2, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      12. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\color{blue}{\mathsf{fma}\left(\left(U - U*\right) \cdot n, \frac{\ell}{\mathsf{neg}\left(Om\right)}, \ell \cdot -2\right)}, \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \mathsf{fma}\left(\mathsf{fma}\left(\color{blue}{\left(U - U*\right) \cdot n}, \frac{\ell}{\mathsf{neg}\left(Om\right)}, \ell \cdot -2\right), \frac{\ell}{Om} \cdot U, U \cdot t\right)} \]
      14. lower-/.f6464.6

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

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

    if 1.11999999999999998e-299 < n

    1. Initial program 51.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

Alternative 9: 64.0% accurate, 2.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.5 \cdot 10^{+176}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(U - U*, \frac{l\_m \cdot \left(-n\right)}{Om}, l\_m \cdot -2\right), t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(n \cdot U\right) \cdot \mathsf{fma}\left(-n, \frac{U - U*}{Om}, -2\right)}{Om}} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 1.5e+176)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (fma (/ l_m Om) (fma (- U U*) (/ (* l_m (- n)) Om) (* l_m -2.0)) t))))
   (*
    (sqrt (/ (* (* n U) (fma (- n) (/ (- U U*) Om) -2.0)) Om))
    (* l_m (sqrt 2.0)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 1.5e+176) {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), fma((U - U_42_), ((l_m * -n) / Om), (l_m * -2.0)), t))));
	} else {
		tmp = sqrt((((n * U) * fma(-n, ((U - U_42_) / Om), -2.0)) / Om)) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 1.5e+176)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), fma(Float64(U - U_42_), Float64(Float64(l_m * Float64(-n)) / Om), Float64(l_m * -2.0)), t))));
	else
		tmp = Float64(sqrt(Float64(Float64(Float64(n * U) * fma(Float64(-n), Float64(Float64(U - U_42_) / Om), -2.0)) / Om)) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.5e+176], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(U - U$42$), $MachinePrecision] * N[(N[(l$95$m * (-n)), $MachinePrecision] / Om), $MachinePrecision] + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(N[(n * U), $MachinePrecision] * N[((-n) * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + -2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 52.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

    if 1.5e176 < l

    1. Initial program 8.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\color{blue}{\left(U - U*\right)} \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{\color{blue}{n \cdot \ell}}{Om}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\color{blue}{\frac{n \cdot \ell}{Om}}\right)\right) + \ell \cdot -2\right) + t\right)\right)} \]
      5. lift-neg.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right)} + \ell \cdot -2\right) + t\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \left(\left(U - U*\right) \cdot \left(\mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right)\right) + \color{blue}{\ell \cdot -2}\right) + t\right)\right)} \]
      7. lift-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right)} + t\right)\right)} \]
      8. distribute-rgt-inN/A

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

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(\color{blue}{\left(\mathsf{fma}\left(U - U*, \mathsf{neg}\left(\frac{n \cdot \ell}{Om}\right), \ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)} \cdot U + t \cdot U\right)} \]
      10. associate-*l*N/A

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

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

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

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

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

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

Alternative 10: 50.5% accurate, 2.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -6 \cdot 10^{-171}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 7.6 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\frac{U \cdot \left(2 \cdot n\right)}{Om} \cdot \left(\frac{l\_m}{Om} \cdot \left(l\_m \cdot \left(n \cdot U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -6e-171)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 7.6e-25)
     (sqrt (* (/ (* U (* 2.0 n)) Om) (* (/ l_m Om) (* l_m (* n U*)))))
     (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -6e-171) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 7.6e-25) {
		tmp = sqrt((((U * (2.0 * n)) / Om) * ((l_m / Om) * (l_m * (n * U_42_)))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -6e-171)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 7.6e-25)
		tmp = sqrt(Float64(Float64(Float64(U * Float64(2.0 * n)) / Om) * Float64(Float64(l_m / Om) * Float64(l_m * Float64(n * U_42_)))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -6e-171], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 7.6e-25], N[Sqrt[N[(N[(N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -6 \cdot 10^{-171}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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


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

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -5.9999999999999999e-171 < Om < 7.5999999999999996e-25

    1. Initial program 39.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. Add Preprocessing
    3. Taylor expanded in U* around inf

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)}{Om \cdot Om}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}}{Om \cdot Om}} \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      11. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om}} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      12. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      14. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      15. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      17. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      18. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(U* \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}} \]
      20. lower-*.f64N/A

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

      \[\leadsto \sqrt{\color{blue}{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(\left(U* \cdot n\right) \cdot \frac{\ell \cdot \ell}{Om}\right)}} \]
      4. lift-/.f64N/A

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

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(\left(U* \cdot n\right) \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right)} \]
      7. lift-/.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(\left(\left(U* \cdot n\right) \cdot \ell\right) \cdot \frac{\ell}{Om}\right)}} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(\left(\left(U* \cdot n\right) \cdot \ell\right) \cdot \frac{\ell}{Om}\right)}} \]
      10. lower-*.f64N/A

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

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

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

    if 7.5999999999999996e-25 < Om

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -6 \cdot 10^{-171}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 7.6 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\frac{U \cdot \left(2 \cdot n\right)}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(\ell \cdot \left(n \cdot U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 48.9% accurate, 2.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -3.5 \cdot 10^{-167}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.05 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{\left(U \cdot \frac{U* \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)}{Om}\right) \cdot \frac{2 \cdot n}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -3.5e-167)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 1.05e-24)
     (sqrt (* (* U (/ (* U* (* n (* l_m l_m))) Om)) (/ (* 2.0 n) Om)))
     (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -3.5e-167) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 1.05e-24) {
		tmp = sqrt(((U * ((U_42_ * (n * (l_m * l_m))) / Om)) * ((2.0 * n) / Om)));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -3.5e-167)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 1.05e-24)
		tmp = sqrt(Float64(Float64(U * Float64(Float64(U_42_ * Float64(n * Float64(l_m * l_m))) / Om)) * Float64(Float64(2.0 * n) / Om)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -3.5e-167], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.05e-24], N[Sqrt[N[(N[(U * N[(N[(U$42$ * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[(N[(2.0 * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3.5 \cdot 10^{-167}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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


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

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -3.4999999999999999e-167 < Om < 1.05e-24

    1. Initial program 39.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. Add Preprocessing
    3. Taylor expanded in U* around inf

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)}{Om \cdot Om}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}}{Om \cdot Om}} \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      11. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om}} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      12. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      14. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      15. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      17. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      18. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(U* \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}} \]
      20. lower-*.f64N/A

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

      \[\leadsto \sqrt{\color{blue}{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(n \cdot 2\right)}}{Om} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)} \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{U \cdot \left(n \cdot 2\right)}{Om}} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(U* \cdot \left(n \cdot \color{blue}{\frac{\ell \cdot \ell}{Om}}\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(U* \cdot \color{blue}{\left(n \cdot \frac{\ell \cdot \ell}{Om}\right)}\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \sqrt{\color{blue}{\left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right) \cdot \frac{U \cdot \left(n \cdot 2\right)}{Om}}} \]
      9. lift-/.f64N/A

        \[\leadsto \sqrt{\left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right) \cdot \color{blue}{\frac{U \cdot \left(n \cdot 2\right)}{Om}}} \]
      10. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right) \cdot U\right) \cdot \frac{n \cdot 2}{Om}}} \]
      13. lower-*.f64N/A

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

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

    if 1.05e-24 < Om

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -3.5 \cdot 10^{-167}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.05 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{\left(U \cdot \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right) \cdot \frac{2 \cdot n}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 49.4% accurate, 2.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.06 \cdot 10^{-170}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 3.3 \cdot 10^{-26}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \frac{U}{Om}\right) \cdot \left(U* \cdot \left(n \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -1.06e-170)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 3.3e-26)
     (sqrt (* (* (* 2.0 n) (/ U Om)) (* U* (* n (/ (* l_m l_m) Om)))))
     (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -1.06e-170) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 3.3e-26) {
		tmp = sqrt((((2.0 * n) * (U / Om)) * (U_42_ * (n * ((l_m * l_m) / Om)))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.06e-170)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 3.3e-26)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * Float64(U / Om)) * Float64(U_42_ * Float64(n * Float64(Float64(l_m * l_m) / Om)))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.06e-170], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 3.3e-26], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * N[(U / Om), $MachinePrecision]), $MachinePrecision] * N[(U$42$ * N[(n * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.06 \cdot 10^{-170}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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


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

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -1.06000000000000004e-170 < Om < 3.2999999999999998e-26

    1. Initial program 39.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. Add Preprocessing
    3. Taylor expanded in U* around inf

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)}{Om \cdot Om}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}}{Om \cdot Om}} \]
      6. lift-*.f64N/A

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}}} \]
      11. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot n\right) \cdot U}{Om}} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      12. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      14. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{\color{blue}{U \cdot \left(2 \cdot n\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      15. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      17. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{U \cdot \color{blue}{\left(n \cdot 2\right)}}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om}} \]
      18. lift-*.f64N/A

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

        \[\leadsto \sqrt{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \color{blue}{\left(U* \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}} \]
      20. lower-*.f64N/A

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

      \[\leadsto \sqrt{\color{blue}{\frac{U \cdot \left(n \cdot 2\right)}{Om} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot 2\right) \cdot \frac{U}{Om}\right)} \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)} \]
      4. lower-*.f64N/A

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

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

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

    if 3.2999999999999998e-26 < Om

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.06 \cdot 10^{-170}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 3.3 \cdot 10^{-26}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \frac{U}{Om}\right) \cdot \left(U* \cdot \left(n \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 48.4% accurate, 2.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.65 \cdot 10^{-167}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.56 \cdot 10^{-279}:\\ \;\;\;\;\frac{l\_m \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{elif}\;Om \leq 7.6 \cdot 10^{-25}:\\ \;\;\;\;\frac{\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \cdot \left(U* \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)\right)}}{Om}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -1.65e-167)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 1.56e-279)
     (* (/ (* l_m (* n (sqrt 2.0))) Om) (sqrt (* U U*)))
     (if (<= Om 7.6e-25)
       (/ (sqrt (* (* U (* 2.0 n)) (* U* (* n (* l_m l_m))))) Om)
       (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -1.65e-167) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 1.56e-279) {
		tmp = ((l_m * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
	} else if (Om <= 7.6e-25) {
		tmp = sqrt(((U * (2.0 * n)) * (U_42_ * (n * (l_m * l_m))))) / Om;
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.65e-167)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 1.56e-279)
		tmp = Float64(Float64(Float64(l_m * Float64(n * sqrt(2.0))) / Om) * sqrt(Float64(U * U_42_)));
	elseif (Om <= 7.6e-25)
		tmp = Float64(sqrt(Float64(Float64(U * Float64(2.0 * n)) * Float64(U_42_ * Float64(n * Float64(l_m * l_m))))) / Om);
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.65e-167], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.56e-279], N[(N[(N[(l$95$m * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 7.6e-25], N[(N[Sqrt[N[(N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * N[(U$42$ * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.65 \cdot 10^{-167}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Om < -1.64999999999999998e-167

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -1.64999999999999998e-167 < Om < 1.55999999999999999e-279

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in U* around inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om}} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\ell \cdot \left(n \cdot \sqrt{2}\right)}}{Om} \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

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

        \[\leadsto \frac{\ell \cdot \left(n \cdot \color{blue}{\sqrt{2}}\right)}{Om} \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

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

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

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

    if 1.55999999999999999e-279 < Om < 7.5999999999999996e-25

    1. Initial program 42.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in U* around inf

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)}{Om \cdot Om}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}}{Om \cdot Om}} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{\color{blue}{Om \cdot Om}}} \]
      7. lift-/.f64N/A

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

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

        \[\leadsto \color{blue}{\sqrt{\frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}} \]
      10. pow1/2N/A

        \[\leadsto \color{blue}{{\left(\frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}\right)}^{\frac{1}{2}}} \cdot \sqrt{\left(2 \cdot n\right) \cdot U} \]
      11. pow1/2N/A

        \[\leadsto {\left(\frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(\left(2 \cdot n\right) \cdot U\right)}^{\frac{1}{2}}} \]
      12. lower-*.f64N/A

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

      \[\leadsto \color{blue}{\frac{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}{Om} \cdot \sqrt{U \cdot \left(n \cdot 2\right)}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \frac{\sqrt{U* \cdot \color{blue}{\left(n \cdot \left(\ell \cdot \ell\right)\right)}}}{Om} \cdot \sqrt{U \cdot \left(n \cdot 2\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\sqrt{\color{blue}{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}}{Om} \cdot \sqrt{U \cdot \left(n \cdot 2\right)} \]
      4. lift-sqrt.f64N/A

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

        \[\leadsto \frac{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}{Om} \cdot \sqrt{U \cdot \color{blue}{\left(n \cdot 2\right)}} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}}{Om} \cdot \sqrt{\color{blue}{U \cdot \left(n \cdot 2\right)}} \]
      7. lift-sqrt.f64N/A

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

        \[\leadsto \color{blue}{\frac{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot 2\right)}}{Om}} \]
      9. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)} \cdot \sqrt{U \cdot \left(n \cdot 2\right)}}{Om}} \]
      10. lift-sqrt.f64N/A

        \[\leadsto \frac{\color{blue}{\sqrt{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}} \cdot \sqrt{U \cdot \left(n \cdot 2\right)}}{Om} \]
      11. lift-sqrt.f64N/A

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)\right) \cdot \left(U \cdot \left(n \cdot 2\right)\right)}}}{Om} \]
      13. lower-sqrt.f64N/A

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

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

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

    if 7.5999999999999996e-25 < Om

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.65 \cdot 10^{-167}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.56 \cdot 10^{-279}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{elif}\;Om \leq 7.6 \cdot 10^{-25}:\\ \;\;\;\;\frac{\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \cdot \left(U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)\right)}}{Om}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 48.4% accurate, 2.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -8 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.6 \cdot 10^{-279}:\\ \;\;\;\;\frac{l\_m \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{elif}\;Om \leq 4 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(U* \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)\right)\right)}}{Om}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -8e-172)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 1.6e-279)
     (* (/ (* l_m (* n (sqrt 2.0))) Om) (sqrt (* U U*)))
     (if (<= Om 4e-26)
       (/ (sqrt (* U (* (* 2.0 n) (* U* (* n (* l_m l_m)))))) Om)
       (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -8e-172) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 1.6e-279) {
		tmp = ((l_m * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
	} else if (Om <= 4e-26) {
		tmp = sqrt((U * ((2.0 * n) * (U_42_ * (n * (l_m * l_m)))))) / Om;
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -8e-172)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 1.6e-279)
		tmp = Float64(Float64(Float64(l_m * Float64(n * sqrt(2.0))) / Om) * sqrt(Float64(U * U_42_)));
	elseif (Om <= 4e-26)
		tmp = Float64(sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(U_42_ * Float64(n * Float64(l_m * l_m)))))) / Om);
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -8e-172], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.6e-279], N[(N[(N[(l$95$m * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 4e-26], N[(N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(U$42$ * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Om), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -8 \cdot 10^{-172}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Om < -8.0000000000000003e-172

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -8.0000000000000003e-172 < Om < 1.5999999999999999e-279

    1. Initial program 32.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. Add Preprocessing
    3. Taylor expanded in U* around inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om}} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\ell \cdot \left(n \cdot \sqrt{2}\right)}}{Om} \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

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

        \[\leadsto \frac{\ell \cdot \left(n \cdot \color{blue}{\sqrt{2}}\right)}{Om} \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

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

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

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

    if 1.5999999999999999e-279 < Om < 4.0000000000000002e-26

    1. Initial program 42.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in U* around inf

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}{Om \cdot Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{U* \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)}{Om \cdot Om}} \]
      4. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)}}{Om \cdot Om}} \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \color{blue}{\frac{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}}{\sqrt{Om \cdot Om}}} \]
      9. lift-*.f64N/A

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

        \[\leadsto \frac{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}}{\sqrt{\color{blue}{{Om}^{2}}}} \]
      11. sqrt-pow1N/A

        \[\leadsto \frac{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}}{\color{blue}{{Om}^{\left(\frac{2}{2}\right)}}} \]
      12. metadata-evalN/A

        \[\leadsto \frac{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}}{{Om}^{\color{blue}{1}}} \]
      13. unpow1N/A

        \[\leadsto \frac{\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(U* \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}}{\color{blue}{Om}} \]
      14. lower-/.f64N/A

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

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

    if 4.0000000000000002e-26 < Om

    1. Initial program 60.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -8 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.6 \cdot 10^{-279}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{elif}\;Om \leq 4 \cdot 10^{-26}:\\ \;\;\;\;\frac{\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}}{Om}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 48.3% accurate, 2.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.45 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.05 \cdot 10^{-254}:\\ \;\;\;\;\frac{l\_m \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -1.45e-172)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 1.05e-254)
     (* (/ (* l_m (* n (sqrt 2.0))) Om) (sqrt (* U U*)))
     (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -1.45e-172) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 1.05e-254) {
		tmp = ((l_m * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.45e-172)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 1.05e-254)
		tmp = Float64(Float64(Float64(l_m * Float64(n * sqrt(2.0))) / Om) * sqrt(Float64(U * U_42_)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.45e-172], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.05e-254], N[(N[(N[(l$95$m * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.45 \cdot 10^{-172}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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


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

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -1.44999999999999999e-172 < Om < 1.04999999999999998e-254

    1. Initial program 31.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. Add Preprocessing
    3. Taylor expanded in U* around inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om}} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{\ell \cdot \left(n \cdot \sqrt{2}\right)}}{Om} \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

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

        \[\leadsto \frac{\ell \cdot \left(n \cdot \color{blue}{\sqrt{2}}\right)}{Om} \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

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

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

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

    if 1.04999999999999998e-254 < Om

    1. Initial program 54.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.45 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.05 \cdot 10^{-254}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 47.9% accurate, 2.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -3.5 \cdot 10^{-169}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.36 \cdot 10^{-254}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(l\_m \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -3.5e-169)
   (sqrt (* U (* (* 2.0 n) (fma l_m (/ (* l_m -2.0) Om) t))))
   (if (<= Om 1.36e-254)
     (* (sqrt (* U U*)) (* l_m (/ (* n (sqrt 2.0)) Om)))
     (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 (Om <= -3.5e-169) {
		tmp = sqrt((U * ((2.0 * n) * fma(l_m, ((l_m * -2.0) / Om), t))));
	} else if (Om <= 1.36e-254) {
		tmp = sqrt((U * U_42_)) * (l_m * ((n * sqrt(2.0)) / Om));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Om <= -3.5e-169)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * fma(l_m, Float64(Float64(l_m * -2.0) / Om), t))));
	elseif (Om <= 1.36e-254)
		tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l_m * Float64(Float64(n * sqrt(2.0)) / Om)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -3.5e-169], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(l$95$m * N[(N[(l$95$m * -2.0), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.36e-254], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3.5 \cdot 10^{-169}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(l\_m, \frac{l\_m \cdot -2}{Om}, t\right)\right)}\\

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

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


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

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6442.5

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot \frac{-2}{Om} + t\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \color{blue}{\frac{-2}{Om}} + t\right)} \]
      5. lift-fma.f64N/A

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

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

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

        \[\leadsto \sqrt{\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right)} \]
      9. lift-*.f64N/A

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right) \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      12. lower-*.f64N/A

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

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

    if -3.5000000000000003e-169 < Om < 1.35999999999999993e-254

    1. Initial program 31.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      4. lower-/.f64N/A

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

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{n \cdot \sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      7. lower-sqrt.f64N/A

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

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

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

    if 1.35999999999999993e-254 < Om

    1. Initial program 54.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -3.5 \cdot 10^{-169}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\ell, \frac{\ell \cdot -2}{Om}, t\right)\right)}\\ \mathbf{elif}\;Om \leq 1.36 \cdot 10^{-254}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 42.5% accurate, 3.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 3.95 \cdot 10^{-146}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;l\_m \leq 1.28 \cdot 10^{+33}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \cdot \left(\frac{l\_m}{Om} \cdot \left(l\_m \cdot -2\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 3.95e-146)
   (sqrt (* 2.0 (* t (* n U))))
   (if (<= l_m 1.28e+33)
     (sqrt (* 2.0 (* U (* n t))))
     (sqrt (* (* U (* 2.0 n)) (* (/ l_m Om) (* 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 tmp;
	if (l_m <= 3.95e-146) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 1.28e+33) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt(((U * (2.0 * n)) * ((l_m / Om) * (l_m * -2.0))));
	}
	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 (l_m <= 3.95d-146) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else if (l_m <= 1.28d+33) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt(((u * (2.0d0 * n)) * ((l_m / om) * (l_m * (-2.0d0)))))
    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 (l_m <= 3.95e-146) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 1.28e+33) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt(((U * (2.0 * n)) * ((l_m / Om) * (l_m * -2.0))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 3.95e-146:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	elif l_m <= 1.28e+33:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt(((U * (2.0 * n)) * ((l_m / Om) * (l_m * -2.0))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 3.95e-146)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	elseif (l_m <= 1.28e+33)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(Float64(U * Float64(2.0 * n)) * Float64(Float64(l_m / Om) * Float64(l_m * -2.0))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 3.95e-146)
		tmp = sqrt((2.0 * (t * (n * U))));
	elseif (l_m <= 1.28e+33)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt(((U * (2.0 * n)) * ((l_m / Om) * (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$_] := If[LessEqual[l$95$m, 3.95e-146], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.28e+33], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l\_m \leq 1.28 \cdot 10^{+33}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

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

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

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

    if 3.95000000000000006e-146 < l < 1.28e33

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6435.5

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6435.5

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

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

    if 1.28e33 < l

    1. Initial program 22.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6421.7

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}}} \]
      2. lower-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{\left(\ell \cdot -2\right)} \cdot \ell}{Om}} \]
      3. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(\ell \cdot -2\right) \cdot \frac{\ell}{Om}\right)}} \]
      5. lift-/.f64N/A

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

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

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

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

Alternative 18: 40.4% accurate, 3.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 5.1 \cdot 10^{-146}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;l\_m \leq 5.2 \cdot 10^{+29}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(-2 \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 5.1e-146)
   (sqrt (* 2.0 (* t (* n U))))
   (if (<= l_m 5.2e+29)
     (sqrt (* 2.0 (* U (* n t))))
     (sqrt (* U (* (* 2.0 n) (* -2.0 (/ (* l_m l_m) Om))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 5.1e-146) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 5.2e+29) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((U * ((2.0 * n) * (-2.0 * ((l_m * l_m) / 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 (l_m <= 5.1d-146) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else if (l_m <= 5.2d+29) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt((u * ((2.0d0 * n) * ((-2.0d0) * ((l_m * l_m) / 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 (l_m <= 5.1e-146) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 5.2e+29) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((U * ((2.0 * n) * (-2.0 * ((l_m * l_m) / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 5.1e-146:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	elif l_m <= 5.2e+29:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((U * ((2.0 * n) * (-2.0 * ((l_m * l_m) / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 5.1e-146)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	elseif (l_m <= 5.2e+29)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(-2.0 * Float64(Float64(l_m * l_m) / 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 (l_m <= 5.1e-146)
		tmp = sqrt((2.0 * (t * (n * U))));
	elseif (l_m <= 5.2e+29)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((U * ((2.0 * n) * (-2.0 * ((l_m * l_m) / Om)))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5.1e-146], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 5.2e+29], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(-2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l\_m \leq 5.2 \cdot 10^{+29}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


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

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

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

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

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

    if 5.09999999999999965e-146 < l < 5.2e29

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6435.5

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6435.5

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

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

    if 5.2e29 < l

    1. Initial program 22.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. Add Preprocessing
    3. Taylor expanded in Om around inf

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6421.7

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}}} \]
      2. lower-/.f64N/A

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{-2 \cdot \color{blue}{\left(\ell \cdot \ell\right)}}{Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \frac{\color{blue}{-2 \cdot \left(\ell \cdot \ell\right)}}{Om}} \]
      4. lift-/.f64N/A

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

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \cdot \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)}} \]
      6. lift-*.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om} \cdot \left(n \cdot 2\right)\right) \cdot U}} \]
      14. lower-*.f64N/A

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

        \[\leadsto \sqrt{\color{blue}{\left(\frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om} \cdot \left(n \cdot 2\right)\right)} \cdot U} \]
      16. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}} \cdot \left(n \cdot 2\right)\right) \cdot U} \]
      17. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\color{blue}{\left(-2 \cdot \frac{\ell \cdot \ell}{Om}\right)} \cdot \left(n \cdot 2\right)\right) \cdot U} \]
      19. lift-/.f64N/A

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

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

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

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

Alternative 19: 39.6% accurate, 3.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-126}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;t \leq 2.05 \cdot 10^{-218}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \frac{2 \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot U} \cdot \sqrt{2 \cdot t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= t -2.7e-126)
   (sqrt (* 2.0 (* U (* n t))))
   (if (<= t 2.05e-218)
     (sqrt (* -2.0 (* (* n U) (/ (* 2.0 (* l_m l_m)) Om))))
     (* (sqrt (* n U)) (sqrt (* 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 (t <= -2.7e-126) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else if (t <= 2.05e-218) {
		tmp = sqrt((-2.0 * ((n * U) * ((2.0 * (l_m * l_m)) / Om))));
	} else {
		tmp = sqrt((n * U)) * sqrt((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 (t <= (-2.7d-126)) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else if (t <= 2.05d-218) then
        tmp = sqrt(((-2.0d0) * ((n * u) * ((2.0d0 * (l_m * l_m)) / om))))
    else
        tmp = sqrt((n * u)) * sqrt((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 (t <= -2.7e-126) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else if (t <= 2.05e-218) {
		tmp = Math.sqrt((-2.0 * ((n * U) * ((2.0 * (l_m * l_m)) / Om))));
	} else {
		tmp = Math.sqrt((n * U)) * Math.sqrt((2.0 * t));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if t <= -2.7e-126:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	elif t <= 2.05e-218:
		tmp = math.sqrt((-2.0 * ((n * U) * ((2.0 * (l_m * l_m)) / Om))))
	else:
		tmp = math.sqrt((n * U)) * math.sqrt((2.0 * t))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (t <= -2.7e-126)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	elseif (t <= 2.05e-218)
		tmp = sqrt(Float64(-2.0 * Float64(Float64(n * U) * Float64(Float64(2.0 * Float64(l_m * l_m)) / Om))));
	else
		tmp = Float64(sqrt(Float64(n * U)) * sqrt(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 (t <= -2.7e-126)
		tmp = sqrt((2.0 * (U * (n * t))));
	elseif (t <= 2.05e-218)
		tmp = sqrt((-2.0 * ((n * U) * ((2.0 * (l_m * l_m)) / Om))));
	else
		tmp = sqrt((n * U)) * sqrt((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[t, -2.7e-126], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 2.05e-218], N[Sqrt[N[(-2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.69999999999999995e-126

    1. Initial program 44.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

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

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

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

    if -2.69999999999999995e-126 < t < 2.0499999999999999e-218

    1. Initial program 44.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. Add Preprocessing
    3. Taylor expanded in t around 0

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

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

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

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

        \[\leadsto \sqrt{-2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      5. lower-*.f64N/A

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

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

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

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      9. metadata-evalN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om} + \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      10. cancel-sign-sub-invN/A

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

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om} - \color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}}\right)\right)} \]
      12. div-subN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om} - -2 \cdot {\ell}^{2}}{Om}}\right)} \]
      13. lower-/.f64N/A

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

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

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

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

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

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

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

    if 2.0499999999999999e-218 < t

    1. Initial program 51.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right) \cdot 2}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right)} \cdot 2} \]
      5. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(t \cdot 2\right)}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{n \cdot U} \cdot \sqrt{t \cdot 2}} \]
      7. pow1/2N/A

        \[\leadsto \color{blue}{{\left(n \cdot U\right)}^{\frac{1}{2}}} \cdot \sqrt{t \cdot 2} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{{\left(n \cdot U\right)}^{\frac{1}{2}} \cdot \sqrt{t \cdot 2}} \]
      9. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot U}} \cdot \sqrt{t \cdot 2} \]
      10. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot U}} \cdot \sqrt{t \cdot 2} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{n \cdot U}} \cdot \sqrt{t \cdot 2} \]
      12. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{U \cdot n}} \cdot \sqrt{t \cdot 2} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{U \cdot n}} \cdot \sqrt{t \cdot 2} \]
      14. lower-sqrt.f64N/A

        \[\leadsto \sqrt{U \cdot n} \cdot \color{blue}{\sqrt{t \cdot 2}} \]
      15. lower-*.f6444.5

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

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

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

Alternative 20: 41.0% accurate, 3.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 7.7 \cdot 10^{-146}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;l\_m \leq 6 \cdot 10^{+32}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-4 \cdot \left(U \cdot \frac{n \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 7.7e-146)
   (sqrt (* 2.0 (* t (* n U))))
   (if (<= l_m 6e+32)
     (sqrt (* 2.0 (* U (* n t))))
     (sqrt (* -4.0 (* U (/ (* n (* l_m l_m)) Om)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 7.7e-146) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 6e+32) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((-4.0 * (U * ((n * (l_m * l_m)) / 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 (l_m <= 7.7d-146) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else if (l_m <= 6d+32) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt(((-4.0d0) * (u * ((n * (l_m * l_m)) / 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 (l_m <= 7.7e-146) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else if (l_m <= 6e+32) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((-4.0 * (U * ((n * (l_m * l_m)) / Om))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 7.7e-146:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	elif l_m <= 6e+32:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((-4.0 * (U * ((n * (l_m * l_m)) / Om))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 7.7e-146)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	elseif (l_m <= 6e+32)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(-4.0 * Float64(U * Float64(Float64(n * Float64(l_m * l_m)) / 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 (l_m <= 7.7e-146)
		tmp = sqrt((2.0 * (t * (n * U))));
	elseif (l_m <= 6e+32)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((-4.0 * (U * ((n * (l_m * l_m)) / Om))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 7.7e-146], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6e+32], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-4.0 * N[(U * N[(N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l\_m \leq 6 \cdot 10^{+32}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \left(U \cdot \frac{n \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 7.69999999999999997e-146

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6438.7

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified38.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]

    if 7.69999999999999997e-146 < l < 6e32

    1. Initial program 62.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6435.5

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified35.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(t \cdot \color{blue}{\left(n \cdot U\right)}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6435.5

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot n\right)} \cdot U\right)} \]
    7. Applied egg-rr35.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]

    if 6e32 < l

    1. Initial program 22.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. Add Preprocessing
    3. Taylor expanded in t around 0

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{-2 \cdot \left(U \cdot \left(n \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{-2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{-2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{-2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{-2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)} \]
      6. +-commutativeN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      7. unpow2N/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{\color{blue}{Om \cdot Om}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      8. associate-/r*N/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om}} + 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      9. metadata-evalN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om} + \color{blue}{\left(\mathsf{neg}\left(-2\right)\right)} \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      10. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left(\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om} - -2 \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      11. associate-*r/N/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om} - \color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}}\right)\right)} \]
      12. div-subN/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om} - -2 \cdot {\ell}^{2}}{Om}}\right)} \]
      13. lower-/.f64N/A

        \[\leadsto \sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\frac{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om} - -2 \cdot {\ell}^{2}}{Om}}\right)} \]
    5. Simplified35.5%

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \left(\left(n \cdot U\right) \cdot \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om}\right)}} \]
    6. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. associate-/l*N/A

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\left(U \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\left(U \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}} \]
      4. lower-/.f64N/A

        \[\leadsto \sqrt{-4 \cdot \left(U \cdot \color{blue}{\frac{{\ell}^{2} \cdot n}{Om}}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{-4 \cdot \left(U \cdot \frac{\color{blue}{{\ell}^{2} \cdot n}}{Om}\right)} \]
      6. unpow2N/A

        \[\leadsto \sqrt{-4 \cdot \left(U \cdot \frac{\color{blue}{\left(\ell \cdot \ell\right)} \cdot n}{Om}\right)} \]
      7. lower-*.f6419.2

        \[\leadsto \sqrt{-4 \cdot \left(U \cdot \frac{\color{blue}{\left(\ell \cdot \ell\right)} \cdot n}{Om}\right)} \]
    8. Simplified19.2%

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \left(U \cdot \frac{\left(\ell \cdot \ell\right) \cdot n}{Om}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification33.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 7.7 \cdot 10^{-146}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;\ell \leq 6 \cdot 10^{+32}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-4 \cdot \left(U \cdot \frac{n \cdot \left(\ell \cdot \ell\right)}{Om}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 47.9% accurate, 3.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -5.1 \cdot 10^{-92}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U -5.1e-92)
   (sqrt (* (* 2.0 U) (* n (fma (* l_m l_m) (/ -2.0 Om) t))))
   (sqrt (* (* 2.0 n) (* U (fma (/ l_m Om) (* l_m -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 <= -5.1e-92) {
		tmp = sqrt(((2.0 * U) * (n * fma((l_m * l_m), (-2.0 / Om), t))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * fma((l_m / Om), (l_m * -2.0), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= -5.1e-92)
		tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * fma(Float64(l_m / Om), Float64(l_m * -2.0), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -5.1e-92], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m * -2.0), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq -5.1 \cdot 10^{-92}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, l\_m \cdot -2, t\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -5.09999999999999972e-92

    1. Initial program 66.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. Add Preprocessing
    3. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      5. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      6. metadata-evalN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}\right)} \]
      8. associate-*r/N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)\right)} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)\right)} \]
      10. associate-/l*N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)\right)} \]
      11. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}\right)} \]
      12. unpow2N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)\right)} \]
      14. lower-/.f6457.7

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)\right)} \]
    5. Simplified57.7%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)\right)}} \]

    if -5.09999999999999972e-92 < U

    1. Initial program 40.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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell \cdot \ell}{Om}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - \color{blue}{2 \cdot \frac{\ell \cdot \ell}{Om}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      4. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      5. lift-/.f64N/A

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)} \]
      8. lift--.f64N/A

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      10. sub-negN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    4. Applied egg-rr47.8%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \left(n \cdot \frac{\ell}{Om}\right), \frac{\ell}{Om}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    5. Applied egg-rr56.8%

      \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(U - U*, -\frac{n \cdot \ell}{Om}, \ell \cdot -2\right), t\right)\right)}} \]
    6. Taylor expanded in n around 0

      \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \color{blue}{-2 \cdot \ell}, t\right)\right)} \]
    7. Step-by-step derivation
      1. lower-*.f6440.8

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \color{blue}{-2 \cdot \ell}, t\right)\right)} \]
    8. Simplified40.8%

      \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \color{blue}{-2 \cdot \ell}, t\right)\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -5.1 \cdot 10^{-92}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 22: 45.6% accurate, 3.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.38 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 1.38e-145)
   (sqrt (* 2.0 (* t (* n U))))
   (sqrt (* (* 2.0 U) (* n (fma (* l_m l_m) (/ -2.0 Om) t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 1.38e-145) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = sqrt(((2.0 * U) * (n * fma((l_m * l_m), (-2.0 / Om), t))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 1.38e-145)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	else
		tmp = sqrt(Float64(Float64(2.0 * U) * Float64(n * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.38e-145], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.38 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.38e-145

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6438.7

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified38.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]

    if 1.38e-145 < l

    1. Initial program 37.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. Add Preprocessing
    3. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \]
      5. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      6. metadata-evalN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \]
      7. +-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}\right)} \]
      8. associate-*r/N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)\right)} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)\right)} \]
      10. associate-/l*N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)\right)} \]
      11. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}\right)} \]
      12. unpow2N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)\right)} \]
      13. lower-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)\right)} \]
      14. lower-/.f6430.5

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)\right)} \]
    5. Simplified30.5%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification35.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.38 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 23: 39.4% accurate, 4.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq 1.22 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U 1.22e-297)
   (sqrt (* 2.0 (* t (* n U))))
   (* (sqrt (* n t)) (sqrt (* 2.0 U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 1.22e-297) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	}
	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 <= 1.22d-297) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else
        tmp = sqrt((n * t)) * sqrt((2.0d0 * u))
    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 <= 1.22e-297) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = Math.sqrt((n * t)) * Math.sqrt((2.0 * U));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= 1.22e-297:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	else:
		tmp = math.sqrt((n * t)) * math.sqrt((2.0 * U))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= 1.22e-297)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	else
		tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U)));
	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 <= 1.22e-297)
		tmp = sqrt((2.0 * (t * (n * U))));
	else
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.22e-297], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.22 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 1.22000000000000002e-297

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6436.4

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified36.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]

    if 1.22000000000000002e-297 < U

    1. Initial program 49.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6428.1

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified28.1%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(t \cdot \color{blue}{\left(n \cdot U\right)}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6432.4

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot n\right)} \cdot U\right)} \]
    7. Applied egg-rr32.4%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
    8. Step-by-step derivation
      1. associate-*l*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
      3. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t}} \]
      4. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      9. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      10. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot n\right)} \cdot U\right)} \]
      14. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(t \cdot n\right)\right) \cdot U}} \]
      15. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{U \cdot \left(2 \cdot \left(t \cdot n\right)\right)}} \]
      16. *-commutativeN/A

        \[\leadsto \sqrt{U \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot 2\right)}} \]
      17. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(t \cdot n\right)\right) \cdot 2}} \]
      18. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(t \cdot n\right) \cdot U\right)} \cdot 2} \]
      19. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(t \cdot n\right) \cdot \left(U \cdot 2\right)}} \]
      20. *-commutativeN/A

        \[\leadsto \sqrt{\left(t \cdot n\right) \cdot \color{blue}{\left(2 \cdot U\right)}} \]
      21. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{t \cdot n} \cdot \sqrt{2 \cdot U}} \]
      22. pow1/2N/A

        \[\leadsto \color{blue}{{\left(t \cdot n\right)}^{\frac{1}{2}}} \cdot \sqrt{2 \cdot U} \]
    9. Applied egg-rr37.7%

      \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{U \cdot 2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 1.22 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \]
  5. Add Preprocessing

Alternative 24: 39.4% accurate, 4.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq 1.9 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U 1.9e-297)
   (sqrt (* 2.0 (* t (* n U))))
   (* (sqrt (* 2.0 (* n t))) (sqrt U))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 1.9e-297) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = sqrt((2.0 * (n * t))) * sqrt(U);
	}
	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 <= 1.9d-297) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else
        tmp = sqrt((2.0d0 * (n * t))) * sqrt(u)
    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 <= 1.9e-297) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = Math.sqrt((2.0 * (n * t))) * Math.sqrt(U);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= 1.9e-297:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	else:
		tmp = math.sqrt((2.0 * (n * t))) * math.sqrt(U)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= 1.9e-297)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	else
		tmp = Float64(sqrt(Float64(2.0 * Float64(n * t))) * sqrt(U));
	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 <= 1.9e-297)
		tmp = sqrt((2.0 * (t * (n * U))));
	else
		tmp = sqrt((2.0 * (n * t))) * sqrt(U);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 1.9e-297], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.9 \cdot 10^{-297}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 1.90000000000000002e-297

    1. Initial program 46.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6436.4

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified36.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]

    if 1.90000000000000002e-297 < U

    1. Initial program 49.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Applied egg-rr50.8%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(\frac{\ell \cdot \ell}{Om \cdot Om} \cdot \left(U - U*\right), -n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot \left(2 \cdot n\right)} \cdot \sqrt{U}} \]
    4. Taylor expanded in l around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot t\right)}} \cdot \sqrt{U} \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot t\right)}} \cdot \sqrt{U} \]
      2. lower-*.f6437.7

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot t\right)}} \cdot \sqrt{U} \]
    6. Simplified37.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot t\right)}} \cdot \sqrt{U} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 1.9 \cdot 10^{-297}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot t\right)} \cdot \sqrt{U}\\ \end{array} \]
  5. Add Preprocessing

Alternative 25: 38.6% accurate, 4.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;n \leq 9.8 \cdot 10^{-234}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= n 9.8e-234)
   (sqrt (* 2.0 (* U (* n t))))
   (* (sqrt n) (sqrt (* 2.0 (* U t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (n <= 9.8e-234) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt(n) * sqrt((2.0 * (U * 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 (n <= 9.8d-234) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt(n) * sqrt((2.0d0 * (u * 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 (n <= 9.8e-234) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt(n) * Math.sqrt((2.0 * (U * t)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if n <= 9.8e-234:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt(n) * math.sqrt((2.0 * (U * t)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (n <= 9.8e-234)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(U * 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 (n <= 9.8e-234)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt(n) * sqrt((2.0 * (U * t)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[n, 9.8e-234], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;n \leq 9.8 \cdot 10^{-234}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 9.80000000000000015e-234

    1. Initial program 45.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6432.5

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified32.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(t \cdot \color{blue}{\left(n \cdot U\right)}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6434.0

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot n\right)} \cdot U\right)} \]
    7. Applied egg-rr34.0%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]

    if 9.80000000000000015e-234 < n

    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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6433.4

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified33.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right) \cdot 2}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot t\right)} \cdot 2} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(n \cdot U\right)} \cdot t\right) \cdot 2} \]
      6. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(U \cdot t\right)\right)} \cdot 2} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(\left(U \cdot t\right) \cdot 2\right)}} \]
      8. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{n} \cdot \sqrt{\left(U \cdot t\right) \cdot 2}} \]
      9. pow1/2N/A

        \[\leadsto \color{blue}{{n}^{\frac{1}{2}}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{{n}^{\frac{1}{2}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2}} \]
      11. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      12. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n}} \cdot \sqrt{\left(U \cdot t\right) \cdot 2} \]
      13. lower-sqrt.f64N/A

        \[\leadsto \sqrt{n} \cdot \color{blue}{\sqrt{\left(U \cdot t\right) \cdot 2}} \]
      14. lower-*.f64N/A

        \[\leadsto \sqrt{n} \cdot \sqrt{\color{blue}{\left(U \cdot t\right) \cdot 2}} \]
      15. lower-*.f6439.5

        \[\leadsto \sqrt{n} \cdot \sqrt{\color{blue}{\left(U \cdot t\right)} \cdot 2} \]
    7. Applied egg-rr39.5%

      \[\leadsto \color{blue}{\sqrt{n} \cdot \sqrt{\left(U \cdot t\right) \cdot 2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification36.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq 9.8 \cdot 10^{-234}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 26: 37.2% accurate, 5.6× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 3.8 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 3.8e-145)
   (sqrt (* 2.0 (* t (* n U))))
   (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_) {
	double tmp;
	if (l_m <= 3.8e-145) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = sqrt((2.0 * (U * (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 (l_m <= 3.8d-145) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else
        tmp = sqrt((2.0d0 * (u * (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 (l_m <= 3.8e-145) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 3.8e-145:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	else:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 3.8e-145)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	else
		tmp = sqrt(Float64(2.0 * Float64(U * 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 (l_m <= 3.8e-145)
		tmp = sqrt((2.0 * (t * (n * U))));
	else
		tmp = sqrt((2.0 * (U * (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[l$95$m, 3.8e-145], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3.8 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 3.8000000000000002e-145

    1. Initial program 53.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6438.5

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified38.5%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]

    if 3.8000000000000002e-145 < l

    1. Initial program 37.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. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      5. lower-*.f6422.4

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. Simplified22.4%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(t \cdot \left(n \cdot U\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(t \cdot \color{blue}{\left(n \cdot U\right)}\right)} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
      6. lower-*.f6424.7

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(t \cdot n\right)} \cdot U\right)} \]
    7. Applied egg-rr24.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(t \cdot n\right) \cdot U\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification33.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.8 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 27: 36.5% accurate, 6.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* t (* n U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt((2.0 * (t * (n * U))));
}
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 * (t * (n * u))))
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 * (t * (n * U))));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((2.0 * (t * (n * U))))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(t * Float64(n * U))))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((2.0 * (t * (n * U))));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Derivation
  1. Initial program 47.6%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  4. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. associate-*r*N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
    3. lower-*.f64N/A

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
    4. *-commutativeN/A

      \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    5. lower-*.f6432.9

      \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
  5. Simplified32.9%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}} \]
  6. Final simplification32.9%

    \[\leadsto \sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2024207 
(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*))))))