Toniolo and Linder, Equation (13)

Percentage Accurate: 49.6% → 63.8%
Time: 17.3s
Alternatives: 15
Speedup: 2.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 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: 49.6% 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: 63.8% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\\ \mathbf{if}\;U \leq -4 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{t\_1 \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U} \cdot \sqrt{t\_1}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (*
          (* 2.0 n)
          (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t))))
   (if (<= U -4e-310) (sqrt (* t_1 U)) (* (sqrt U) (sqrt t_1)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (2.0 * n) * fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t);
	double tmp;
	if (U <= -4e-310) {
		tmp = sqrt((t_1 * U));
	} else {
		tmp = sqrt(U) * sqrt(t_1);
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(2.0 * n) * fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t))
	tmp = 0.0
	if (U <= -4e-310)
		tmp = sqrt(Float64(t_1 * U));
	else
		tmp = Float64(sqrt(U) * sqrt(t_1));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -4e-310], N[Sqrt[N[(t$95$1 * U), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[U], $MachinePrecision] * N[Sqrt[t$95$1], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\sqrt{U} \cdot \sqrt{t\_1}\\


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

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.999999999999988e-310 < U

    1. Initial program 49.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 54.4% accurate, 0.4× speedup?

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

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

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

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


\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*)))) < 2e-266

    1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e-266 < (*.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*)))) < 1e308

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if 1e308 < (*.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 23.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. *-commutativeN/A

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
    6. Taylor expanded in U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 52.1% accurate, 0.4× speedup?

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

      1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 2e-266 < (*.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*)))) < 1e308

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

      if 1e308 < (*.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 23.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. *-commutativeN/A

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
      6. Taylor expanded in U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{\frac{\left(U* \cdot U\right) \cdot \left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right)}{Om \cdot Om} \cdot 2}} \]
      9. Step-by-step derivation
        1. Applied rewrites36.7%

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

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

      Alternative 4: 51.9% accurate, 0.4× speedup?

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

        1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 2e-266 < (*.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*)))) < 1e308

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

        if 1e308 < (*.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 23.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. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
        6. Taylor expanded in U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 52.2% accurate, 0.4× speedup?

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

        1. Initial program 24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 2e-266 < (*.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*)))) < 1e308

        1. Initial program 99.6%

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

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

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

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

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

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

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

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

        if 1e308 < (*.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 23.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. *-commutativeN/A

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

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

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

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

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

          \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
        6. Taylor expanded in U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 38.7% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot U\\ \mathbf{if}\;\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot t\_1 \leq 0:\\ \;\;\;\;\sqrt{\left(t \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t\_1 \cdot t}\\ \end{array} \end{array} \]
        (FPCore (n U t l Om U*)
         :precision binary64
         (let* ((t_1 (* (* 2.0 n) U)))
           (if (<=
                (*
                 (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
                 t_1)
                0.0)
             (sqrt (* (* t U) (* 2.0 n)))
             (sqrt (* t_1 t)))))
        double code(double n, double U, double t, double l, double Om, double U_42_) {
        	double t_1 = (2.0 * n) * U;
        	double tmp;
        	if (((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0) {
        		tmp = sqrt(((t * U) * (2.0 * n)));
        	} else {
        		tmp = sqrt((t_1 * t));
        	}
        	return tmp;
        }
        
        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
            real(8) :: t_1
            real(8) :: tmp
            t_1 = (2.0d0 * n) * u
            if (((((u_42 - u) * (((l / om) ** 2.0d0) * n)) - ((((l * l) / om) * 2.0d0) - t)) * t_1) <= 0.0d0) then
                tmp = sqrt(((t * u) * (2.0d0 * n)))
            else
                tmp = sqrt((t_1 * t))
            end if
            code = tmp
        end function
        
        public static double code(double n, double U, double t, double l, double Om, double U_42_) {
        	double t_1 = (2.0 * n) * U;
        	double tmp;
        	if (((((U_42_ - U) * (Math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0) {
        		tmp = Math.sqrt(((t * U) * (2.0 * n)));
        	} else {
        		tmp = Math.sqrt((t_1 * t));
        	}
        	return tmp;
        }
        
        def code(n, U, t, l, Om, U_42_):
        	t_1 = (2.0 * n) * U
        	tmp = 0
        	if ((((U_42_ - U) * (math.pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0:
        		tmp = math.sqrt(((t * U) * (2.0 * n)))
        	else:
        		tmp = math.sqrt((t_1 * t))
        	return tmp
        
        function code(n, U, t, l, Om, U_42_)
        	t_1 = Float64(Float64(2.0 * n) * U)
        	tmp = 0.0
        	if (Float64(Float64(Float64(Float64(U_42_ - U) * Float64((Float64(l / Om) ^ 2.0) * n)) - Float64(Float64(Float64(Float64(l * l) / Om) * 2.0) - t)) * t_1) <= 0.0)
        		tmp = sqrt(Float64(Float64(t * U) * Float64(2.0 * n)));
        	else
        		tmp = sqrt(Float64(t_1 * t));
        	end
        	return tmp
        end
        
        function tmp_2 = code(n, U, t, l, Om, U_42_)
        	t_1 = (2.0 * n) * U;
        	tmp = 0.0;
        	if (((((U_42_ - U) * (((l / Om) ^ 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * t_1) <= 0.0)
        		tmp = sqrt(((t * U) * (2.0 * n)));
        	else
        		tmp = sqrt((t_1 * t));
        	end
        	tmp_2 = tmp;
        end
        
        code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, If[LessEqual[N[(N[(N[(N[(U$42$ - U), $MachinePrecision] * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision] * t$95$1), $MachinePrecision], 0.0], N[Sqrt[N[(N[(t * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * t), $MachinePrecision]], $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \left(2 \cdot n\right) \cdot U\\
        \mathbf{if}\;\left(\left(U* - U\right) \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot n\right) - \left(\frac{\ell \cdot \ell}{Om} \cdot 2 - t\right)\right) \cdot t\_1 \leq 0:\\
        \;\;\;\;\sqrt{\left(t \cdot U\right) \cdot \left(2 \cdot n\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{t\_1 \cdot t}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0

          1. Initial program 14.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. *-commutativeN/A

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

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

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

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

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

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

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

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

            1. Initial program 58.0%

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

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

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

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

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

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

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

              \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
            6. Step-by-step derivation
              1. Applied rewrites37.1%

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

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

            Alternative 7: 61.2% accurate, 2.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 7.8 \cdot 10^{+121}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\left(\left(-n\right) \cdot U\right) \cdot \mathsf{fma}\left(\frac{U - U*}{Om}, \frac{n}{Om}, \frac{2}{Om}\right)}\\ \end{array} \end{array} \]
            (FPCore (n U t l Om U*)
             :precision binary64
             (if (<= l 7.8e+121)
               (sqrt
                (*
                 (*
                  (* 2.0 n)
                  (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t))
                 U))
               (*
                (* (sqrt 2.0) l)
                (sqrt (* (* (- n) U) (fma (/ (- U U*) Om) (/ n Om) (/ 2.0 Om)))))))
            double code(double n, double U, double t, double l, double Om, double U_42_) {
            	double tmp;
            	if (l <= 7.8e+121) {
            		tmp = sqrt((((2.0 * n) * fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t)) * U));
            	} else {
            		tmp = (sqrt(2.0) * l) * sqrt(((-n * U) * fma(((U - U_42_) / Om), (n / Om), (2.0 / Om))));
            	}
            	return tmp;
            }
            
            function code(n, U, t, l, Om, U_42_)
            	tmp = 0.0
            	if (l <= 7.8e+121)
            		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)) * U));
            	else
            		tmp = Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(Float64(Float64(-n) * U) * fma(Float64(Float64(U - U_42_) / Om), Float64(n / Om), Float64(2.0 / Om)))));
            	end
            	return tmp
            end
            
            code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7.8e+121], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(N[((-n) * U), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] * N[(n / Om), $MachinePrecision] + N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\ell \leq 7.8 \cdot 10^{+121}:\\
            \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U}\\
            
            \mathbf{else}:\\
            \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{\left(\left(-n\right) \cdot U\right) \cdot \mathsf{fma}\left(\frac{U - U*}{Om}, \frac{n}{Om}, \frac{2}{Om}\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < 7.79999999999999967e121

              1. Initial program 57.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 \color{blue}{\left(\left(t - 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. 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)} \]
                3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 7.79999999999999967e121 < l

              1. Initial program 24.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 \color{blue}{\left(\left(t - 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. 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)} \]
                3. sub-negN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 46.8% accurate, 2.2× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 10^{+51}:\\ \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(\frac{\mathsf{fma}\left(-n, U - U*, -2 \cdot Om\right)}{Om} \cdot \frac{\ell}{Om}\right) \cdot \ell\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \end{array} \end{array} \]
            (FPCore (n U t l Om U*)
             :precision binary64
             (if (<= l 1e+51)
               (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
               (sqrt
                (*
                 (* (* (* (/ (fma (- n) (- U U*) (* -2.0 Om)) Om) (/ l Om)) l) U)
                 (* 2.0 n)))))
            double code(double n, double U, double t, double l, double Om, double U_42_) {
            	double tmp;
            	if (l <= 1e+51) {
            		tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
            	} else {
            		tmp = sqrt((((((fma(-n, (U - U_42_), (-2.0 * Om)) / Om) * (l / Om)) * l) * U) * (2.0 * n)));
            	}
            	return tmp;
            }
            
            function code(n, U, t, l, Om, U_42_)
            	tmp = 0.0
            	if (l <= 1e+51)
            		tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0));
            	else
            		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(fma(Float64(-n), Float64(U - U_42_), Float64(-2.0 * Om)) / Om) * Float64(l / Om)) * l) * U) * Float64(2.0 * n)));
            	end
            	return tmp
            end
            
            code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1e+51], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(N[((-n) * N[(U - U$42$), $MachinePrecision] + N[(-2.0 * Om), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * l), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\ell \leq 10^{+51}:\\
            \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
            
            \mathbf{else}:\\
            \;\;\;\;\sqrt{\left(\left(\left(\frac{\mathsf{fma}\left(-n, U - U*, -2 \cdot Om\right)}{Om} \cdot \frac{\ell}{Om}\right) \cdot \ell\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if l < 1e51

              1. Initial program 56.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 1e51 < l

              1. Initial program 37.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 58.9% accurate, 2.4× speedup?

              \[\begin{array}{l} \\ \sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U} \end{array} \]
              (FPCore (n U t l Om U*)
               :precision binary64
               (sqrt
                (*
                 (* (* 2.0 n) (fma (/ l Om) (fma (* (- U U*) (/ l Om)) (- n) (* -2.0 l)) t))
                 U)))
              double code(double n, double U, double t, double l, double Om, double U_42_) {
              	return sqrt((((2.0 * n) * fma((l / Om), fma(((U - U_42_) * (l / Om)), -n, (-2.0 * l)), t)) * U));
              }
              
              function code(n, U, t, l, Om, U_42_)
              	return sqrt(Float64(Float64(Float64(2.0 * n) * fma(Float64(l / Om), fma(Float64(Float64(U - U_42_) * Float64(l / Om)), Float64(-n), Float64(-2.0 * l)), t)) * U))
              end
              
              code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(l / Om), $MachinePrecision]), $MachinePrecision] * (-n) + N[(-2.0 * l), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              \sqrt{\left(\left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om}, \mathsf{fma}\left(\left(U - U*\right) \cdot \frac{\ell}{Om}, -n, -2 \cdot \ell\right), t\right)\right) \cdot U}
              \end{array}
              
              Derivation
              1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 44.6% accurate, 3.3× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+105}:\\ \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \end{array} \end{array} \]
              (FPCore (n U t l Om U*)
               :precision binary64
               (if (<= l 2.5e+105)
                 (sqrt (* (* (* (fma -2.0 (/ (* l l) Om) t) n) U) 2.0))
                 (sqrt (* (* (* (* (/ l Om) l) -2.0) U) (* 2.0 n)))))
              double code(double n, double U, double t, double l, double Om, double U_42_) {
              	double tmp;
              	if (l <= 2.5e+105) {
              		tmp = sqrt((((fma(-2.0, ((l * l) / Om), t) * n) * U) * 2.0));
              	} else {
              		tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
              	}
              	return tmp;
              }
              
              function code(n, U, t, l, Om, U_42_)
              	tmp = 0.0
              	if (l <= 2.5e+105)
              		tmp = sqrt(Float64(Float64(Float64(fma(-2.0, Float64(Float64(l * l) / Om), t) * n) * U) * 2.0));
              	else
              		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l / Om) * l) * -2.0) * U) * Float64(2.0 * n)));
              	end
              	return tmp
              end
              
              code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.5e+105], N[Sqrt[N[(N[(N[(N[(-2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;\ell \leq 2.5 \cdot 10^{+105}:\\
              \;\;\;\;\sqrt{\left(\left(\mathsf{fma}\left(-2, \frac{\ell \cdot \ell}{Om}, t\right) \cdot n\right) \cdot U\right) \cdot 2}\\
              
              \mathbf{else}:\\
              \;\;\;\;\sqrt{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if l < 2.50000000000000023e105

                1. Initial program 57.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.50000000000000023e105 < l

                1. Initial program 28.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 Om around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \sqrt{\left(\left(-2 \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \ell\right)\right) \cdot U\right) \cdot \left(2 \cdot n\right)} \]
                  3. Step-by-step derivation
                    1. Applied rewrites33.4%

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

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

                  Alternative 11: 38.6% accurate, 3.4× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\ \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \end{array} \end{array} \]
                  (FPCore (n U t l Om U*)
                   :precision binary64
                   (if (<= l 2.9e+82)
                     (sqrt (* (* (* t n) U) 2.0))
                     (sqrt (* (* (* (* (/ l Om) l) -2.0) U) (* 2.0 n)))))
                  double code(double n, double U, double t, double l, double Om, double U_42_) {
                  	double tmp;
                  	if (l <= 2.9e+82) {
                  		tmp = sqrt((((t * n) * U) * 2.0));
                  	} else {
                  		tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
                  	}
                  	return tmp;
                  }
                  
                  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
                      real(8) :: tmp
                      if (l <= 2.9d+82) then
                          tmp = sqrt((((t * n) * u) * 2.0d0))
                      else
                          tmp = sqrt((((((l / om) * l) * (-2.0d0)) * u) * (2.0d0 * n)))
                      end if
                      code = tmp
                  end function
                  
                  public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                  	double tmp;
                  	if (l <= 2.9e+82) {
                  		tmp = Math.sqrt((((t * n) * U) * 2.0));
                  	} else {
                  		tmp = Math.sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
                  	}
                  	return tmp;
                  }
                  
                  def code(n, U, t, l, Om, U_42_):
                  	tmp = 0
                  	if l <= 2.9e+82:
                  		tmp = math.sqrt((((t * n) * U) * 2.0))
                  	else:
                  		tmp = math.sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)))
                  	return tmp
                  
                  function code(n, U, t, l, Om, U_42_)
                  	tmp = 0.0
                  	if (l <= 2.9e+82)
                  		tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0));
                  	else
                  		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l / Om) * l) * -2.0) * U) * Float64(2.0 * n)));
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(n, U, t, l, Om, U_42_)
                  	tmp = 0.0;
                  	if (l <= 2.9e+82)
                  		tmp = sqrt((((t * n) * U) * 2.0));
                  	else
                  		tmp = sqrt((((((l / Om) * l) * -2.0) * U) * (2.0 * n)));
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.9e+82], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\
                  \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\sqrt{\left(\left(\left(\frac{\ell}{Om} \cdot \ell\right) \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if l < 2.9000000000000001e82

                    1. Initial program 57.2%

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

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

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

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

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

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

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

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

                    if 2.9000000000000001e82 < l

                    1. Initial program 30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \sqrt{\left(\left(-2 \cdot \left(\color{blue}{\frac{\ell}{Om}} \cdot \ell\right)\right) \cdot U\right) \cdot \left(2 \cdot n\right)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites33.4%

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

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

                      Alternative 12: 37.3% accurate, 3.4× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\ \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\frac{\ell \cdot \ell}{Om} \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \end{array} \end{array} \]
                      (FPCore (n U t l Om U*)
                       :precision binary64
                       (if (<= l 2.9e+82)
                         (sqrt (* (* (* t n) U) 2.0))
                         (sqrt (* (* (* (/ (* l l) Om) -2.0) U) (* 2.0 n)))))
                      double code(double n, double U, double t, double l, double Om, double U_42_) {
                      	double tmp;
                      	if (l <= 2.9e+82) {
                      		tmp = sqrt((((t * n) * U) * 2.0));
                      	} else {
                      		tmp = sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n)));
                      	}
                      	return tmp;
                      }
                      
                      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
                          real(8) :: tmp
                          if (l <= 2.9d+82) then
                              tmp = sqrt((((t * n) * u) * 2.0d0))
                          else
                              tmp = sqrt((((((l * l) / om) * (-2.0d0)) * u) * (2.0d0 * n)))
                          end if
                          code = tmp
                      end function
                      
                      public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                      	double tmp;
                      	if (l <= 2.9e+82) {
                      		tmp = Math.sqrt((((t * n) * U) * 2.0));
                      	} else {
                      		tmp = Math.sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n)));
                      	}
                      	return tmp;
                      }
                      
                      def code(n, U, t, l, Om, U_42_):
                      	tmp = 0
                      	if l <= 2.9e+82:
                      		tmp = math.sqrt((((t * n) * U) * 2.0))
                      	else:
                      		tmp = math.sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n)))
                      	return tmp
                      
                      function code(n, U, t, l, Om, U_42_)
                      	tmp = 0.0
                      	if (l <= 2.9e+82)
                      		tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0));
                      	else
                      		tmp = sqrt(Float64(Float64(Float64(Float64(Float64(l * l) / Om) * -2.0) * U) * Float64(2.0 * n)));
                      	end
                      	return tmp
                      end
                      
                      function tmp_2 = code(n, U, t, l, Om, U_42_)
                      	tmp = 0.0;
                      	if (l <= 2.9e+82)
                      		tmp = sqrt((((t * n) * U) * 2.0));
                      	else
                      		tmp = sqrt((((((l * l) / Om) * -2.0) * U) * (2.0 * n)));
                      	end
                      	tmp_2 = tmp;
                      end
                      
                      code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 2.9e+82], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;\ell \leq 2.9 \cdot 10^{+82}:\\
                      \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;\sqrt{\left(\left(\frac{\ell \cdot \ell}{Om} \cdot -2\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if l < 2.9000000000000001e82

                        1. Initial program 57.2%

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

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

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

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

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

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

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

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

                        if 2.9000000000000001e82 < l

                        1. Initial program 30.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \sqrt{\left(\left(-2 \cdot \color{blue}{\frac{{\ell}^{2}}{Om}}\right) \cdot U\right) \cdot \left(2 \cdot n\right)} \]
                        9. Step-by-step derivation
                          1. Applied rewrites22.4%

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

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

                        Alternative 13: 37.2% accurate, 4.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq 2.5 \cdot 10^{-75}:\\ \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot U} \cdot \sqrt{2 \cdot n}\\ \end{array} \end{array} \]
                        (FPCore (n U t l Om U*)
                         :precision binary64
                         (if (<= n 2.5e-75)
                           (sqrt (* (* (* t n) U) 2.0))
                           (* (sqrt (* t U)) (sqrt (* 2.0 n)))))
                        double code(double n, double U, double t, double l, double Om, double U_42_) {
                        	double tmp;
                        	if (n <= 2.5e-75) {
                        		tmp = sqrt((((t * n) * U) * 2.0));
                        	} else {
                        		tmp = sqrt((t * U)) * sqrt((2.0 * n));
                        	}
                        	return tmp;
                        }
                        
                        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
                            real(8) :: tmp
                            if (n <= 2.5d-75) then
                                tmp = sqrt((((t * n) * u) * 2.0d0))
                            else
                                tmp = sqrt((t * u)) * sqrt((2.0d0 * n))
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                        	double tmp;
                        	if (n <= 2.5e-75) {
                        		tmp = Math.sqrt((((t * n) * U) * 2.0));
                        	} else {
                        		tmp = Math.sqrt((t * U)) * Math.sqrt((2.0 * n));
                        	}
                        	return tmp;
                        }
                        
                        def code(n, U, t, l, Om, U_42_):
                        	tmp = 0
                        	if n <= 2.5e-75:
                        		tmp = math.sqrt((((t * n) * U) * 2.0))
                        	else:
                        		tmp = math.sqrt((t * U)) * math.sqrt((2.0 * n))
                        	return tmp
                        
                        function code(n, U, t, l, Om, U_42_)
                        	tmp = 0.0
                        	if (n <= 2.5e-75)
                        		tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0));
                        	else
                        		tmp = Float64(sqrt(Float64(t * U)) * sqrt(Float64(2.0 * n)));
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(n, U, t, l, Om, U_42_)
                        	tmp = 0.0;
                        	if (n <= 2.5e-75)
                        		tmp = sqrt((((t * n) * U) * 2.0));
                        	else
                        		tmp = sqrt((t * U)) * sqrt((2.0 * n));
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 2.5e-75], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(t * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;n \leq 2.5 \cdot 10^{-75}:\\
                        \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\sqrt{t \cdot U} \cdot \sqrt{2 \cdot n}\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if n < 2.49999999999999989e-75

                          1. Initial program 55.4%

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

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

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

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

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

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

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

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

                          if 2.49999999999999989e-75 < n

                          1. Initial program 46.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}}^{\frac{1}{2}} \]
                            5. unpow-prod-downN/A

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

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

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

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

                              \[\leadsto \sqrt{2 \cdot n} \cdot \color{blue}{\sqrt{U \cdot t}} \]
                            10. lower-sqrt.f6424.5

                              \[\leadsto \sqrt{2 \cdot n} \cdot \color{blue}{\sqrt{U \cdot t}} \]
                          12. Applied rewrites24.5%

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

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

                        Alternative 14: 35.5% accurate, 6.8× speedup?

                        \[\begin{array}{l} \\ \sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2} \end{array} \]
                        (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* t n) U) 2.0)))
                        double code(double n, double U, double t, double l, double Om, double U_42_) {
                        	return sqrt((((t * n) * U) * 2.0));
                        }
                        
                        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((((t * n) * u) * 2.0d0))
                        end function
                        
                        public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                        	return Math.sqrt((((t * n) * U) * 2.0));
                        }
                        
                        def code(n, U, t, l, Om, U_42_):
                        	return math.sqrt((((t * n) * U) * 2.0))
                        
                        function code(n, U, t, l, Om, U_42_)
                        	return sqrt(Float64(Float64(Float64(t * n) * U) * 2.0))
                        end
                        
                        function tmp = code(n, U, t, l, Om, U_42_)
                        	tmp = sqrt((((t * n) * U) * 2.0));
                        end
                        
                        code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}
                        \end{array}
                        
                        Derivation
                        1. Initial program 53.1%

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

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

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

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

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

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

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

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

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

                        Alternative 15: 35.7% accurate, 6.8× speedup?

                        \[\begin{array}{l} \\ \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t} \end{array} \]
                        (FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* (* 2.0 n) U) t)))
                        double code(double n, double U, double t, double l, double Om, double U_42_) {
                        	return sqrt((((2.0 * n) * U) * t));
                        }
                        
                        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))
                        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));
                        }
                        
                        def code(n, U, t, l, Om, U_42_):
                        	return math.sqrt((((2.0 * n) * U) * t))
                        
                        function code(n, U, t, l, Om, U_42_)
                        	return sqrt(Float64(Float64(Float64(2.0 * n) * U) * t))
                        end
                        
                        function tmp = code(n, U, t, l, Om, U_42_)
                        	tmp = sqrt((((2.0 * n) * U) * t));
                        end
                        
                        code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]
                        
                        \begin{array}{l}
                        
                        \\
                        \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}
                        \end{array}
                        
                        Derivation
                        1. Initial program 53.1%

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

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

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

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

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

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

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

                          \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot t\right) \cdot U\right) \cdot 2}} \]
                        6. Step-by-step derivation
                          1. Applied rewrites35.0%

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

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

                          Reproduce

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