Toniolo and Linder, Equation (13)

Percentage Accurate: 48.8% → 62.7%
Time: 20.8s
Alternatives: 17
Speedup: 0.4×

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

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

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

Alternative 1: 62.7% accurate, 0.4× speedup?

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

\mathbf{elif}\;t\_3 \leq 10^{+307}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(\frac{U* \cdot l\_m}{Om}, \frac{l\_m}{Om} \cdot n, t\_1\right)}\\

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

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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-rr99.2%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(0 - \left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \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}{\frac{U* \cdot \ell}{Om}}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.8% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := 2 \cdot \left(n \cdot U\right)\\ t_2 := t\_1 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ t_3 := n \cdot \left(U* - U\right)\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-94}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(\frac{l\_m}{Om}, \mathsf{fma}\left(\frac{l\_m}{Om}, t\_3, l\_m \cdot -2\right), t\right)}\\ \mathbf{elif}\;t\_2 \leq 10^{+307}:\\ \;\;\;\;\sqrt{t\_1 \cdot \left(t - \frac{\left(l\_m \cdot l\_m\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(\frac{t\_3}{Om \cdot Om} - \frac{2}{Om}\right)} \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 (* 2.0 (* n U)))
        (t_2
         (*
          t_1
          (-
           (- t (* 2.0 (/ (* l_m l_m) Om)))
           (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
        (t_3 (* n (- U* U))))
   (if (<= t_2 0.0)
     (sqrt (* n (* (fma l_m (* -2.0 (/ l_m Om)) t) (* 2.0 U))))
     (if (<= t_2 2e-94)
       (sqrt (* t_1 (fma (/ l_m Om) (fma (/ l_m Om) t_3 (* l_m -2.0)) t)))
       (if (<= t_2 1e+307)
         (sqrt
          (* t_1 (- t (/ (* (* l_m l_m) (fma n (/ (- U U*) Om) 2.0)) Om))))
         (*
          (sqrt (* (* n U) (- (/ t_3 (* Om 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 = 2.0 * (n * U);
	double t_2 = t_1 * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)));
	double t_3 = n * (U_42_ - U);
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt((n * (fma(l_m, (-2.0 * (l_m / Om)), t) * (2.0 * U))));
	} else if (t_2 <= 2e-94) {
		tmp = sqrt((t_1 * fma((l_m / Om), fma((l_m / Om), t_3, (l_m * -2.0)), t)));
	} else if (t_2 <= 1e+307) {
		tmp = sqrt((t_1 * (t - (((l_m * l_m) * fma(n, ((U - U_42_) / Om), 2.0)) / Om))));
	} else {
		tmp = sqrt(((n * U) * ((t_3 / (Om * 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(2.0 * Float64(n * U))
	t_2 = Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))
	t_3 = Float64(n * Float64(U_42_ - U))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = sqrt(Float64(n * Float64(fma(l_m, Float64(-2.0 * Float64(l_m / Om)), t) * Float64(2.0 * U))));
	elseif (t_2 <= 2e-94)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m / Om), fma(Float64(l_m / Om), t_3, Float64(l_m * -2.0)), t)));
	elseif (t_2 <= 1e+307)
		tmp = sqrt(Float64(t_1 * Float64(t - Float64(Float64(Float64(l_m * l_m) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)) / Om))));
	else
		tmp = Float64(sqrt(Float64(Float64(n * U) * Float64(Float64(t_3 / Float64(Om * Om)) - Float64(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[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(n * N[(N[(l$95$m * N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 2e-94], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * t$95$3 + N[(l$95$m * -2.0), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 1e+307], N[Sqrt[N[(t$95$1 * N[(t - N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(t$95$3 / N[(Om * Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $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 := 2 \cdot \left(n \cdot U\right)\\
t_2 := t\_1 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
t_3 := n \cdot \left(U* - U\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*)))) < 0.0

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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.9999999999999999e-94

    1. Initial program 98.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-rr98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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 0

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      3. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      5. metadata-evalN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      7. associate-*r/N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      8. div-subN/A

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 60.4% accurate, 0.3× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*)))) < 0.0

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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.9999999999999999e-94

    1. Initial program 98.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-rr98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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 0

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      3. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      5. metadata-evalN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      7. associate-*r/N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      8. div-subN/A

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(0 - \left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \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}{\frac{U* \cdot \ell}{Om}}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 58.6% accurate, 0.3× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*)))) < 0.0

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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.9999999999999999e-94

    1. Initial program 98.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-rr98.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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 0

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      3. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      5. metadata-evalN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      7. associate-*r/N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      8. div-subN/A

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 49.0% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\left(n \cdot U\right) \cdot \frac{\left(l\_m \cdot l\_m\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\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 14.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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*))))) < +inf.0

    1. Initial program 66.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.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*)))))

    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. 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. Simplified28.4%

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

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

Alternative 6: 61.3% accurate, 0.4× speedup?

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

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

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

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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-rr99.2%

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 58.1% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \sqrt{\left(n \cdot \mathsf{fma}\left(n, \frac{U* - U}{Om \cdot Om}, \frac{-2}{Om}\right)\right) \cdot \left(2 \cdot U\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*)))) < 0.0

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(t - \left(2 \cdot \frac{{\ell}^{2}}{Om} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{{Om}^{2}}\right)\right)}} \]
    4. Step-by-step derivation
      1. lower--.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      3. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      4. associate-/r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      5. metadata-evalN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      7. associate-*r/N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \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)} \]
      8. div-subN/A

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

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

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

    if 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.7% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \sqrt{\left(n \cdot \mathsf{fma}\left(n, \frac{U* - U}{Om \cdot Om}, \frac{-2}{Om}\right)\right) \cdot \left(2 \cdot U\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*)))) < 0.0

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*)))) < 9.99999999999999986e306

    1. Initial program 98.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-/.f6487.9

        \[\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. Simplified87.9%

      \[\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 9.99999999999999986e306 < (*.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 20.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-rr26.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 36.7% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\ t_2 := \sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+153}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \frac{-4 \cdot \left(U \cdot \left(l\_m \cdot l\_m\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
         (sqrt
          (*
           (* 2.0 (* n U))
           (-
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
        (t_2 (sqrt (* (* (* 2.0 U) t) n))))
   (if (<= t_1 0.0)
     t_2
     (if (<= t_1 5e+153) t_2 (sqrt (* n (/ (* -4.0 (* U (* 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 t_1 = sqrt(((2.0 * (n * U)) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double t_2 = sqrt((((2.0 * U) * t) * n));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = t_2;
	} else if (t_1 <= 5e+153) {
		tmp = t_2;
	} else {
		tmp = sqrt((n * ((-4.0 * (U * (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sqrt(((2.0d0 * (n * u)) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42)))))
    t_2 = sqrt((((2.0d0 * u) * t) * n))
    if (t_1 <= 0.0d0) then
        tmp = t_2
    else if (t_1 <= 5d+153) then
        tmp = t_2
    else
        tmp = sqrt((n * (((-4.0d0) * (u * (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 t_1 = Math.sqrt(((2.0 * (n * U)) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double t_2 = Math.sqrt((((2.0 * U) * t) * n));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = t_2;
	} else if (t_1 <= 5e+153) {
		tmp = t_2;
	} else {
		tmp = Math.sqrt((n * ((-4.0 * (U * (l_m * l_m))) / Om)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt(((2.0 * (n * U)) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_)))))
	t_2 = math.sqrt((((2.0 * U) * t) * n))
	tmp = 0
	if t_1 <= 0.0:
		tmp = t_2
	elif t_1 <= 5e+153:
		tmp = t_2
	else:
		tmp = math.sqrt((n * ((-4.0 * (U * (l_m * l_m))) / Om)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	t_2 = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = t_2;
	elseif (t_1 <= 5e+153)
		tmp = t_2;
	else
		tmp = sqrt(Float64(n * Float64(Float64(-4.0 * Float64(U * 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_)
	t_1 = sqrt(((2.0 * (n * U)) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_)))));
	t_2 = sqrt((((2.0 * U) * t) * n));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = t_2;
	elseif (t_1 <= 5e+153)
		tmp = t_2;
	else
		tmp = sqrt((n * ((-4.0 * (U * (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$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], t$95$2, If[LessEqual[t$95$1, 5e+153], t$95$2, N[Sqrt[N[(n * N[(N[(-4.0 * N[(U * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \frac{-4 \cdot \left(U \cdot \left(l\_m \cdot l\_m\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 14.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{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.00000000000000018e153

    1. Initial program 98.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 inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\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 t\right)}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000018e153 < (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 19.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 l around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 37.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+153}:\\
\;\;\;\;t\_2\\

\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \left(U \cdot \frac{\left(l\_m \cdot l\_m\right) \cdot n}{Om}\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 14.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. associate-*r*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.00000000000000018e153

    1. Initial program 98.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 inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\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 t\right)}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000018e153 < (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 19.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 l around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
    10. 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-*.f6416.4

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

      \[\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 simplification36.3%

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

Alternative 11: 47.8% accurate, 0.4× speedup?

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

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

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

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

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*)))) < +inf.0

    1. Initial program 66.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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. Simplified21.7%

      \[\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}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification46.2%

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

Alternative 12: 47.3% accurate, 0.4× speedup?

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

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

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

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

    1. Initial program 12.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
    8. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
      2. lower-*.f6442.7

        \[\leadsto \left(\sqrt{\color{blue}{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
    9. Simplified42.7%

      \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]

    if 0.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*)))) < +inf.0

    1. Initial program 66.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 n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6457.0

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr29.4%

      \[\leadsto \color{blue}{\left(\sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)} \cdot \sqrt{n}\right)} \cdot \sqrt{2} \]
    7. Applied egg-rr60.5%

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot \left(n \cdot 2\right)\right) \cdot \mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{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. Taylor expanded in U* around -inf

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om} \cdot \sqrt{U \cdot U*}\right)} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \color{blue}{\mathsf{neg}\left(\frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om} \cdot \sqrt{U \cdot U*}\right)} \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\sqrt{U \cdot U*} \cdot \frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right)\right)} \]
      4. mul-1-negN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(-1 \cdot \frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot U*} \cdot \left(-1 \cdot \frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right)} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot U*}} \cdot \left(-1 \cdot \frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right) \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{U \cdot U*}} \cdot \left(-1 \cdot \frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right) \]
      8. mul-1-negN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right)\right)} \]
      9. lower-neg.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\mathsf{neg}\left(\frac{\ell \cdot \left(n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)\right)}{Om}\right)\right)} \]
      10. associate-/l*N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\color{blue}{\ell \cdot \frac{n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)}{Om}}\right)\right) \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\color{blue}{\ell \cdot \frac{n \cdot \left({\left(\sqrt{-1}\right)}^{2} \cdot \sqrt{2}\right)}{Om}}\right)\right) \]
      12. associate-*r*N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \frac{\color{blue}{\left(n \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \sqrt{2}}}{Om}\right)\right) \]
      13. associate-/l*N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \color{blue}{\left(\left(n \cdot {\left(\sqrt{-1}\right)}^{2}\right) \cdot \frac{\sqrt{2}}{Om}\right)}\right)\right) \]
    5. Simplified31.3%

      \[\leadsto \color{blue}{\sqrt{U \cdot U*} \cdot \left(-\ell \cdot \left(\left(-n\right) \cdot \frac{\sqrt{2}}{Om}\right)\right)} \]
    6. Step-by-step derivation
      1. lift-neg.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \left(\color{blue}{\left(\mathsf{neg}\left(n\right)\right)} \cdot \frac{\sqrt{2}}{Om}\right)\right)\right) \]
      2. lift-sqrt.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \left(\left(\mathsf{neg}\left(n\right)\right) \cdot \frac{\color{blue}{\sqrt{2}}}{Om}\right)\right)\right) \]
      3. lift-/.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \left(\left(\mathsf{neg}\left(n\right)\right) \cdot \color{blue}{\frac{\sqrt{2}}{Om}}\right)\right)\right) \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\mathsf{neg}\left(\ell \cdot \color{blue}{\left(\left(\mathsf{neg}\left(n\right)\right) \cdot \frac{\sqrt{2}}{Om}\right)}\right)\right) \]
      5. distribute-rgt-neg-inN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\ell \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(n\right)\right) \cdot \frac{\sqrt{2}}{Om}\right)\right)\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(n\right)\right) \cdot \frac{\sqrt{2}}{Om}}\right)\right)\right) \]
      7. lift-neg.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(n\right)\right)} \cdot \frac{\sqrt{2}}{Om}\right)\right)\right) \]
      8. distribute-lft-neg-outN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(\mathsf{neg}\left(\color{blue}{\left(\mathsf{neg}\left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)}\right)\right)\right) \]
      9. remove-double-negN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\ell \cdot \color{blue}{\left(n \cdot \frac{\sqrt{2}}{Om}\right)}\right) \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \ell\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \ell\right)} \]
      12. lower-*.f6431.3

        \[\leadsto \sqrt{U \cdot U*} \cdot \left(\color{blue}{\left(n \cdot \frac{\sqrt{2}}{Om}\right)} \cdot \ell\right) \]
    7. Applied egg-rr31.3%

      \[\leadsto \sqrt{U \cdot U*} \cdot \color{blue}{\left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \ell\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification48.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq 0:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \mathbf{elif}\;\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \ell\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 45.6% accurate, 0.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (sqrt
       (*
        (* 2.0 (* n U))
        (-
         (- t (* 2.0 (/ (* l_m l_m) Om)))
         (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))
      0.0)
   (sqrt (* (* (* 2.0 U) t) n))
   (sqrt (* n (* (fma l_m (* -2.0 (/ l_m Om)) t) (* 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 (sqrt(((2.0 * (n * U)) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_))))) <= 0.0) {
		tmp = sqrt((((2.0 * U) * t) * n));
	} else {
		tmp = sqrt((n * (fma(l_m, (-2.0 * (l_m / Om)), t) * (2.0 * U))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_))))) <= 0.0)
		tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n));
	else
		tmp = sqrt(Float64(n * Float64(fma(l_m, Float64(-2.0 * Float64(l_m / Om)), t) * Float64(2.0 * U))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 0.0], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(n * N[(N[(l$95$m * N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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 14.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 n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6414.3

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified14.3%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr50.1%

      \[\leadsto \color{blue}{\left(\sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)} \cdot \sqrt{n}\right)} \cdot \sqrt{2} \]
    7. Taylor expanded in l around 0

      \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
    8. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
      2. lower-*.f6446.9

        \[\leadsto \left(\sqrt{\color{blue}{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{2} \]
    9. Simplified46.9%

      \[\leadsto \left(\color{blue}{\sqrt{U \cdot t}} \cdot \sqrt{n}\right) \cdot \sqrt{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*)))))

    1. Initial program 52.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 n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6446.6

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified46.6%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr24.8%

      \[\leadsto \color{blue}{\left(\sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)} \cdot \sqrt{n}\right)} \cdot \sqrt{2} \]
    7. Applied egg-rr49.4%

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot \left(n \cdot 2\right)\right) \cdot \mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 45.5% accurate, 3.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.15 \cdot 10^{+130}:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= t 1.15e+130)
   (sqrt (* n (* (fma l_m (* -2.0 (/ l_m Om)) t) (* 2.0 U))))
   (sqrt (* (* (* 2.0 U) t) n))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (t <= 1.15e+130) {
		tmp = sqrt((n * (fma(l_m, (-2.0 * (l_m / Om)), t) * (2.0 * U))));
	} else {
		tmp = sqrt((((2.0 * U) * t) * n));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (t <= 1.15e+130)
		tmp = sqrt(Float64(n * Float64(fma(l_m, Float64(-2.0 * Float64(l_m / Om)), t) * Float64(2.0 * U))));
	else
		tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 1.15e+130], N[Sqrt[N[(n * N[(N[(l$95$m * N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.15 \cdot 10^{+130}:\\
\;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.15000000000000011e130

    1. Initial program 45.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 n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6440.5

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified40.5%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr44.4%

      \[\leadsto \color{blue}{\sqrt{n \cdot \left(\left(U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)\right) \cdot 2\right)}} \]

    if 1.15000000000000011e130 < t

    1. Initial program 57.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. 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. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6443.3

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified43.3%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot n\right) \cdot t} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(2 \cdot n\right)}\right) \cdot t} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      9. lower-*.f6450.0

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}} \]
      10. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      14. lower-*.f6450.0

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      15. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      16. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      17. lower-*.f6450.0

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
    7. Applied egg-rr50.0%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right) \cdot t}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)} \cdot t} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{t \cdot \left(2 \cdot \left(U \cdot n\right)\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{t \cdot \color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(t \cdot 2\right) \cdot \left(U \cdot n\right)}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{U \cdot n}} \]
      7. pow1/2N/A

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{{\left(U \cdot n\right)}^{\frac{1}{2}}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2}} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{t \cdot 2}} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}} \]
      11. pow1/2N/A

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{U \cdot n}} \]
      12. lower-sqrt.f6466.1

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{U \cdot n}} \]
    9. Applied egg-rr66.1%

      \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{U \cdot n}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification44.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.15 \cdot 10^{+130}:\\ \;\;\;\;\sqrt{n \cdot \left(\mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 42.6% accurate, 3.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 9.8 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= t 9.8e+129)
   (sqrt (* n (* U (fma 2.0 t (* -4.0 (/ (* l_m l_m) Om))))))
   (sqrt (* (* (* 2.0 U) t) n))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (t <= 9.8e+129) {
		tmp = sqrt((n * (U * fma(2.0, t, (-4.0 * ((l_m * l_m) / Om))))));
	} else {
		tmp = sqrt((((2.0 * U) * t) * n));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (t <= 9.8e+129)
		tmp = sqrt(Float64(n * Float64(U * fma(2.0, t, Float64(-4.0 * Float64(Float64(l_m * l_m) / Om))))));
	else
		tmp = sqrt(Float64(Float64(Float64(2.0 * U) * t) * n));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[t, 9.8e+129], N[Sqrt[N[(n * N[(U * N[(2.0 * t + N[(-4.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 9.8 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{l\_m \cdot l\_m}{Om}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 9.8e129

    1. Initial program 45.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 l around 0

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)\right) + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right)\right)} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(-2 \cdot U, {\ell}^{2} \cdot \left(n \cdot \left(2 \cdot \frac{1}{Om} + \frac{n \cdot \left(U - U*\right)}{{Om}^{2}}\right)\right), 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}} \]
    5. Simplified42.4%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(-2 \cdot U, \left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om \cdot Om}, \frac{2}{Om}\right), \left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}} \]
    6. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{n \cdot \left(-4 \cdot \frac{U \cdot {\ell}^{2}}{Om} + 2 \cdot \left(U \cdot t\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(-4 \cdot \frac{U \cdot {\ell}^{2}}{Om} + 2 \cdot \left(U \cdot t\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \sqrt{n \cdot \color{blue}{\left(2 \cdot \left(U \cdot t\right) + -4 \cdot \frac{U \cdot {\ell}^{2}}{Om}\right)}} \]
      3. lower-fma.f64N/A

        \[\leadsto \sqrt{n \cdot \color{blue}{\mathsf{fma}\left(2, U \cdot t, -4 \cdot \frac{U \cdot {\ell}^{2}}{Om}\right)}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, \color{blue}{U \cdot t}, -4 \cdot \frac{U \cdot {\ell}^{2}}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, U \cdot t, \color{blue}{-4 \cdot \frac{U \cdot {\ell}^{2}}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, U \cdot t, -4 \cdot \color{blue}{\frac{U \cdot {\ell}^{2}}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, U \cdot t, -4 \cdot \frac{\color{blue}{U \cdot {\ell}^{2}}}{Om}\right)} \]
      8. unpow2N/A

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, U \cdot t, -4 \cdot \frac{U \cdot \color{blue}{\left(\ell \cdot \ell\right)}}{Om}\right)} \]
      9. lower-*.f6439.9

        \[\leadsto \sqrt{n \cdot \mathsf{fma}\left(2, U \cdot t, -4 \cdot \frac{U \cdot \color{blue}{\left(\ell \cdot \ell\right)}}{Om}\right)} \]
    8. Simplified39.9%

      \[\leadsto \sqrt{\color{blue}{n \cdot \mathsf{fma}\left(2, U \cdot t, -4 \cdot \frac{U \cdot \left(\ell \cdot \ell\right)}{Om}\right)}} \]
    9. Taylor expanded in U around 0

      \[\leadsto \sqrt{n \cdot \color{blue}{\left(U \cdot \left(-4 \cdot \frac{{\ell}^{2}}{Om} + 2 \cdot t\right)\right)}} \]
    10. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{n \cdot \color{blue}{\left(U \cdot \left(-4 \cdot \frac{{\ell}^{2}}{Om} + 2 \cdot t\right)\right)}} \]
      2. +-commutativeN/A

        \[\leadsto \sqrt{n \cdot \left(U \cdot \color{blue}{\left(2 \cdot t + -4 \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      3. lower-fma.f64N/A

        \[\leadsto \sqrt{n \cdot \left(U \cdot \color{blue}{\mathsf{fma}\left(2, t, -4 \cdot \frac{{\ell}^{2}}{Om}\right)}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, \color{blue}{-4 \cdot \frac{{\ell}^{2}}{Om}}\right)\right)} \]
      5. lower-/.f64N/A

        \[\leadsto \sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \color{blue}{\frac{{\ell}^{2}}{Om}}\right)\right)} \]
      6. unpow2N/A

        \[\leadsto \sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
      7. lower-*.f6441.7

        \[\leadsto \sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right)\right)} \]
    11. Simplified41.7%

      \[\leadsto \sqrt{n \cdot \color{blue}{\left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]

    if 9.8e129 < t

    1. Initial program 57.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. 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. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6443.3

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified43.3%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot n\right) \cdot t} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(2 \cdot n\right)}\right) \cdot t} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      9. lower-*.f6450.0

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}} \]
      10. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      14. lower-*.f6450.0

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      15. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      16. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      17. lower-*.f6450.0

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
    7. Applied egg-rr50.0%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right) \cdot t}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)} \cdot t} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{t \cdot \left(2 \cdot \left(U \cdot n\right)\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{t \cdot \color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(t \cdot 2\right) \cdot \left(U \cdot n\right)}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{U \cdot n}} \]
      7. pow1/2N/A

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{{\left(U \cdot n\right)}^{\frac{1}{2}}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{t \cdot 2}} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{t \cdot 2}} \cdot {\left(U \cdot n\right)}^{\frac{1}{2}} \]
      11. pow1/2N/A

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{U \cdot n}} \]
      12. lower-sqrt.f6466.1

        \[\leadsto \sqrt{t \cdot 2} \cdot \color{blue}{\sqrt{U \cdot n}} \]
    9. Applied egg-rr66.1%

      \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{U \cdot n}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 9.8 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \mathsf{fma}\left(2, t, -4 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 46.3% accurate, 3.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (sqrt (* n (* (fma l_m (* -2.0 (/ l_m Om)) t) (* 2.0 U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt((n * (fma(l_m, (-2.0 * (l_m / Om)), t) * (2.0 * U))));
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(n * Float64(fma(l_m, Float64(-2.0 * Float64(l_m / Om)), t) * Float64(2.0 * U))))
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(n * N[(N[(l$95$m * N[(-2.0 * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{n \cdot \left(\mathsf{fma}\left(l\_m, -2 \cdot \frac{l\_m}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -5.00000000000023e-311

    1. Initial program 49.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6443.7

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified43.7%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr0.0%

      \[\leadsto \color{blue}{\left(\sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)} \cdot \sqrt{n}\right)} \cdot \sqrt{2} \]
    7. Applied egg-rr47.6%

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot \left(n \cdot 2\right)\right) \cdot \mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right)}} \]

    if -5.00000000000023e-311 < n

    1. Initial program 45.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 n around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
    4. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)} \cdot \sqrt{2}} \]
      2. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}} \cdot \sqrt{2} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      7. cancel-sign-sub-invN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)}} \cdot \sqrt{2} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)} \cdot \sqrt{2} \]
      9. +-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\left(-2 \cdot \frac{{\ell}^{2}}{Om} + t\right)}} \cdot \sqrt{2} \]
      10. associate-*r/N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{\frac{-2 \cdot {\ell}^{2}}{Om}} + t\right)} \cdot \sqrt{2} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\frac{\color{blue}{{\ell}^{2} \cdot -2}}{Om} + t\right)} \cdot \sqrt{2} \]
      12. associate-/l*N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \cdot \sqrt{2} \]
      13. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}} \cdot \sqrt{2} \]
      14. unpow2N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      15. lower-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \cdot \sqrt{2} \]
      16. lower-/.f64N/A

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \color{blue}{\frac{-2}{Om}}, t\right)} \cdot \sqrt{2} \]
      17. lower-sqrt.f6440.9

        \[\leadsto \sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \color{blue}{\sqrt{2}} \]
    5. Simplified40.9%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot U\right) \cdot \mathsf{fma}\left(\ell \cdot \ell, \frac{-2}{Om}, t\right)} \cdot \sqrt{2}} \]
    6. Applied egg-rr55.1%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \ell \cdot -2, t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification45.3%

    \[\leadsto \sqrt{n \cdot \left(\mathsf{fma}\left(\ell, -2 \cdot \frac{\ell}{Om}, t\right) \cdot \left(2 \cdot U\right)\right)} \]
  5. Add Preprocessing

Alternative 17: 34.6% accurate, 6.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* (* 2.0 U) t) n)))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt((((2.0 * U) * t) * n));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((((2.0d0 * u) * t) * n))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.sqrt((((2.0 * U) * t) * n));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((((2.0 * U) * t) * n))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(Float64(Float64(2.0 * U) * t) * n))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((((2.0 * U) * t) * n));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * U), $MachinePrecision] * t), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 1.99999999999999982e-307

    1. Initial program 49.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. 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. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6427.9

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified27.9%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot n\right) \cdot t} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(2 \cdot n\right)}\right) \cdot t} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      9. lower-*.f6430.2

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}} \]
      10. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      14. lower-*.f6430.2

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      15. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      16. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      17. lower-*.f6430.2

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
    7. Applied egg-rr30.2%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right) \cdot t}} \]

    if 1.99999999999999982e-307 < n

    1. Initial program 45.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. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6433.0

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified33.0%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot n\right) \cdot t} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(2 \cdot n\right)\right)} \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(2 \cdot n\right)}\right) \cdot t} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      8. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      9. lower-*.f6433.0

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}} \]
      10. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot n\right)} \cdot U\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      14. lower-*.f6433.0

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      15. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      16. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      17. lower-*.f6433.0

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
    7. Applied egg-rr33.0%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right) \cdot t}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(U \cdot n\right)}\right) \cdot t} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot n\right) \cdot 2\right)} \cdot t} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot n\right)} \cdot 2\right) \cdot t} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot 2\right)\right)} \cdot t} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(n \cdot 2\right)}\right) \cdot t} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot 2\right) \cdot U\right)} \cdot t} \]
      7. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right) \cdot \left(U \cdot t\right)}} \]
      8. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]
      9. pow1/2N/A

        \[\leadsto \color{blue}{{\left(n \cdot 2\right)}^{\frac{1}{2}}} \cdot \sqrt{U \cdot t} \]
      10. lower-*.f64N/A

        \[\leadsto \color{blue}{{\left(n \cdot 2\right)}^{\frac{1}{2}} \cdot \sqrt{U \cdot t}} \]
      11. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot 2}} \cdot \sqrt{U \cdot t} \]
      12. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot 2}} \cdot \sqrt{U \cdot t} \]
      13. lower-sqrt.f64N/A

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{U \cdot t}} \]
      14. lower-*.f6443.7

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\color{blue}{U \cdot t}} \]
    9. Applied egg-rr43.7%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification31.4%

    \[\leadsto \sqrt{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n} \]
  5. Add Preprocessing

Reproduce

?
herbie shell --seed 2024199 
(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*))))))