Toniolo and Linder, Equation (13)

Percentage Accurate: 49.0% → 57.8%
Time: 17.7s
Alternatives: 17
Speedup: 2.0×

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

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

Initial Program: 49.0% 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: 57.8% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 1.54999999999999993e118

    1. Initial program 47.9%

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

      \[\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 rewrites61.6%

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

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

        if 1.54999999999999993e118 < n

        1. Initial program 59.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 62.3% accurate, 0.4× speedup?

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

          1. Initial program 9.7%

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

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

            \[\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 rewrites53.6%

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

            if 1.99998e-320 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 2.00000000000000003e306

            1. Initial program 96.8%

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

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

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

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

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

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

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

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

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

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

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

            if 2.00000000000000003e306 < (*.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 24.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 rewrites29.7%

              \[\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 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}}} \]
            7. Step-by-step derivation
              1. Applied rewrites30.1%

                \[\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}}} \]
              2. Applied rewrites49.5%

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

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

            Alternative 3: 61.7% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \sqrt{\mathsf{fma}\left(\left(\ell \cdot U\right) \cdot \left(\ell \cdot \frac{n}{Om}\right), -4, \left(\left(n \cdot t\right) \cdot U\right) \cdot 2\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*)))) < 2.00000000000000003e306

                1. Initial program 96.2%

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.00000000000000003e306 < (*.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 24.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 rewrites29.7%

                  \[\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 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}}} \]
                7. Step-by-step derivation
                  1. Applied rewrites30.1%

                    \[\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}}} \]
                  2. Applied rewrites49.5%

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

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

                Alternative 4: 49.9% accurate, 0.4× speedup?

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

                  1. Initial program 8.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if +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 rewrites20.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 5: 49.8% accurate, 0.4× speedup?

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

                      1. Initial program 8.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 6: 37.4% accurate, 0.9× speedup?

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

                          1. Initial program 57.8%

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

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

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

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

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

                            1. Initial program 46.5%

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

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

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

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

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

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

                            Alternative 7: 46.1% accurate, 2.0× speedup?

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

                              1. Initial program 54.2%

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

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

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

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

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

                                if 2.80000000000000023e-135 < l < 6.8000000000000003e67

                                1. Initial program 44.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 rewrites61.1%

                                  \[\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 rewrites61.2%

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

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

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

                                      if 6.8000000000000003e67 < l

                                      1. Initial program 36.5%

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

                                        \[\leadsto \sqrt{\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 rewrites40.6%

                                        \[\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 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}}} \]
                                      7. Step-by-step derivation
                                        1. Applied rewrites42.7%

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

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

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

                                      Alternative 8: 44.2% accurate, 2.4× speedup?

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

                                        1. Initial program 51.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-*.f6445.4

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

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

                                        if 1.45e8 < l

                                        1. Initial program 41.8%

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

                                            \[\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}}} \]
                                          2. Applied rewrites64.2%

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

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

                                        Alternative 9: 48.8% accurate, 2.4× speedup?

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

                                          1. Initial program 52.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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if 7.2e52 < l

                                          1. Initial program 37.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 rewrites43.0%

                                            \[\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 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}}} \]
                                          7. Step-by-step derivation
                                            1. Applied rewrites45.1%

                                              \[\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}}} \]
                                            2. Applied rewrites65.5%

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

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

                                          Alternative 10: 48.5% accurate, 2.5× speedup?

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

                                            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 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-*.f6440.4

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

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

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

                                              if -1.2000000000000001e146 < n < 6e13

                                              1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 6e13 < n

                                                1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                Alternative 11: 46.9% accurate, 2.8× speedup?

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

                                                  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 Om around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    if 1.2500000000000001e171 < t

                                                    1. Initial program 40.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 U* around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      Alternative 12: 48.1% accurate, 2.8× speedup?

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

                                                        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 Om around inf

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                          if 1.2500000000000001e171 < t

                                                          1. Initial program 40.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 U* around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            Alternative 13: 44.9% accurate, 3.3× speedup?

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

                                                              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 n around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              if 1.2500000000000001e171 < t

                                                              1. Initial program 40.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 U* around 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                Alternative 14: 37.6% accurate, 3.7× speedup?

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

                                                                  1. Initial program 52.5%

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

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

                                                                  1. Initial program 35.7%

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

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

                                                                    \[\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 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}}} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites43.9%

                                                                      \[\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}}} \]
                                                                    2. Taylor expanded in Om around inf

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

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

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

                                                                    Alternative 15: 37.1% accurate, 4.2× speedup?

                                                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq 200000000000:\\ \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(t \cdot U\right) \cdot 2} \cdot \sqrt{n}\\ \end{array} \end{array} \]
                                                                    (FPCore (n U t l Om U*)
                                                                     :precision binary64
                                                                     (if (<= n 200000000000.0)
                                                                       (sqrt (* (* (* t n) U) 2.0))
                                                                       (* (sqrt (* (* t U) 2.0)) (sqrt n))))
                                                                    double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                    	double tmp;
                                                                    	if (n <= 200000000000.0) {
                                                                    		tmp = sqrt((((t * n) * U) * 2.0));
                                                                    	} else {
                                                                    		tmp = sqrt(((t * U) * 2.0)) * sqrt(n);
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    real(8) function code(n, u, t, l, om, u_42)
                                                                        real(8), intent (in) :: n
                                                                        real(8), intent (in) :: u
                                                                        real(8), intent (in) :: t
                                                                        real(8), intent (in) :: l
                                                                        real(8), intent (in) :: om
                                                                        real(8), intent (in) :: u_42
                                                                        real(8) :: tmp
                                                                        if (n <= 200000000000.0d0) then
                                                                            tmp = sqrt((((t * n) * u) * 2.0d0))
                                                                        else
                                                                            tmp = sqrt(((t * u) * 2.0d0)) * sqrt(n)
                                                                        end if
                                                                        code = tmp
                                                                    end function
                                                                    
                                                                    public static double code(double n, double U, double t, double l, double Om, double U_42_) {
                                                                    	double tmp;
                                                                    	if (n <= 200000000000.0) {
                                                                    		tmp = Math.sqrt((((t * n) * U) * 2.0));
                                                                    	} else {
                                                                    		tmp = Math.sqrt(((t * U) * 2.0)) * Math.sqrt(n);
                                                                    	}
                                                                    	return tmp;
                                                                    }
                                                                    
                                                                    def code(n, U, t, l, Om, U_42_):
                                                                    	tmp = 0
                                                                    	if n <= 200000000000.0:
                                                                    		tmp = math.sqrt((((t * n) * U) * 2.0))
                                                                    	else:
                                                                    		tmp = math.sqrt(((t * U) * 2.0)) * math.sqrt(n)
                                                                    	return tmp
                                                                    
                                                                    function code(n, U, t, l, Om, U_42_)
                                                                    	tmp = 0.0
                                                                    	if (n <= 200000000000.0)
                                                                    		tmp = sqrt(Float64(Float64(Float64(t * n) * U) * 2.0));
                                                                    	else
                                                                    		tmp = Float64(sqrt(Float64(Float64(t * U) * 2.0)) * sqrt(n));
                                                                    	end
                                                                    	return tmp
                                                                    end
                                                                    
                                                                    function tmp_2 = code(n, U, t, l, Om, U_42_)
                                                                    	tmp = 0.0;
                                                                    	if (n <= 200000000000.0)
                                                                    		tmp = sqrt((((t * n) * U) * 2.0));
                                                                    	else
                                                                    		tmp = sqrt(((t * U) * 2.0)) * sqrt(n);
                                                                    	end
                                                                    	tmp_2 = tmp;
                                                                    end
                                                                    
                                                                    code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 200000000000.0], N[Sqrt[N[(N[(N[(t * n), $MachinePrecision] * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(t * U), $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[n], $MachinePrecision]), $MachinePrecision]]
                                                                    
                                                                    \begin{array}{l}
                                                                    
                                                                    \\
                                                                    \begin{array}{l}
                                                                    \mathbf{if}\;n \leq 200000000000:\\
                                                                    \;\;\;\;\sqrt{\left(\left(t \cdot n\right) \cdot U\right) \cdot 2}\\
                                                                    
                                                                    \mathbf{else}:\\
                                                                    \;\;\;\;\sqrt{\left(t \cdot U\right) \cdot 2} \cdot \sqrt{n}\\
                                                                    
                                                                    
                                                                    \end{array}
                                                                    \end{array}
                                                                    
                                                                    Derivation
                                                                    1. Split input into 2 regimes
                                                                    2. if n < 2e11

                                                                      1. Initial program 48.5%

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

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

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

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

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

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

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

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

                                                                      if 2e11 < n

                                                                      1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 16: 35.6% accurate, 5.6× speedup?

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

                                                                      1. Initial program 58.9%

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

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

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

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

                                                                        if -4.20000000000000015e91 < U*

                                                                        1. Initial program 47.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-*.f6438.3

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

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

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

                                                                      Alternative 17: 35.6% accurate, 6.8× speedup?

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

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

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

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

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

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

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

                                                                        Reproduce

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