Toniolo and Linder, Equation (13)

Percentage Accurate: 50.7% → 68.1%
Time: 19.3s
Alternatives: 21
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 21 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 50.7% accurate, 1.0× speedup?

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

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

Alternative 1: 68.1% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\\

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

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


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

    1. Initial program 11.5%

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

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

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

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

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

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

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

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

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

    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 67.5%

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\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. Applied rewrites5.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 49.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_5 \leq 1:\\
\;\;\;\;\sqrt{t\_4 \cdot t\_3}\\

\mathbf{elif}\;t\_5 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_4 \cdot \left(t + \frac{t\_1}{Om \cdot Om}\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 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 11.5%

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

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

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

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

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

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

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

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

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

    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

    1. Initial program 97.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 rewrites98.0%

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

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

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

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

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

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

    if 1 < (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*))))) < 5e152

    1. Initial program 97.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 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. Applied rewrites90.8%

      \[\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)}} \]
    6. Taylor expanded in n around -inf

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(\left(U \cdot \ell\right) \cdot \left(\ell \cdot n\right)\right)} \cdot -4}{Om}\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. 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 rewrites11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 50.4% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{l\_m \cdot l\_m}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\ t_4 := \mathsf{fma}\left(-2, t\_1, t\right)\\ t_5 := n \cdot \left(U* - U\right)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t\_4} \cdot \sqrt{U}\\ \mathbf{elif}\;t\_3 \leq 1:\\ \;\;\;\;\sqrt{t\_2 \cdot t\_4}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{t\_2 \cdot \left(t + \frac{\left(l\_m \cdot l\_m\right) \cdot t\_5}{Om \cdot Om}\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\left(\left(n \cdot l\_m\right) \cdot \left(U \cdot l\_m\right)\right) \cdot -4}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \frac{t\_5}{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 (/ (* l_m l_m) Om))
        (t_2 (* (* 2.0 n) U))
        (t_3
         (sqrt
          (*
           t_2
           (- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))))
        (t_4 (fma -2.0 t_1 t))
        (t_5 (* n (- U* U))))
   (if (<= t_3 0.0)
     (* (sqrt (* (* 2.0 n) t_4)) (sqrt U))
     (if (<= t_3 1.0)
       (sqrt (* t_2 t_4))
       (if (<= t_3 5e+152)
         (sqrt (* t_2 (+ t (/ (* (* l_m l_m) t_5) (* Om Om)))))
         (if (<= t_3 INFINITY)
           (sqrt
            (fma 2.0 (* U (* n t)) (/ (* (* (* n l_m) (* U l_m)) -4.0) Om)))
           (* l_m (sqrt (* (* 2.0 (* n U)) (/ t_5 (* 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 = (l_m * l_m) / Om;
	double t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double t_4 = fma(-2.0, t_1, t);
	double t_5 = n * (U_42_ - U);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(((2.0 * n) * t_4)) * sqrt(U);
	} else if (t_3 <= 1.0) {
		tmp = sqrt((t_2 * t_4));
	} else if (t_3 <= 5e+152) {
		tmp = sqrt((t_2 * (t + (((l_m * l_m) * t_5) / (Om * Om)))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(fma(2.0, (U * (n * t)), ((((n * l_m) * (U * l_m)) * -4.0) / Om)));
	} else {
		tmp = l_m * sqrt(((2.0 * (n * U)) * (t_5 / (Om * Om))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(l_m * l_m) / Om)
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	t_4 = fma(-2.0, t_1, t)
	t_5 = Float64(n * Float64(U_42_ - U))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t_4)) * sqrt(U));
	elseif (t_3 <= 1.0)
		tmp = sqrt(Float64(t_2 * t_4));
	elseif (t_3 <= 5e+152)
		tmp = sqrt(Float64(t_2 * Float64(t + Float64(Float64(Float64(l_m * l_m) * t_5) / Float64(Om * Om)))));
	elseif (t_3 <= Inf)
		tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(Float64(Float64(Float64(n * l_m) * Float64(U * l_m)) * -4.0) / Om)));
	else
		tmp = Float64(l_m * sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t_5 / 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[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $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$4 = N[(-2.0 * t$95$1 + t), $MachinePrecision]}, Block[{t$95$5 = N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t$95$4), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1.0], N[Sqrt[N[(t$95$2 * t$95$4), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, 5e+152], N[Sqrt[N[(t$95$2 * N[(t + N[(N[(N[(l$95$m * l$95$m), $MachinePrecision] * t$95$5), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(n * l$95$m), $MachinePrecision] * N[(U * l$95$m), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t$95$5 / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_3 \leq 1:\\
\;\;\;\;\sqrt{t\_2 \cdot t\_4}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t + \frac{\left(l\_m \cdot l\_m\right) \cdot t\_5}{Om \cdot Om}\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 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 11.5%

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

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

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

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

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

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

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

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

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

    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

    1. Initial program 97.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 rewrites98.0%

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

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

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

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

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

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

    if 1 < (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*))))) < 5e152

    1. Initial program 97.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 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. Applied rewrites90.8%

      \[\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)}} \]
    6. Taylor expanded in n around -inf

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(\left(U \cdot \ell\right) \cdot \left(\ell \cdot n\right)\right)} \cdot -4}{Om}\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. 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 rewrites11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{-5}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_3 \cdot \left(t + \frac{\frac{U* \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)}{Om}}{Om}\right)}\\

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


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

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

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

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

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

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

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

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

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

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

    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.00000000000000024e-5

    1. Initial program 97.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000024e-5 < (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*))))) < 5e152

    1. Initial program 97.6%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 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. Applied rewrites91.2%

      \[\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)}} \]
    6. Taylor expanded in U* around inf

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t - \frac{\mathsf{neg}\left(\frac{U* \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)}{Om}\right)} \]
      8. lower-*.f6490.4

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

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

    if 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 59.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 1:\\
\;\;\;\;\sqrt{t\_2 \cdot t\_4}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t + \frac{\left(l\_m \cdot l\_m\right) \cdot t\_5}{Om \cdot Om}\right)}\\

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


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

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

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

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

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

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

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

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

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

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

    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

    1. Initial program 97.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 rewrites98.0%

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

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

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

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

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

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

    if 1 < (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*))))) < 5e152

    1. Initial program 97.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around 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. Applied rewrites90.8%

      \[\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)}} \]
    6. Taylor expanded in n around -inf

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 54.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_3 \cdot t\_2}\\

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

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


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

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(\left(U \cdot \ell\right) \cdot \left(\ell \cdot n\right)\right)} \cdot -4}{Om}\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. 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 rewrites11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\

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

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


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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

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

      \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(\left(U \cdot \ell\right) \cdot \left(\ell \cdot n\right)\right)} \cdot -4}{Om}\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. 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 rewrites11.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 47.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, t\_1, t\right)\right)\right)}\\

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


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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

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

      \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.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-*.f6462.9

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right)\right)\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. 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 rewrites11.1%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \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 inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\\

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

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


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

    1. Initial program 11.5%

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \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.8

        \[\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. Applied rewrites97.8%

      \[\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 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 66.3% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot t\_1\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{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\\

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

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


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

    1. Initial program 11.5%

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 65.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\\

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

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


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

    1. Initial program 11.5%

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

      \[\leadsto \sqrt{\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. Applied rewrites92.0%

      \[\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)}} \]
    6. Step-by-step derivation
      1. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 64.5% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{\left(2 \cdot n\right) \cdot \mathsf{fma}\left(-2, t\_1, t\right)} \cdot \sqrt{U}\\

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

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


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

    1. Initial program 11.5%

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

      \[\leadsto \sqrt{\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. Applied rewrites92.0%

      \[\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)}} \]
    6. Taylor expanded in U around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 20.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. Applied rewrites19.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 54.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

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

      \[\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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

    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*))))) < 5e152

    1. Initial program 97.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e152 < (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 20.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \frac{n \cdot \left(U* - U\right)}{Om \cdot Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 50.2% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{l\_m \cdot l\_m}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2}\right)\right) \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (/ (* l_m l_m) Om))
        (t_2 (* (* 2.0 n) U))
        (t_3
         (sqrt
          (*
           t_2
           (- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
   (if (<= t_3 0.0)
     (* (sqrt U) (sqrt (* 2.0 (* n t))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (fma -2.0 t_1 t)))
       (* (* l_m (* (/ n Om) (sqrt 2.0))) (sqrt (* U U*)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (l_m * l_m) / Om;
	double t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
	} else {
		tmp = (l_m * ((n / Om) * sqrt(2.0))) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(l_m * l_m) / Om)
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(2.0 * Float64(n * t))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t)));
	else
		tmp = Float64(Float64(l_m * Float64(Float64(n / Om) * sqrt(2.0))) * sqrt(Float64(U * U_42_)));
	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[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $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]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[(N[(n / Om), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2}\right)\right) \cdot \sqrt{U \cdot U*}\\


\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 11.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites34.7%

      \[\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. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \color{blue}{\left(2 \cdot U\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot 2\right) \cdot U}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      7. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot 2} \cdot \color{blue}{\sqrt{U}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
      10. lower-*.f6443.4

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
    7. Applied rewrites43.4%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]

    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 67.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. 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 rewrites72.6%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    5. 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)}} \]
    6. 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. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(-2, \frac{{\ell}^{2}}{Om}, t\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \color{blue}{\frac{{\ell}^{2}}{Om}}, t\right)} \]
      4. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right)} \]
      5. lower-*.f6459.5

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right)} \]
    7. Applied rewrites59.5%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(-2, \frac{\ell \cdot \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. 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 rewrites11.1%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \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 inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{n \cdot \sqrt{2}}{Om}}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{n \cdot \sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      7. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      8. lower-*.f6425.8

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{\color{blue}{U \cdot U*}} \]
    7. Applied rewrites25.8%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}} \]
    8. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      2. *-commutativeN/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{\sqrt{2} \cdot n}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-/.f6425.8

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \color{blue}{\frac{n}{Om}}\right)\right) \cdot \sqrt{U \cdot U*} \]
    9. Applied rewrites25.8%

      \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \left(\frac{n}{Om} \cdot \sqrt{2}\right)\right) \cdot \sqrt{U \cdot U*}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 50.4% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \frac{l\_m \cdot l\_m}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (/ (* l_m l_m) Om))
        (t_2 (* (* 2.0 n) U))
        (t_3
         (sqrt
          (*
           t_2
           (- (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U U*)))))))
   (if (<= t_3 0.0)
     (* (sqrt U) (sqrt (* 2.0 (* n t))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (fma -2.0 t_1 t)))
       (* l_m (* (/ n Om) (sqrt (* 2.0 (* U U*)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (l_m * l_m) / Om;
	double t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) - ((n * pow((l_m / Om), 2.0)) * (U - U_42_)))));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
	} else {
		tmp = l_m * ((n / Om) * sqrt((2.0 * (U * U_42_))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(l_m * l_m) / Om)
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U - U_42_)))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(U) * sqrt(Float64(2.0 * Float64(n * t))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t)));
	else
		tmp = Float64(l_m * Float64(Float64(n / Om) * sqrt(Float64(2.0 * Float64(U * U_42_)))));
	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[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $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]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[(n / Om), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \frac{l\_m \cdot l\_m}{Om}\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

    1. Initial program 11.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites34.7%

      \[\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. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \color{blue}{\left(2 \cdot U\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot 2\right) \cdot U}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      7. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot 2} \cdot \color{blue}{\sqrt{U}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
      10. lower-*.f6443.4

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
    7. Applied rewrites43.4%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]

    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 67.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. 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 rewrites72.6%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    5. 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)}} \]
    6. 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. lower-fma.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(-2, \frac{{\ell}^{2}}{Om}, t\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \color{blue}{\frac{{\ell}^{2}}{Om}}, t\right)} \]
      4. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right)} \]
      5. lower-*.f6459.5

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\color{blue}{\ell \cdot \ell}}{Om}, t\right)} \]
    7. Applied rewrites59.5%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(-2, \frac{\ell \cdot \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. 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 rewrites11.1%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \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 inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{n \cdot \sqrt{2}}{Om}}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{n \cdot \sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      7. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      8. lower-*.f6425.8

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{\color{blue}{U \cdot U*}} \]
    7. Applied rewrites25.8%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}} \]
    8. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      2. *-commutativeN/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{\sqrt{2} \cdot n}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-/.f6425.8

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \color{blue}{\frac{n}{Om}}\right)\right) \cdot \sqrt{U \cdot U*} \]
    9. Applied rewrites25.8%

      \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
    10. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \left(\color{blue}{\sqrt{2}} \cdot \frac{n}{Om}\right)\right) \cdot \sqrt{U \cdot U*} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \color{blue}{\frac{n}{Om}}\right)\right) \cdot \sqrt{U \cdot U*} \]
      3. lift-*.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \frac{n}{Om}\right)\right) \cdot \sqrt{\color{blue}{U \cdot U*}} \]
      5. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \frac{n}{Om}\right)\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      6. associate-*l*N/A

        \[\leadsto \color{blue}{\ell \cdot \left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right)} \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right) \cdot \ell} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right) \cdot \ell} \]
      9. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)} \cdot \sqrt{U \cdot U*}\right) \cdot \ell \]
      10. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(\frac{n}{Om} \cdot \sqrt{2}\right)} \cdot \sqrt{U \cdot U*}\right) \cdot \ell \]
      11. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \sqrt{U \cdot U*}\right)\right)} \cdot \ell \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \sqrt{U \cdot U*}\right)\right)} \cdot \ell \]
      13. lift-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \left(\color{blue}{\sqrt{2}} \cdot \sqrt{U \cdot U*}\right)\right) \cdot \ell \]
      14. lift-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \color{blue}{\sqrt{U \cdot U*}}\right)\right) \cdot \ell \]
      15. sqrt-unprodN/A

        \[\leadsto \left(\frac{n}{Om} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
      17. lower-*.f6425.8

        \[\leadsto \left(\frac{n}{Om} \cdot \sqrt{\color{blue}{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
    11. Applied rewrites25.8%

      \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right) \cdot \ell} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification52.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 44.8% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 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 U) (sqrt (* 2.0 (* n t))))
     (if (<= t_1 5e+152)
       (sqrt (* (* n U) (* 2.0 t)))
       (* l_m (* (/ n Om) (sqrt (* 2.0 (* U U*)))))))))
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 tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	} else if (t_1 <= 5e+152) {
		tmp = sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = l_m * ((n / Om) * sqrt((2.0 * (U * U_42_))));
	}
	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) :: 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)))))
    if (t_1 <= 0.0d0) then
        tmp = sqrt(u) * sqrt((2.0d0 * (n * t)))
    else if (t_1 <= 5d+152) then
        tmp = sqrt(((n * u) * (2.0d0 * t)))
    else
        tmp = l_m * ((n / om) * sqrt((2.0d0 * (u * u_42))))
    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 tmp;
	if (t_1 <= 0.0) {
		tmp = Math.sqrt(U) * Math.sqrt((2.0 * (n * t)));
	} else if (t_1 <= 5e+152) {
		tmp = Math.sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = l_m * ((n / Om) * Math.sqrt((2.0 * (U * U_42_))));
	}
	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_)))))
	tmp = 0
	if t_1 <= 0.0:
		tmp = math.sqrt(U) * math.sqrt((2.0 * (n * t)))
	elif t_1 <= 5e+152:
		tmp = math.sqrt(((n * U) * (2.0 * t)))
	else:
		tmp = l_m * ((n / Om) * math.sqrt((2.0 * (U * U_42_))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * 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 = Float64(sqrt(U) * sqrt(Float64(2.0 * Float64(n * t))));
	elseif (t_1 <= 5e+152)
		tmp = sqrt(Float64(Float64(n * U) * Float64(2.0 * t)));
	else
		tmp = Float64(l_m * Float64(Float64(n / Om) * sqrt(Float64(2.0 * Float64(U * U_42_)))));
	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_)))));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	elseif (t_1 <= 5e+152)
		tmp = sqrt(((n * U) * (2.0 * t)));
	else
		tmp = l_m * ((n / Om) * sqrt((2.0 * (U * U_42_))));
	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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+152], N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[(N[(n / Om), $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\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{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

    1. Initial program 11.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.7

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites34.7%

      \[\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. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \color{blue}{\left(2 \cdot U\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot 2\right) \cdot U}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      7. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot 2} \cdot \color{blue}{\sqrt{U}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
      10. lower-*.f6443.4

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
    7. Applied rewrites43.4%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]

    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*))))) < 5e152

    1. Initial program 97.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-*.f6462.9

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites62.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{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right)} \cdot 2} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(n \cdot t\right)}\right) \cdot 2} \]
      7. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot n\right) \cdot t\right)} \cdot 2} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t \cdot 2\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(t \cdot 2\right)}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      13. lower-*.f6477.8

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t \cdot 2\right)}} \]
    7. Applied rewrites77.8%

      \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]

    if 5e152 < (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 20.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\color{blue}{\ell \cdot \ell}}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell \cdot \ell}{Om}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - \color{blue}{2 \cdot \frac{\ell \cdot \ell}{Om}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      4. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)} - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      5. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)} \]
      8. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)}\right)} \]
      10. sub-negN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    4. Applied rewrites30.8%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\mathsf{fma}\left(\left(-\left(U - U*\right)\right) \cdot \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 inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
      2. associate-/l*N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{n \cdot \sqrt{2}}{Om}}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{n \cdot \sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      7. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      8. lower-*.f6419.2

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{\color{blue}{U \cdot U*}} \]
    7. Applied rewrites19.2%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}} \]
    8. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      2. *-commutativeN/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{\sqrt{2} \cdot n}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      4. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-/.f6419.2

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \color{blue}{\frac{n}{Om}}\right)\right) \cdot \sqrt{U \cdot U*} \]
    9. Applied rewrites19.2%

      \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
    10. Step-by-step derivation
      1. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \left(\color{blue}{\sqrt{2}} \cdot \frac{n}{Om}\right)\right) \cdot \sqrt{U \cdot U*} \]
      2. lift-/.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \color{blue}{\frac{n}{Om}}\right)\right) \cdot \sqrt{U \cdot U*} \]
      3. lift-*.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)}\right) \cdot \sqrt{U \cdot U*} \]
      4. lift-*.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \frac{n}{Om}\right)\right) \cdot \sqrt{\color{blue}{U \cdot U*}} \]
      5. lift-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \left(\sqrt{2} \cdot \frac{n}{Om}\right)\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      6. associate-*l*N/A

        \[\leadsto \color{blue}{\ell \cdot \left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right)} \]
      7. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right) \cdot \ell} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\left(\sqrt{2} \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot U*}\right) \cdot \ell} \]
      9. lift-*.f64N/A

        \[\leadsto \left(\color{blue}{\left(\sqrt{2} \cdot \frac{n}{Om}\right)} \cdot \sqrt{U \cdot U*}\right) \cdot \ell \]
      10. *-commutativeN/A

        \[\leadsto \left(\color{blue}{\left(\frac{n}{Om} \cdot \sqrt{2}\right)} \cdot \sqrt{U \cdot U*}\right) \cdot \ell \]
      11. associate-*l*N/A

        \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \sqrt{U \cdot U*}\right)\right)} \cdot \ell \]
      12. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \sqrt{U \cdot U*}\right)\right)} \cdot \ell \]
      13. lift-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \left(\color{blue}{\sqrt{2}} \cdot \sqrt{U \cdot U*}\right)\right) \cdot \ell \]
      14. lift-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \left(\sqrt{2} \cdot \color{blue}{\sqrt{U \cdot U*}}\right)\right) \cdot \ell \]
      15. sqrt-unprodN/A

        \[\leadsto \left(\frac{n}{Om} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
      16. lower-sqrt.f64N/A

        \[\leadsto \left(\frac{n}{Om} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
      17. lower-*.f6418.4

        \[\leadsto \left(\frac{n}{Om} \cdot \sqrt{\color{blue}{2 \cdot \left(U \cdot U*\right)}}\right) \cdot \ell \]
    11. Applied rewrites18.4%

      \[\leadsto \color{blue}{\left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right) \cdot \ell} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification45.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 0:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \leq 5 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \left(\frac{n}{Om} \cdot \sqrt{2 \cdot \left(U \cdot U*\right)}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 39.4% accurate, 0.9× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\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(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<=
      (*
       (* (* 2.0 n) U)
       (-
        (- t (* 2.0 (/ (* l_m l_m) Om)))
        (* (* n (pow (/ l_m Om) 2.0)) (- U U*))))
      0.0)
   (sqrt (* (* n t) (* 2.0 U)))
   (sqrt (* (* n U) (* 2.0 t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if ((((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(((n * t) * (2.0 * U)));
	} else {
		tmp = sqrt(((n * U) * (2.0 * t)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if ((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) - ((n * ((l_m / om) ** 2.0d0)) * (u - u_42)))) <= 0.0d0) then
        tmp = sqrt(((n * t) * (2.0d0 * u)))
    else
        tmp = sqrt(((n * u) * (2.0d0 * t)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * Math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 0.0) {
		tmp = Math.sqrt(((n * t) * (2.0 * U)));
	} else {
		tmp = Math.sqrt(((n * U) * (2.0 * t)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if (((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * math.pow((l_m / Om), 2.0)) * (U - U_42_)))) <= 0.0:
		tmp = math.sqrt(((n * t) * (2.0 * U)))
	else:
		tmp = math.sqrt(((n * U) * (2.0 * t)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (Float64(Float64(Float64(2.0 * 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(n * t) * Float64(2.0 * U)));
	else
		tmp = sqrt(Float64(Float64(n * U) * Float64(2.0 * t)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if ((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) - ((n * ((l_m / Om) ^ 2.0)) * (U - U_42_)))) <= 0.0)
		tmp = sqrt(((n * t) * (2.0 * U)));
	else
		tmp = sqrt(((n * U) * (2.0 * t)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0], N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\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(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 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 10.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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-*.f6430.4

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites30.4%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]

    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. Initial program 56.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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-*.f6436.0

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites36.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{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right)} \cdot 2} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(n \cdot t\right)}\right) \cdot 2} \]
      7. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot n\right) \cdot t\right)} \cdot 2} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t \cdot 2\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(t \cdot 2\right)}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      13. lower-*.f6441.6

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t \cdot 2\right)}} \]
    7. Applied rewrites41.6%

      \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq 0:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 40.4% accurate, 3.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 5.8 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 5.8e+56)
   (sqrt (* n (* t (* 2.0 U))))
   (sqrt (/ (* -4.0 (* U (* n (* l_m l_m)))) Om))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 5.8e+56) {
		tmp = sqrt((n * (t * (2.0 * U))));
	} else {
		tmp = sqrt(((-4.0 * (U * (n * (l_m * l_m)))) / Om));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 5.8d+56) then
        tmp = sqrt((n * (t * (2.0d0 * u))))
    else
        tmp = sqrt((((-4.0d0) * (u * (n * (l_m * l_m)))) / om))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 5.8e+56) {
		tmp = Math.sqrt((n * (t * (2.0 * U))));
	} else {
		tmp = Math.sqrt(((-4.0 * (U * (n * (l_m * l_m)))) / Om));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 5.8e+56:
		tmp = math.sqrt((n * (t * (2.0 * U))))
	else:
		tmp = math.sqrt(((-4.0 * (U * (n * (l_m * l_m)))) / Om))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 5.8e+56)
		tmp = sqrt(Float64(n * Float64(t * Float64(2.0 * U))));
	else
		tmp = sqrt(Float64(Float64(-4.0 * Float64(U * Float64(n * Float64(l_m * l_m)))) / Om));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 5.8e+56)
		tmp = sqrt((n * (t * (2.0 * U))));
	else
		tmp = sqrt(((-4.0 * (U * (n * (l_m * l_m)))) / Om));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 5.8e+56], N[Sqrt[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(-4.0 * N[(U * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.8 \cdot 10^{+56}:\\
\;\;\;\;\sqrt{n \cdot \left(t \cdot \left(2 \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)\right)}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 5.80000000000000014e56

    1. Initial program 54.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-*.f6439.7

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites39.7%

      \[\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. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(t \cdot n\right)}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot t\right) \cdot n}} \]
      5. lower-*.f6443.1

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot t\right)} \cdot n} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot t\right) \cdot n} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot t\right) \cdot n} \]
      8. lower-*.f6443.1

        \[\leadsto \sqrt{\left(\color{blue}{\left(U \cdot 2\right)} \cdot t\right) \cdot n} \]
    7. Applied rewrites43.1%

      \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot 2\right) \cdot t\right) \cdot n}} \]

    if 5.80000000000000014e56 < l

    1. Initial program 23.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in Om around inf

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. associate-*r/N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{\frac{-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{\frac{-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}\right)} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(U \cdot \left({\ell}^{2} \cdot n\right)\right) \cdot -4}}{Om}\right)} \]
      8. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(U \cdot \left({\ell}^{2} \cdot n\right)\right) \cdot -4}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\color{blue}{\left(U \cdot \left({\ell}^{2} \cdot n\right)\right)} \cdot -4}{Om}\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\left(U \cdot \color{blue}{\left({\ell}^{2} \cdot n\right)}\right) \cdot -4}{Om}\right)} \]
      11. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\left(U \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)\right) \cdot -4}{Om}\right)} \]
      12. lower-*.f6418.7

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\left(U \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)\right) \cdot -4}{Om}\right)} \]
    5. Applied rewrites18.7%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{\left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right) \cdot -4}{Om}\right)}} \]
    6. Taylor expanded in t around 0

      \[\leadsto \sqrt{\color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{\frac{-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{\color{blue}{-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{-4 \cdot \color{blue}{\left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{-4 \cdot \left(U \cdot \color{blue}{\left({\ell}^{2} \cdot n\right)}\right)}{Om}} \]
      6. unpow2N/A

        \[\leadsto \sqrt{\frac{-4 \cdot \left(U \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)\right)}{Om}} \]
      7. lower-*.f6421.4

        \[\leadsto \sqrt{\frac{-4 \cdot \left(U \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot n\right)\right)}{Om}} \]
    8. Applied rewrites21.4%

      \[\leadsto \sqrt{\color{blue}{\frac{-4 \cdot \left(U \cdot \left(\left(\ell \cdot \ell\right) \cdot n\right)\right)}{Om}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification40.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 5.8 \cdot 10^{+56}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 40.2% accurate, 4.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq 2.4 \cdot 10^{-305}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U 2.4e-305)
   (sqrt (* (* n U) (* 2.0 t)))
   (* (sqrt U) (sqrt (* 2.0 (* n t))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 2.4e-305) {
		tmp = sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (u <= 2.4d-305) then
        tmp = sqrt(((n * u) * (2.0d0 * t)))
    else
        tmp = sqrt(u) * sqrt((2.0d0 * (n * t)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 2.4e-305) {
		tmp = Math.sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = Math.sqrt(U) * Math.sqrt((2.0 * (n * t)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= 2.4e-305:
		tmp = math.sqrt(((n * U) * (2.0 * t)))
	else:
		tmp = math.sqrt(U) * math.sqrt((2.0 * (n * t)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= 2.4e-305)
		tmp = sqrt(Float64(Float64(n * U) * Float64(2.0 * t)));
	else
		tmp = Float64(sqrt(U) * sqrt(Float64(2.0 * Float64(n * t))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (U <= 2.4e-305)
		tmp = sqrt(((n * U) * (2.0 * t)));
	else
		tmp = sqrt(U) * sqrt((2.0 * (n * t)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 2.4e-305], N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq 2.4 \cdot 10^{-305}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 2.40000000000000019e-305

    1. Initial program 50.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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.5

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites33.5%

      \[\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{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right)} \cdot 2} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(n \cdot t\right)}\right) \cdot 2} \]
      7. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot n\right) \cdot t\right)} \cdot 2} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t \cdot 2\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(t \cdot 2\right)}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      13. lower-*.f6439.0

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t \cdot 2\right)}} \]
    7. Applied rewrites39.0%

      \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]

    if 2.40000000000000019e-305 < U

    1. Initial program 48.8%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in 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-*.f6436.8

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites36.8%

      \[\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. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \color{blue}{\left(2 \cdot U\right)}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot 2\right) \cdot U}} \]
      6. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      7. lift-sqrt.f64N/A

        \[\leadsto \sqrt{\left(n \cdot t\right) \cdot 2} \cdot \color{blue}{\sqrt{U}} \]
      8. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
      10. lower-*.f6446.0

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot t\right) \cdot 2}} \cdot \sqrt{U} \]
    7. Applied rewrites46.0%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot t\right) \cdot 2} \cdot \sqrt{U}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 2.4 \cdot 10^{-305}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{2 \cdot \left(n \cdot t\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 20: 40.1% accurate, 4.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq 4.4 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U 4.4e-296)
   (sqrt (* (* n U) (* 2.0 t)))
   (* (sqrt (* n t)) (sqrt (* 2.0 U)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 4.4e-296) {
		tmp = sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (u <= 4.4d-296) then
        tmp = sqrt(((n * u) * (2.0d0 * t)))
    else
        tmp = sqrt((n * t)) * sqrt((2.0d0 * u))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= 4.4e-296) {
		tmp = Math.sqrt(((n * U) * (2.0 * t)));
	} else {
		tmp = Math.sqrt((n * t)) * Math.sqrt((2.0 * U));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= 4.4e-296:
		tmp = math.sqrt(((n * U) * (2.0 * t)))
	else:
		tmp = math.sqrt((n * t)) * math.sqrt((2.0 * U))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= 4.4e-296)
		tmp = sqrt(Float64(Float64(n * U) * Float64(2.0 * t)));
	else
		tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (U <= 4.4e-296)
		tmp = sqrt(((n * U) * (2.0 * t)));
	else
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, 4.4e-296], N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq 4.4 \cdot 10^{-296}:\\
\;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 4.40000000000000024e-296

    1. Initial program 51.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    4. Step-by-step derivation
      1. 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. Applied rewrites34.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{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot 2}} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right)} \cdot 2} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot \color{blue}{\left(n \cdot t\right)}\right) \cdot 2} \]
      7. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(U \cdot n\right) \cdot t\right)} \cdot 2} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right)} \cdot \left(t \cdot 2\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot U\right) \cdot \left(t \cdot 2\right)}} \]
      11. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(t \cdot 2\right)} \]
      13. lower-*.f6439.5

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(t \cdot 2\right)}} \]
    7. Applied rewrites39.5%

      \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(t \cdot 2\right)}} \]

    if 4.40000000000000024e-296 < U

    1. Initial program 48.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. 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-*.f6436.3

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Applied rewrites36.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. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      3. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]
      4. pow1/2N/A

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{\frac{1}{2}}} \cdot \sqrt{n \cdot t} \]
      5. pow1/2N/A

        \[\leadsto {\left(2 \cdot U\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}}} \]
      6. *-commutativeN/A

        \[\leadsto \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      8. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot t}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot t}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}} \]
      10. pow1/2N/A

        \[\leadsto \sqrt{n \cdot t} \cdot \color{blue}{\sqrt{2 \cdot U}} \]
      11. lower-sqrt.f6445.6

        \[\leadsto \sqrt{n \cdot t} \cdot \color{blue}{\sqrt{2 \cdot U}} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{2 \cdot U}} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{U \cdot 2}} \]
      14. lower-*.f6445.6

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{U \cdot 2}} \]
    7. Applied rewrites45.6%

      \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{U \cdot 2}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 4.4 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \]
  5. Add Preprocessing

Alternative 21: 37.0% accurate, 6.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* (* n 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 * t) * (2.0 * U)));
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt(((n * t) * (2.0d0 * u)))
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return Math.sqrt(((n * t) * (2.0 * U)));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt(((n * t) * (2.0 * U)))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(Float64(n * t) * Float64(2.0 * U)))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt(((n * t) * (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 * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Derivation
  1. Initial program 49.7%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  4. Step-by-step derivation
    1. 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-*.f6435.2

      \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
  5. Applied rewrites35.2%

    \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
  6. Final simplification35.2%

    \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)} \]
  7. Add Preprocessing

Reproduce

?
herbie shell --seed 2024220 
(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*))))))