Toniolo and Linder, Equation (13)

Percentage Accurate: 51.3% → 66.2%
Time: 19.2s
Alternatives: 15
Speedup: 2.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 51.3% 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: 66.2% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 23.9%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. 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 rewrites33.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 0

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

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

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

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

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

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

    if 1.99999999999999995e-256 < (*.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*)))) < 4.9999999999999997e304

    1. Initial program 95.6%

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. unpow2N/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} \cdot \frac{\ell}{Om}\right)}\right) \cdot \left(U - U*\right)\right)} \]
      3. associate-*r*N/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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}\right)} \cdot \left(U - U*\right)\right)} \]
      4. 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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \color{blue}{\frac{\ell}{Om}}\right) \cdot \left(U - U*\right)\right)} \]
      5. clear-numN/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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\right)\right)} \]
      6. un-div-invN/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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]
      7. lower-/.f64N/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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]
      8. lower-*.f64N/A

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

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

      \[\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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]

    if 4.9999999999999997e304 < (*.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 27.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.4% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 13.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 rewrites36.7%

      \[\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 \sqrt{2 \cdot \left(n \cdot U\right)}} \]
    4. Applied rewrites40.8%

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

    if 1.9999999999999988e-309 < (*.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*)))) < 4.9999999999999997e304

    1. Initial program 94.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{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. unpow2N/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} \cdot \frac{\ell}{Om}\right)}\right) \cdot \left(U - U*\right)\right)} \]
      3. associate-*r*N/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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}\right)} \cdot \left(U - U*\right)\right)} \]
      4. 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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \color{blue}{\frac{\ell}{Om}}\right) \cdot \left(U - U*\right)\right)} \]
      5. clear-numN/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(\left(n \cdot \frac{\ell}{Om}\right) \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\right)\right)} \]
      6. un-div-invN/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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]
      7. lower-/.f64N/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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]
      8. lower-*.f64N/A

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

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

      \[\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}{\frac{n \cdot \frac{\ell}{Om}}{\frac{Om}{\ell}}} \cdot \left(U - U*\right)\right)} \]

    if 4.9999999999999997e304 < (*.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 27.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.7% 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 := U \cdot \left(2 \cdot n\right)\\ 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 5 \cdot 10^{-155}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{\mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{n \cdot \left(\mathsf{fma}\left(U - U*, \frac{n}{Om \cdot Om}, \frac{2}{Om}\right) \cdot \left(U \cdot -2\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 (* U (* 2.0 n)))
        (t_3
         (sqrt
          (*
           t_2
           (+ (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_3 5e-155)
     (* (sqrt (* 2.0 (* n U))) (sqrt (fma -2.0 t_1 t)))
     (if (<= t_3 2e+152)
       (sqrt (* t_2 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (*
        l_m
        (sqrt
         (* n (* (fma (- U U*) (/ n (* Om Om)) (/ 2.0 Om)) (* U -2.0)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (l_m * l_m) / Om;
	double t_2 = U * (2.0 * n);
	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 5e-155) {
		tmp = sqrt((2.0 * (n * U))) * sqrt(fma(-2.0, t_1, t));
	} else if (t_3 <= 2e+152) {
		tmp = sqrt((t_2 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = l_m * sqrt((n * (fma((U - U_42_), (n / (Om * Om)), (2.0 / Om)) * (U * -2.0))));
	}
	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(U * Float64(2.0 * n))
	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_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 5e-155)
		tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(fma(-2.0, t_1, t)));
	elseif (t_3 <= 2e+152)
		tmp = sqrt(Float64(t_2 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = Float64(l_m * sqrt(Float64(n * Float64(fma(Float64(U - U_42_), Float64(n / Float64(Om * Om)), Float64(2.0 / Om)) * Float64(U * -2.0)))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(U * N[(2.0 * n), $MachinePrecision]), $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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 5e-155], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-2.0 * t$95$1 + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+152], N[Sqrt[N[(t$95$2 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(n * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / N[(Om * Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision] * N[(U * -2.0), $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 := U \cdot \left(2 \cdot n\right)\\
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 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{\mathsf{fma}\left(-2, t\_1, t\right)}\\

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

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

    1. Initial program 13.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. Applied rewrites38.3%

      \[\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 \sqrt{2 \cdot \left(n \cdot U\right)}} \]
    4. Taylor expanded in Om around inf

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

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

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

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

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

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

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

    if 4.9999999999999999e-155 < (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*))))) < 2.0000000000000001e152

    1. Initial program 94.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 Om around inf

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e152 < (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 27.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.9% 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 := U \cdot \left(2 \cdot n\right)\\ 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 5 \cdot 10^{-155}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{\mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\frac{\frac{n \cdot \left(U* - U\right)}{Om} - 2}{Om} \cdot \left(n \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 (* U (* 2.0 n)))
        (t_3
         (sqrt
          (*
           t_2
           (+ (- t (* 2.0 t_1)) (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_3 5e-155)
     (* (sqrt (* 2.0 (* n U))) (sqrt (fma -2.0 t_1 t)))
     (if (<= t_3 2e+152)
       (sqrt (* t_2 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (*
        l_m
        (sqrt (* 2.0 (* (/ (- (/ (* n (- U* U)) Om) 2.0) Om) (* n 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 = U * (2.0 * n);
	double t_3 = sqrt((t_2 * ((t - (2.0 * t_1)) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_3 <= 5e-155) {
		tmp = sqrt((2.0 * (n * U))) * sqrt(fma(-2.0, t_1, t));
	} else if (t_3 <= 2e+152) {
		tmp = sqrt((t_2 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else {
		tmp = l_m * sqrt((2.0 * (((((n * (U_42_ - U)) / Om) - 2.0) / Om) * (n * U))));
	}
	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(U * Float64(2.0 * n))
	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_42_ - U)))))
	tmp = 0.0
	if (t_3 <= 5e-155)
		tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(fma(-2.0, t_1, t)));
	elseif (t_3 <= 2e+152)
		tmp = sqrt(Float64(t_2 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0) / Om) * Float64(n * U)))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(U * N[(2.0 * n), $MachinePrecision]), $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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 5e-155], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(-2.0 * t$95$1 + t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+152], N[Sqrt[N[(t$95$2 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision] / Om), $MachinePrecision] * N[(n * U), $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 := U \cdot \left(2 \cdot n\right)\\
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 5 \cdot 10^{-155}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{\mathsf{fma}\left(-2, t\_1, t\right)}\\

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

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

    1. Initial program 13.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. Applied rewrites38.3%

      \[\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 \sqrt{2 \cdot \left(n \cdot U\right)}} \]
    4. Taylor expanded in Om around inf

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

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

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

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

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

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

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

    if 4.9999999999999999e-155 < (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*))))) < 2.0000000000000001e152

    1. Initial program 94.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 Om around inf

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e152 < (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 27.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 rewrites34.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 13.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. Applied rewrites38.3%

      \[\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 \sqrt{2 \cdot \left(n \cdot U\right)}} \]
    4. Taylor expanded in Om around inf

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

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

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

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

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

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

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

    if 4.9999999999999999e-155 < (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*))))) < 2.0000000000000001e152

    1. Initial program 94.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 Om around inf

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e152 < (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 27.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 rewrites34.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 46.2% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 63.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 42.5% accurate, 0.8× speedup?

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

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

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


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

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

    if 2.0000000000000001e152 < (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 27.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 rewrites34.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 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-*.f6424.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 64.2% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.8 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \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{elif}\;l\_m \leq 5 \cdot 10^{+125}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(l\_m \cdot l\_m\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om} \cdot \left(n \cdot U\right), 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}\\

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


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

    1. Initial program 58.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 rewrites63.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 U around 0

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

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

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

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

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

    if 2.79999999999999988e47 < l < 4.99999999999999962e125

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

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

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

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

    if 4.99999999999999962e125 < l

    1. Initial program 26.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 rewrites34.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.8 \cdot 10^{+47}:\\ \;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\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{elif}\;\ell \leq 5 \cdot 10^{+125}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om} \cdot \left(n \cdot U\right), 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\frac{\frac{n \cdot \left(U* - U\right)}{Om} - 2}{Om} \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 63.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.8 \cdot 10^{+47}:\\
\;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\right) \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{elif}\;l\_m \leq 5 \cdot 10^{+125}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(l\_m \cdot l\_m\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om} \cdot \left(n \cdot U\right), 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}\\

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


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

    1. Initial program 58.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 rewrites63.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 U around 0

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

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

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

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

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

      \[\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)} \]
    9. 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. *-commutativeN/A

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

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

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

    if 2.79999999999999988e47 < l < 4.99999999999999962e125

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

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

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

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

    if 4.99999999999999962e125 < l

    1. Initial program 26.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 rewrites34.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.8 \cdot 10^{+47}:\\ \;\;\;\;\sqrt{\left(U \cdot \left(2 \cdot n\right)\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{elif}\;\ell \leq 5 \cdot 10^{+125}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right)}{Om} \cdot \left(n \cdot U\right), 2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\frac{\frac{n \cdot \left(U* - U\right)}{Om} - 2}{Om} \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 61.0% accurate, 2.2× speedup?

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

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

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

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


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

    1. Initial program 56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6e-153 < l < 3.8000000000000001e135

    1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\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(U - U*, \frac{n}{Om}, 2\right)}{Om}\right)}} \]

    if 3.8000000000000001e135 < l

    1. Initial program 22.6%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    4. Applied rewrites31.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.3% accurate, 2.8× speedup?

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

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

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

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


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

    1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999997e147 < l < 1.5499999999999999e192

    1. Initial program 2.4%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right) + \left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right)\right)}} \]
    4. Applied rewrites27.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 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. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5499999999999999e192 < l

    1. Initial program 23.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 rewrites27.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 39.8% accurate, 3.7× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 7 \cdot 10^{+92}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\frac{\left(U \cdot -4\right) \cdot \left(n \cdot \left(l\_m \cdot l\_m\right)\right)}{Om}}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 7e+92)
   (sqrt (* 2.0 (* U (* n t))))
   (sqrt (/ (* (* U -4.0) (* 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 <= 7e+92) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((((U * -4.0) * (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 <= 7d+92) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt((((u * (-4.0d0)) * (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 <= 7e+92) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((((U * -4.0) * (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 <= 7e+92:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((((U * -4.0) * (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 <= 7e+92)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = sqrt(Float64(Float64(Float64(U * -4.0) * 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 <= 7e+92)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((((U * -4.0) * (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, 7e+92], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(U * -4.0), $MachinePrecision] * N[(n * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 7 \cdot 10^{+92}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


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

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.99999999999999972e92 < l

    1. Initial program 29.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 l around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 39.3% accurate, 4.2× speedup?

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

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

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


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

    1. Initial program 50.8%

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < U

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 36.3% accurate, 6.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 36.7% accurate, 6.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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