Toniolo and Linder, Equation (13)

Percentage Accurate: 49.9% → 61.5%
Time: 17.7s
Alternatives: 15
Speedup: 2.8×

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.9% 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: 61.5% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(2 \cdot n\right) \cdot \mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2 - \frac{-n}{Om} \cdot U*, t\right)\\ \mathbf{if}\;U \leq -2 \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) l) (- -2.0 (* (/ (- n) Om) U*)) t))))
   (if (<= U -2e-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) * l), (-2.0 - ((-n / Om) * U_42_)), t);
	double tmp;
	if (U <= -2e-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(Float64(l / Om) * l), Float64(-2.0 - Float64(Float64(Float64(-n) / Om) * U_42_)), t))
	tmp = 0.0
	if (U <= -2e-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[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * N[(-2.0 - N[(N[((-n) / Om), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, -2e-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} \cdot \ell, -2 - \frac{-n}{Om} \cdot U*, t\right)\\
\mathbf{if}\;U \leq -2 \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 < -1.999999999999994e-310

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

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

        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. lower-*.f6456.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.999999999999994e-310 < U

    1. Initial program 50.8%

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

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

        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. lower-*.f6450.8

        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
    3. Applied rewrites54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 51.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \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 \infty:\\ \;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\ \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
 (if (<=
      (*
       (- (* (- U* U) (* (pow (/ l Om) 2.0) n)) (- (* (/ (* l l) Om) 2.0) t))
       (* (* 2.0 n) U))
      INFINITY)
   (sqrt (* (* (fma (* (/ l Om) l) -2.0 t) (* 2.0 n)) U))
   (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 tmp;
	if (((((U_42_ - U) * (pow((l / Om), 2.0) * n)) - ((((l * l) / Om) * 2.0) - t)) * ((2.0 * n) * U)) <= ((double) INFINITY)) {
		tmp = sqrt(((fma(((l / Om) * l), -2.0, t) * (2.0 * n)) * U));
	} 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_)
	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)) * Float64(Float64(2.0 * n) * U)) <= Inf)
		tmp = sqrt(Float64(Float64(fma(Float64(Float64(l / Om) * l), -2.0, t) * Float64(2.0 * n)) * U));
	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$_] := 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] * N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]), $MachinePrecision], Infinity], N[Sqrt[N[(N[(N[(N[(N[(l / Om), $MachinePrecision] * l), $MachinePrecision] * -2.0 + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision] * U), $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}
\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 \infty:\\
\;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\

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

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

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

        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. lower-*.f6460.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 0.0%

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

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

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. lower-*.f640.0

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

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

          \[\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} \]
      7. Applied rewrites41.0%

        \[\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. Recombined 2 regimes into one program.
    10. Final simplification57.4%

      \[\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 \infty:\\ \;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{\ell}{Om} \cdot \ell, -2, t\right) \cdot \left(2 \cdot n\right)\right) \cdot U}\\ \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} \]
    11. Add Preprocessing

    Alternative 3: 57.6% accurate, 2.1× speedup?

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

      1. Initial program 53.4%

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

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

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. lower-*.f6453.4

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 7.0000000000000002e219 < t

      1. Initial program 54.1%

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

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

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. lower-*.f6454.1

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 57.8% accurate, 2.2× speedup?

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

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

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

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. lower-*.f6454.9

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. Applied rewrites56.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.2499999999999999e-97 < n < 1.25000000000000007e-123

      1. Initial program 50.8%

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

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

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. lower-*.f6450.8

          \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. Applied rewrites47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 5: 57.6% accurate, 2.4× speedup?

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

        1. Initial program 53.4%

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

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

            \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
          3. lower-*.f6453.4

            \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 1.1e228 < t

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

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

            \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
          3. lower-*.f6454.3

            \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
        3. Applied rewrites53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{{\left(\left(n \cdot 2\right) \cdot U\right)}^{\frac{1}{2}} \cdot {t}^{\frac{1}{2}}} \]
          3. Applied rewrites84.8%

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

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

        Alternative 6: 50.1% accurate, 2.5× speedup?

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

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

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

              \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
            3. lower-*.f6454.4

              \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
          3. Applied rewrites52.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 0.024500000000000001 < n

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

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

                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
              3. lower-*.f6451.2

                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
            3. Applied rewrites57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 52.1% accurate, 2.8× speedup?

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

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

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

                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
              3. lower-*.f6456.6

                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
            3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -4.1000000000000002e-297 < U

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

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

                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                3. lower-*.f6450.5

                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
              3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 8: 50.1% accurate, 2.8× speedup?

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

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

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

                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                  3. lower-*.f6453.7

                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                3. Applied rewrites51.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 1.8000000000000001e-26 < n

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

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

                      \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                    3. lower-*.f6453.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 9: 47.1% accurate, 2.8× speedup?

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

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

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

                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                      3. lower-*.f6454.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 2.3000000000000001e119 < n

                      1. Initial program 48.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 U* around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 10: 49.2% accurate, 3.3× speedup?

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

                          1. Initial program 53.4%

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

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

                              \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                            3. lower-*.f6453.4

                              \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                          3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if 5.99999999999999972e227 < t

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

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

                                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                              3. lower-*.f6454.3

                                \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                            3. Applied rewrites53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{{\left(\left(n \cdot 2\right) \cdot U\right)}^{\frac{1}{2}} \cdot {t}^{\frac{1}{2}}} \]
                              3. Applied rewrites84.8%

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

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

                            Alternative 11: 45.9% accurate, 3.3× speedup?

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

                              1. Initial program 53.4%

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

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

                                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                3. lower-*.f6453.4

                                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                              3. Applied rewrites53.6%

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

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

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

                                  \[\leadsto \sqrt{\left(U \cdot \left(n \cdot \color{blue}{\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right) \cdot 2} \]
                                4. 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}} \]
                              7. Applied rewrites49.6%

                                \[\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.79999999999999984e227 < t

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

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

                                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                3. lower-*.f6454.3

                                  \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                              3. Applied rewrites53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{{\left(\left(n \cdot 2\right) \cdot U\right)}^{\frac{1}{2}} \cdot {t}^{\frac{1}{2}}} \]
                                3. Applied rewrites84.8%

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

                                \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.8 \cdot 10^{+227}:\\ \;\;\;\;\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{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\ \end{array} \]
                              11. Add Preprocessing

                              Alternative 12: 39.5% accurate, 4.2× speedup?

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

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

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

                                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                  3. lower-*.f6456.6

                                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                3. Applied rewrites53.6%

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

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

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

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

                                if -4.1000000000000002e-297 < U

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

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

                                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                  3. lower-*.f6450.5

                                    \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot t} \cdot {U}^{\frac{1}{2}}} \]
                                  3. Applied rewrites51.4%

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

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

                                Alternative 13: 39.5% accurate, 4.2× speedup?

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

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

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

                                      \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                    3. lower-*.f6456.6

                                      \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                  3. Applied rewrites53.6%

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

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

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

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

                                  if -4.1000000000000002e-297 < U

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

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

                                      \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                    3. lower-*.f6450.5

                                      \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                  3. Applied rewrites53.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \color{blue}{\sqrt{t \cdot n} \cdot \sqrt{2 \cdot U}} \]
                                      10. pow1/2N/A

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

                                        \[\leadsto \color{blue}{\sqrt{t \cdot n} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
                                    3. Applied rewrites51.4%

                                      \[\leadsto \color{blue}{\sqrt{t \cdot n} \cdot \sqrt{2 \cdot U}} \]
                                  9. Recombined 2 regimes into one program.
                                  10. Final simplification45.7%

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

                                  Alternative 14: 39.8% accurate, 4.2× speedup?

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

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

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

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                      3. lower-*.f6452.2

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                    3. Applied rewrites49.9%

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

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

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

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

                                    if 9.99999999999948e-312 < t

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

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

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                      3. lower-*.f6454.8

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                    3. Applied rewrites57.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{U \cdot n}} \]
                                      3. Applied rewrites49.4%

                                        \[\leadsto \color{blue}{\sqrt{t \cdot 2} \cdot \sqrt{n \cdot U}} \]
                                    9. Recombined 2 regimes into one program.
                                    10. Final simplification45.3%

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

                                    Alternative 15: 36.2% 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.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. Step-by-step derivation
                                      1. lift-*.f64N/A

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

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                      3. lower-*.f6453.5

                                        \[\leadsto \sqrt{\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) \cdot \left(\left(2 \cdot n\right) \cdot U\right)}} \]
                                    3. Applied rewrites53.6%

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

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

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

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

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

                                    Reproduce

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