Toniolo and Linder, Equation (13)

Percentage Accurate: 50.7% → 65.3%
Time: 14.9s
Alternatives: 16
Speedup: 2.5×

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 16 alternatives:

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

Initial Program: 50.7% accurate, 1.0× speedup?

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

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

Alternative 1: 65.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+273}:\\
\;\;\;\;\sqrt{t\_1}\\

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


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

    1. Initial program 17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.8%

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

    if 9.99999999999999945e272 < (*.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 17.0%

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

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

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

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

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

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

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

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

        Alternative 2: 55.3% accurate, 0.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ t_4 := \sqrt{\left(2 \cdot U\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 10^{+273}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\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}\\ \end{array} \end{array} \]
        (FPCore (n U t l Om U*)
         :precision binary64
         (let* ((t_1 (/ (* l l) Om))
                (t_2 (* (* 2.0 n) U))
                (t_3
                 (* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
                (t_4 (sqrt (* (* 2.0 U) (* (fma (* -2.0 l) (/ l Om) t) n)))))
           (if (<= t_3 0.0)
             t_4
             (if (<= t_3 1e+273)
               (sqrt (* t_2 (fma -2.0 t_1 t)))
               (if (<= t_3 INFINITY)
                 t_4
                 (sqrt (* (/ (* (* U* U) (* (* n l) (* n l))) (* Om Om)) 2.0)))))))
        double code(double n, double U, double t, double l, double Om, double U_42_) {
        	double t_1 = (l * l) / Om;
        	double t_2 = (2.0 * n) * U;
        	double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
        	double t_4 = sqrt(((2.0 * U) * (fma((-2.0 * l), (l / Om), t) * n)));
        	double tmp;
        	if (t_3 <= 0.0) {
        		tmp = t_4;
        	} else if (t_3 <= 1e+273) {
        		tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
        	} else if (t_3 <= ((double) INFINITY)) {
        		tmp = t_4;
        	} else {
        		tmp = sqrt(((((U_42_ * U) * ((n * l) * (n * l))) / (Om * Om)) * 2.0));
        	}
        	return tmp;
        }
        
        function code(n, U, t, l, Om, U_42_)
        	t_1 = Float64(Float64(l * l) / Om)
        	t_2 = Float64(Float64(2.0 * n) * U)
        	t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))
        	t_4 = sqrt(Float64(Float64(2.0 * U) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n)))
        	tmp = 0.0
        	if (t_3 <= 0.0)
        		tmp = t_4;
        	elseif (t_3 <= 1e+273)
        		tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t)));
        	elseif (t_3 <= Inf)
        		tmp = t_4;
        	else
        		tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * U) * Float64(Float64(n * l) * Float64(n * l))) / Float64(Om * Om)) * 2.0));
        	end
        	return tmp
        end
        
        code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1e+273], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[Sqrt[N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * N[(N[(n * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{\ell \cdot \ell}{Om}\\
        t_2 := \left(2 \cdot n\right) \cdot U\\
        t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
        t_4 := \sqrt{\left(2 \cdot U\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
        \mathbf{if}\;t\_3 \leq 0:\\
        \;\;\;\;t\_4\\
        
        \mathbf{elif}\;t\_3 \leq 10^{+273}:\\
        \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
        
        \mathbf{elif}\;t\_3 \leq \infty:\\
        \;\;\;\;t\_4\\
        
        \mathbf{else}:\\
        \;\;\;\;\sqrt{\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}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0 or 9.99999999999999945e272 < (*.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 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

            1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 3: 54.0% accurate, 0.3× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\ell \cdot \ell}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ t_4 := \sqrt{\left(2 \cdot U\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 10^{+273}:\\ \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{Om}\\ \end{array} \end{array} \]
            (FPCore (n U t l Om U*)
             :precision binary64
             (let* ((t_1 (/ (* l l) Om))
                    (t_2 (* (* 2.0 n) U))
                    (t_3
                     (* t_2 (- (- t (* 2.0 t_1)) (* (* n (pow (/ l Om) 2.0)) (- U U*)))))
                    (t_4 (sqrt (* (* 2.0 U) (* (fma (* -2.0 l) (/ l Om) t) n)))))
               (if (<= t_3 0.0)
                 t_4
                 (if (<= t_3 1e+273)
                   (sqrt (* t_2 (fma -2.0 t_1 t)))
                   (if (<= t_3 INFINITY)
                     t_4
                     (* (sqrt (* U* U)) (/ (* (* (sqrt 2.0) n) l) Om)))))))
            double code(double n, double U, double t, double l, double Om, double U_42_) {
            	double t_1 = (l * l) / Om;
            	double t_2 = (2.0 * n) * U;
            	double t_3 = t_2 * ((t - (2.0 * t_1)) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
            	double t_4 = sqrt(((2.0 * U) * (fma((-2.0 * l), (l / Om), t) * n)));
            	double tmp;
            	if (t_3 <= 0.0) {
            		tmp = t_4;
            	} else if (t_3 <= 1e+273) {
            		tmp = sqrt((t_2 * fma(-2.0, t_1, t)));
            	} else if (t_3 <= ((double) INFINITY)) {
            		tmp = t_4;
            	} else {
            		tmp = sqrt((U_42_ * U)) * (((sqrt(2.0) * n) * l) / Om);
            	}
            	return tmp;
            }
            
            function code(n, U, t, l, Om, U_42_)
            	t_1 = Float64(Float64(l * l) / Om)
            	t_2 = Float64(Float64(2.0 * n) * U)
            	t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_1)) - Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U - U_42_))))
            	t_4 = sqrt(Float64(Float64(2.0 * U) * Float64(fma(Float64(-2.0 * l), Float64(l / Om), t) * n)))
            	tmp = 0.0
            	if (t_3 <= 0.0)
            		tmp = t_4;
            	elseif (t_3 <= 1e+273)
            		tmp = sqrt(Float64(t_2 * fma(-2.0, t_1, t)));
            	elseif (t_3 <= Inf)
            		tmp = t_4;
            	else
            		tmp = Float64(sqrt(Float64(U_42_ * U)) * Float64(Float64(Float64(sqrt(2.0) * n) * l) / Om));
            	end
            	return tmp
            end
            
            code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision] - N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision] * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], t$95$4, If[LessEqual[t$95$3, 1e+273], N[Sqrt[N[(t$95$2 * N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, N[(N[Sqrt[N[(U$42$ * U), $MachinePrecision]], $MachinePrecision] * N[(N[(N[(N[Sqrt[2.0], $MachinePrecision] * n), $MachinePrecision] * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]]]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_1 := \frac{\ell \cdot \ell}{Om}\\
            t_2 := \left(2 \cdot n\right) \cdot U\\
            t_3 := t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
            t_4 := \sqrt{\left(2 \cdot U\right) \cdot \left(\mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right) \cdot n\right)}\\
            \mathbf{if}\;t\_3 \leq 0:\\
            \;\;\;\;t\_4\\
            
            \mathbf{elif}\;t\_3 \leq 10^{+273}:\\
            \;\;\;\;\sqrt{t\_2 \cdot \mathsf{fma}\left(-2, t\_1, t\right)}\\
            
            \mathbf{elif}\;t\_3 \leq \infty:\\
            \;\;\;\;t\_4\\
            
            \mathbf{else}:\\
            \;\;\;\;\sqrt{U* \cdot U} \cdot \frac{\left(\sqrt{2} \cdot n\right) \cdot \ell}{Om}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 0.0 or 9.99999999999999945e272 < (*.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 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 4: 65.4% accurate, 0.4× speedup?

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

                1. Initial program 17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 9.99999999999999945e272 < (*.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 17.0%

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

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

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

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

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

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

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

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

                    Alternative 5: 63.3% accurate, 0.4× speedup?

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

                      1. Initial program 17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      1. Initial program 97.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9.99999999999999945e272 < (*.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 17.0%

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

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

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

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

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

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

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

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

                            Alternative 6: 58.7% accurate, 0.7× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{-\ell}{Om}, \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right) \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(\left(\frac{\left(2 - U* \cdot \frac{n}{Om}\right) \cdot n}{Om} \cdot \ell\right) \cdot \ell, -2, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\ \end{array} \end{array} \]
                            (FPCore (n U t l Om U*)
                             :precision binary64
                             (if (<=
                                  (*
                                   (* (* 2.0 n) U)
                                   (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                  INFINITY)
                               (sqrt
                                (* (* (fma (/ (- l) Om) (* (fma (- U U*) (/ n Om) 2.0) l) t) U) (* 2.0 n)))
                               (sqrt
                                (*
                                 (fma
                                  (* (* (/ (* (- 2.0 (* U* (/ n Om))) n) Om) l) l)
                                  -2.0
                                  (* (* t n) 2.0))
                                 U))))
                            double code(double n, double U, double t, double l, double Om, double U_42_) {
                            	double tmp;
                            	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
                            		tmp = sqrt(((fma((-l / Om), (fma((U - U_42_), (n / Om), 2.0) * l), t) * U) * (2.0 * n)));
                            	} else {
                            		tmp = sqrt((fma((((((2.0 - (U_42_ * (n / Om))) * n) / Om) * l) * l), -2.0, ((t * n) * 2.0)) * U));
                            	}
                            	return tmp;
                            }
                            
                            function code(n, U, t, l, Om, U_42_)
                            	tmp = 0.0
                            	if (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_)))) <= Inf)
                            		tmp = sqrt(Float64(Float64(fma(Float64(Float64(-l) / Om), Float64(fma(Float64(U - U_42_), Float64(n / Om), 2.0) * l), t) * U) * Float64(2.0 * n)));
                            	else
                            		tmp = sqrt(Float64(fma(Float64(Float64(Float64(Float64(Float64(2.0 - Float64(U_42_ * Float64(n / Om))) * n) / Om) * l) * l), -2.0, Float64(Float64(t * n) * 2.0)) * U));
                            	end
                            	return tmp
                            end
                            
                            code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], Infinity], N[Sqrt[N[(N[(N[(N[((-l) / Om), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n / Om), $MachinePrecision] + 2.0), $MachinePrecision] * l), $MachinePrecision] + t), $MachinePrecision] * U), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(N[(N[(N[(N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision] * l), $MachinePrecision] * l), $MachinePrecision] * -2.0 + N[(N[(t * n), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
                            \;\;\;\;\sqrt{\left(\mathsf{fma}\left(\frac{-\ell}{Om}, \mathsf{fma}\left(U - U*, \frac{n}{Om}, 2\right) \cdot \ell, t\right) \cdot U\right) \cdot \left(2 \cdot n\right)}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\sqrt{\mathsf{fma}\left(\left(\frac{\left(2 - U* \cdot \frac{n}{Om}\right) \cdot n}{Om} \cdot \ell\right) \cdot \ell, -2, \left(t \cdot n\right) \cdot 2\right) \cdot U}\\
                            
                            
                            \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 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              1. Initial program 0.0%

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

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

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

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

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

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

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

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

                                Alternative 7: 51.8% accurate, 0.7× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)\right)}{Om}}\\ \end{array} \end{array} \]
                                (FPCore (n U t l Om U*)
                                 :precision binary64
                                 (if (<=
                                      (*
                                       (* (* 2.0 n) U)
                                       (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                      INFINITY)
                                   (* (sqrt 2.0) (sqrt (* (* U (fma (* -2.0 l) (/ l Om) t)) n)))
                                   (sqrt (* -2.0 (/ (* (* U (* l l)) (* n (fma n (/ (- U U*) Om) 2.0))) Om)))))
                                double code(double n, double U, double t, double l, double Om, double U_42_) {
                                	double tmp;
                                	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
                                		tmp = sqrt(2.0) * sqrt(((U * fma((-2.0 * l), (l / Om), t)) * n));
                                	} else {
                                		tmp = sqrt((-2.0 * (((U * (l * l)) * (n * fma(n, ((U - U_42_) / Om), 2.0))) / Om)));
                                	}
                                	return tmp;
                                }
                                
                                function code(n, U, t, l, Om, U_42_)
                                	tmp = 0.0
                                	if (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_)))) <= Inf)
                                		tmp = Float64(sqrt(2.0) * sqrt(Float64(Float64(U * fma(Float64(-2.0 * l), Float64(l / Om), t)) * n)));
                                	else
                                		tmp = sqrt(Float64(-2.0 * Float64(Float64(Float64(U * Float64(l * l)) * Float64(n * fma(n, Float64(Float64(U - U_42_) / Om), 2.0))) / Om)));
                                	end
                                	return tmp
                                end
                                
                                code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(U * N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(N[(U * N[(l * l), $MachinePrecision]), $MachinePrecision] * N[(n * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
                                \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;\sqrt{-2 \cdot \frac{\left(U \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)\right)}{Om}}\\
                                
                                
                                \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 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

                                        Alternative 8: 52.2% accurate, 0.7× speedup?

                                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(\ell \cdot \ell\right) \cdot \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om}\right) \cdot -2\right) \cdot U}\\ \end{array} \end{array} \]
                                        (FPCore (n U t l Om U*)
                                         :precision binary64
                                         (if (<=
                                              (*
                                               (* (* 2.0 n) U)
                                               (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                              INFINITY)
                                           (* (sqrt 2.0) (sqrt (* (* U (fma (* -2.0 l) (/ l Om) t)) n)))
                                           (sqrt (* (* (* (* l l) (/ (* (- 2.0 (/ (* U* n) Om)) n) Om)) -2.0) U))))
                                        double code(double n, double U, double t, double l, double Om, double U_42_) {
                                        	double tmp;
                                        	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
                                        		tmp = sqrt(2.0) * sqrt(((U * fma((-2.0 * l), (l / Om), t)) * n));
                                        	} else {
                                        		tmp = sqrt(((((l * l) * (((2.0 - ((U_42_ * n) / Om)) * n) / Om)) * -2.0) * U));
                                        	}
                                        	return tmp;
                                        }
                                        
                                        function code(n, U, t, l, Om, U_42_)
                                        	tmp = 0.0
                                        	if (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_)))) <= Inf)
                                        		tmp = Float64(sqrt(2.0) * sqrt(Float64(Float64(U * fma(Float64(-2.0 * l), Float64(l / Om), t)) * n)));
                                        	else
                                        		tmp = sqrt(Float64(Float64(Float64(Float64(l * l) * Float64(Float64(Float64(2.0 - Float64(Float64(U_42_ * n) / Om)) * n) / Om)) * -2.0) * U));
                                        	end
                                        	return tmp
                                        end
                                        
                                        code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(U * N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(N[(N[(l * l), $MachinePrecision] * N[(N[(N[(2.0 - N[(N[(U$42$ * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision]]
                                        
                                        \begin{array}{l}
                                        
                                        \\
                                        \begin{array}{l}
                                        \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
                                        \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\
                                        
                                        \mathbf{else}:\\
                                        \;\;\;\;\sqrt{\left(\left(\left(\ell \cdot \ell\right) \cdot \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om}\right) \cdot -2\right) \cdot U}\\
                                        
                                        
                                        \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 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            1. Initial program 0.0%

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

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

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

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

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

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

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

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

                                                  \[\leadsto \sqrt{\left(\left(\left(\ell \cdot \ell\right) \cdot \frac{\left(2 - \frac{U* \cdot n}{Om}\right) \cdot n}{Om}\right) \cdot -2\right) \cdot U} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 9: 50.8% accurate, 0.8× speedup?

                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(\left(-U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)\right) \cdot U*\right) \cdot \frac{-2}{Om \cdot Om}}\\ \end{array} \end{array} \]
                                              (FPCore (n U t l Om U*)
                                               :precision binary64
                                               (if (<=
                                                    (*
                                                     (* (* 2.0 n) U)
                                                     (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                                    INFINITY)
                                                 (* (sqrt 2.0) (sqrt (* (* U (fma (* -2.0 l) (/ l Om) t)) n)))
                                                 (sqrt (* (* (* (- U) (* (* l n) (* l n))) U*) (/ -2.0 (* Om Om))))))
                                              double code(double n, double U, double t, double l, double Om, double U_42_) {
                                              	double tmp;
                                              	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
                                              		tmp = sqrt(2.0) * sqrt(((U * fma((-2.0 * l), (l / Om), t)) * n));
                                              	} else {
                                              		tmp = sqrt((((-U * ((l * n) * (l * n))) * U_42_) * (-2.0 / (Om * Om))));
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(n, U, t, l, Om, U_42_)
                                              	tmp = 0.0
                                              	if (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_)))) <= Inf)
                                              		tmp = Float64(sqrt(2.0) * sqrt(Float64(Float64(U * fma(Float64(-2.0 * l), Float64(l / Om), t)) * n)));
                                              	else
                                              		tmp = sqrt(Float64(Float64(Float64(Float64(-U) * Float64(Float64(l * n) * Float64(l * n))) * U_42_) * Float64(-2.0 / Float64(Om * Om))));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(U * N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(N[((-U) * N[(N[(l * n), $MachinePrecision] * N[(l * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * U$42$), $MachinePrecision] * N[(-2.0 / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
                                              
                                              \begin{array}{l}
                                              
                                              \\
                                              \begin{array}{l}
                                              \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
                                              \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;\sqrt{\left(\left(\left(-U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)\right) \cdot U*\right) \cdot \frac{-2}{Om \cdot Om}}\\
                                              
                                              
                                              \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 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto \sqrt{\left(\left(\left(-U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(\ell \cdot n\right)\right)\right) \cdot U*\right) \cdot \frac{-2}{Om \cdot Om}} \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 10: 50.7% accurate, 0.8× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\ \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\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}\\ \end{array} \end{array} \]
                                                    (FPCore (n U t l Om U*)
                                                     :precision binary64
                                                     (if (<=
                                                          (*
                                                           (* (* 2.0 n) U)
                                                           (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))
                                                          INFINITY)
                                                       (* (sqrt 2.0) (sqrt (* (* U (fma (* -2.0 l) (/ l Om) t)) n)))
                                                       (sqrt (* (/ (* (* U* U) (* (* n l) (* n l))) (* Om Om)) 2.0))))
                                                    double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                    	double tmp;
                                                    	if ((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)))) <= ((double) INFINITY)) {
                                                    		tmp = sqrt(2.0) * sqrt(((U * fma((-2.0 * l), (l / Om), t)) * n));
                                                    	} else {
                                                    		tmp = sqrt(((((U_42_ * U) * ((n * l) * (n * l))) / (Om * Om)) * 2.0));
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    function code(n, U, t, l, Om, U_42_)
                                                    	tmp = 0.0
                                                    	if (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_)))) <= Inf)
                                                    		tmp = Float64(sqrt(2.0) * sqrt(Float64(Float64(U * fma(Float64(-2.0 * l), Float64(l / Om), t)) * n)));
                                                    	else
                                                    		tmp = sqrt(Float64(Float64(Float64(Float64(U_42_ * U) * Float64(Float64(n * l) * Float64(n * l))) / Float64(Om * Om)) * 2.0));
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[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], Infinity], N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(N[(U * N[(N[(-2.0 * l), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * n), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[(N[(N[(N[(U$42$ * U), $MachinePrecision] * N[(N[(n * l), $MachinePrecision] * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right) \leq \infty:\\
                                                    \;\;\;\;\sqrt{2} \cdot \sqrt{\left(U \cdot \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot n}\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;\sqrt{\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}\\
                                                    
                                                    
                                                    \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 56.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 11: 38.8% accurate, 0.9× speedup?

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

                                                          1. Initial program 17.4%

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

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

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

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

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

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

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

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

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

                                                          1. Initial program 50.7%

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

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

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

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

                                                              \[\leadsto \sqrt{\left(\left(n \cdot U\right) \cdot t\right) \cdot 2} \]
                                                          7. Recombined 2 regimes into one program.
                                                          8. Add Preprocessing

                                                          Alternative 12: 62.4% accurate, 2.1× speedup?

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

                                                            1. Initial program 47.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if 4.999999999999985e-310 < U

                                                            1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 13: 57.4% accurate, 2.5× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          Alternative 14: 42.1% accurate, 3.3× speedup?

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

                                                            1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

                                                              if 1.8500000000000001e-56 < l

                                                              1. Initial program 33.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 15: 35.8% accurate, 6.8× speedup?

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

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

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

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

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

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

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

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

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

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

                                                                Alternative 16: 36.3% accurate, 6.8× speedup?

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

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

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

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

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

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

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

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

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

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

                                                                  Reproduce

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