Toniolo and Linder, Equation (13)

Percentage Accurate: 50.7% → 61.6%
Time: 15.9s
Alternatives: 19
Speedup: 2.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 50.7% accurate, 1.0× speedup?

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

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

Alternative 1: 61.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t\_1\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\frac{\ell \cdot \left(U - U*\right)}{Om} \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\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*)))) < +inf.0

    1. Initial program 78.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.4% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U* - U\right)\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\frac{\ell \cdot \left(U - U*\right)}{Om} \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\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*)))) < +inf.0

    1. Initial program 78.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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 59.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \frac{\ell}{Om} \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot U*\right)\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\frac{\ell \cdot \left(U - U*\right)}{Om} \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\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*)))) < +inf.0

    1. Initial program 78.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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 57.7% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_3 + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{n \cdot \ell}{Om}\right)\right)}\\

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


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

    1. Initial program 53.6%

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

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

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

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

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

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

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

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

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

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

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

    if 1.9999999999999999e-94 < (*.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 73.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 50.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (*.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 33.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-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 50.3% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (*.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 33.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. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.2% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 78.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 50.2% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (*.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 33.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 42.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 99.6%

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

      \[\leadsto \sqrt{\color{blue}{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 t\right)}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (*.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 33.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 41.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+299}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 99.6%

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

      \[\leadsto \sqrt{\color{blue}{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 t\right)}} \]
      2. lower-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.0000000000000003e299 < (*.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 33.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. associate-/l*N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 39.3% accurate, 0.9× speedup?

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

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

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


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

    1. Initial program 17.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. associate-*r*N/A

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

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

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

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

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

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

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 52.4% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{\ell \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \left(U - U*\right)\right)\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\left(n \cdot \left(U - U*\right)\right)}\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \left(\frac{\ell}{Om} \cdot \color{blue}{\left(\left(U - U*\right) \cdot n\right)}\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \color{blue}{\left(\left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) \cdot n\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      9. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \left(\color{blue}{\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right)} \cdot n\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      10. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \left(\color{blue}{\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right)} \cdot n\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \ell \cdot \color{blue}{\left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot n\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      12. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{\left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot n\right) \cdot \ell}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      13. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{\left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot n\right)} \cdot \ell}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      14. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{\left(n \cdot \left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right)\right)} \cdot \ell}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      15. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      16. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      17. lower-*.f6462.2

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \color{blue}{\left(\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right) \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      18. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\color{blue}{\left(\left(U - U*\right) \cdot \frac{\ell}{Om}\right)} \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      19. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\left(\left(U - U*\right) \cdot \color{blue}{\frac{\ell}{Om}}\right) \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      20. associate-*r/N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\color{blue}{\frac{\left(U - U*\right) \cdot \ell}{Om}} \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      21. lower-/.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\color{blue}{\frac{\left(U - U*\right) \cdot \ell}{Om}} \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      22. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\frac{\color{blue}{\ell \cdot \left(U - U*\right)}}{Om} \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      23. lower-*.f6462.1

        \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - n \cdot \left(\frac{\color{blue}{\ell \cdot \left(U - U*\right)}}{Om} \cdot \ell\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
    7. Applied egg-rr62.1%

      \[\leadsto \sqrt{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \color{blue}{n \cdot \left(\frac{\ell \cdot \left(U - U*\right)}{Om} \cdot \ell\right)}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]

    if 4.9000000000000003e64 < l

    1. Initial program 31.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 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}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \color{blue}{\frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{U \cdot \left({\ell}^{2} \cdot n\right)}}{Om}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
      11. lower-*.f6436.1

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
    5. Simplified36.1%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}\right)} \]
      5. lower-*.f6449.4

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(U \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}\right)} \]
    7. Applied egg-rr49.4%

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.9 \cdot 10^{+64}:\\ \;\;\;\;\sqrt{\left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 + n \cdot \left(\ell \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)}{Om}\right)\right) \cdot \left(2 \cdot U\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 54.5% accurate, 2.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)\right)}\\ \mathbf{if}\;n \leq -6 \cdot 10^{-73}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;n \leq 4 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* 2.0 U)
           (* n (- t (/ (* (* l l) (fma n (/ (- U U*) Om) 2.0)) Om)))))))
   (if (<= n -6e-73)
     t_1
     (if (<= n 4e-107)
       (sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))
       t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt(((2.0 * U) * (n * (t - (((l * l) * fma(n, ((U - U_42_) / Om), 2.0)) / Om)))));
	double tmp;
	if (n <= -6e-73) {
		tmp = t_1;
	} else if (n <= 4e-107) {
		tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t - Float64(Float64(Float64(l * l) * fma(n, Float64(Float64(U - U_42_) / Om), 2.0)) / Om)))))
	tmp = 0.0
	if (n <= -6e-73)
		tmp = t_1;
	elseif (n <= 4e-107)
		tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om))));
	else
		tmp = t_1;
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t - N[(N[(N[(l * l), $MachinePrecision] * N[(n * N[(N[(U - U$42$), $MachinePrecision] / Om), $MachinePrecision] + 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -6e-73], t$95$1, If[LessEqual[n, 4e-107], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)\right)}\\
\mathbf{if}\;n \leq -6 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;n \leq 4 \cdot 10^{-107}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -6e-73 or 4e-107 < n

    1. Initial program 60.4%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \color{blue}{\left(U - U*\right)}\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      7. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right)\right)} \]
      8. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}\right)\right)} \]
      9. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}\right)}\right)} \]
      10. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)} \cdot \frac{\ell}{Om}\right)} \]
      13. lower-*.f6461.7

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(\left(U - U*\right) \cdot \color{blue}{\left(n \cdot \frac{\ell}{Om}\right)}\right) \cdot \frac{\ell}{Om}\right)} \]
    4. Applied egg-rr61.7%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
    5. Applied egg-rr48.1%

      \[\leadsto \sqrt{\color{blue}{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \frac{\ell \cdot \ell}{Om} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)}} \]
    6. Taylor expanded in l around 0

      \[\leadsto \sqrt{\left(\left(t + \color{blue}{-1 \cdot \frac{{\ell}^{2} \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)}{Om}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
    7. Step-by-step derivation
      1. distribute-lft-inN/A

        \[\leadsto \sqrt{\left(\left(t + -1 \cdot \frac{\color{blue}{{\ell}^{2} \cdot 2 + {\ell}^{2} \cdot \frac{n \cdot \left(U - U*\right)}{Om}}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      2. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + -1 \cdot \frac{\color{blue}{2 \cdot {\ell}^{2}} + {\ell}^{2} \cdot \frac{n \cdot \left(U - U*\right)}{Om}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      3. associate-/l*N/A

        \[\leadsto \sqrt{\left(\left(t + -1 \cdot \frac{2 \cdot {\ell}^{2} + \color{blue}{\frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      4. mul-1-negN/A

        \[\leadsto \sqrt{\left(\left(t + \color{blue}{\left(\mathsf{neg}\left(\frac{2 \cdot {\ell}^{2} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{Om}\right)\right)}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      5. distribute-neg-frac2N/A

        \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{2 \cdot {\ell}^{2} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{\mathsf{neg}\left(Om\right)}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{2 \cdot {\ell}^{2} + \frac{{\ell}^{2} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}}{\mathsf{neg}\left(Om\right)}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
    8. Simplified57.5%

      \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{-Om}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]

    if -6e-73 < n < 4e-107

    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 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}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \color{blue}{\frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{U \cdot \left({\ell}^{2} \cdot n\right)}}{Om}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
      11. lower-*.f6455.1

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
    5. Simplified55.1%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}\right)} \]
      5. lower-*.f6464.4

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(U \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}\right)} \]
    7. Applied egg-rr64.4%

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification60.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -6 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 4 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t - \frac{\left(\ell \cdot \ell\right) \cdot \mathsf{fma}\left(n, \frac{U - U*}{Om}, 2\right)}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 52.1% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}\right)\right)}\\ \mathbf{if}\;n \leq -1.9 \cdot 10^{+104}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;n \leq 5.8 \cdot 10^{+46}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt (* (* 2.0 U) (* n (+ t (/ (* U* (* n (* l l))) (* Om Om))))))))
   (if (<= n -1.9e+104)
     t_1
     (if (<= n 5.8e+46)
       (sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))
       t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt(((2.0 * U) * (n * (t + ((U_42_ * (n * (l * l))) / (Om * Om))))));
	double tmp;
	if (n <= -1.9e+104) {
		tmp = t_1;
	} else if (n <= 5.8e+46) {
		tmp = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(Float64(Float64(2.0 * U) * Float64(n * Float64(t + Float64(Float64(U_42_ * Float64(n * Float64(l * l))) / Float64(Om * Om))))))
	tmp = 0.0
	if (n <= -1.9e+104)
		tmp = t_1;
	elseif (n <= 5.8e+46)
		tmp = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om))));
	else
		tmp = t_1;
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * N[(t + N[(N[(U$42$ * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -1.9e+104], t$95$1, If[LessEqual[n, 5.8e+46], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}\right)\right)}\\
\mathbf{if}\;n \leq -1.9 \cdot 10^{+104}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;n \leq 5.8 \cdot 10^{+46}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.89999999999999984e104 or 5.8000000000000004e46 < n

    1. Initial program 63.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \color{blue}{\left(U - U*\right)}\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      7. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right)\right)} \]
      8. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}\right)\right)} \]
      9. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}\right)}\right)} \]
      10. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)} \cdot \frac{\ell}{Om}\right)} \]
      13. lower-*.f6465.9

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(\left(U - U*\right) \cdot \color{blue}{\left(n \cdot \frac{\ell}{Om}\right)}\right) \cdot \frac{\ell}{Om}\right)} \]
    4. Applied egg-rr65.9%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
    5. Applied egg-rr48.8%

      \[\leadsto \sqrt{\color{blue}{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \frac{\ell \cdot \ell}{Om} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)}} \]
    6. Taylor expanded in U* around inf

      \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\color{blue}{U* \cdot \left({\ell}^{2} \cdot n\right)}}{{Om}^{2}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{{Om}^{2}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{{Om}^{2}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      5. unpow2N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{{Om}^{2}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{{Om}^{2}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      7. unpow2N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{\color{blue}{Om \cdot Om}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
      8. lower-*.f6460.4

        \[\leadsto \sqrt{\left(\left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{\color{blue}{Om \cdot Om}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]
    8. Simplified60.4%

      \[\leadsto \sqrt{\left(\left(t + \color{blue}{\frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}}\right) \cdot n\right) \cdot \left(2 \cdot U\right)} \]

    if -1.89999999999999984e104 < n < 5.8000000000000004e46

    1. Initial program 53.2%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in Om around 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}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \color{blue}{\frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{U \cdot \left({\ell}^{2} \cdot n\right)}}{Om}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
      11. lower-*.f6449.9

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
    5. Simplified49.9%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}\right)} \]
      5. lower-*.f6458.0

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(U \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}\right)} \]
    7. Applied egg-rr58.0%

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification58.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1.9 \cdot 10^{+104}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}\right)\right)}\\ \mathbf{elif}\;n \leq 5.8 \cdot 10^{+46}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + \frac{U* \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om \cdot Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 48.3% accurate, 2.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{if}\;Om \leq -4.8 \cdot 10^{-221}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;Om \leq 3.05 \cdot 10^{-189}:\\ \;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt (fma 2.0 (* U (* n t)) (* -4.0 (/ (* l (* U (* n l))) Om))))))
   (if (<= Om -4.8e-221)
     t_1
     (if (<= Om 3.05e-189)
       (sqrt (/ (* 2.0 (* U (* (* (* l l) U*) (* n n)))) (* Om Om)))
       t_1))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt(fma(2.0, (U * (n * t)), (-4.0 * ((l * (U * (n * l))) / Om))));
	double tmp;
	if (Om <= -4.8e-221) {
		tmp = t_1;
	} else if (Om <= 3.05e-189) {
		tmp = sqrt(((2.0 * (U * (((l * l) * U_42_) * (n * n)))) / (Om * Om)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = sqrt(fma(2.0, Float64(U * Float64(n * t)), Float64(-4.0 * Float64(Float64(l * Float64(U * Float64(n * l))) / Om))))
	tmp = 0.0
	if (Om <= -4.8e-221)
		tmp = t_1;
	elseif (Om <= 3.05e-189)
		tmp = sqrt(Float64(Float64(2.0 * Float64(U * Float64(Float64(Float64(l * l) * U_42_) * Float64(n * n)))) / Float64(Om * Om)));
	else
		tmp = t_1;
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision] + N[(-4.0 * N[(N[(l * N[(U * N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -4.8e-221], t$95$1, If[LessEqual[Om, 3.05e-189], N[Sqrt[N[(N[(2.0 * N[(U * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] * N[(n * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(Om * Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\
\mathbf{if}\;Om \leq -4.8 \cdot 10^{-221}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;Om \leq 3.05 \cdot 10^{-189}:\\
\;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -4.80000000000000047e-221 or 3.05e-189 < Om

    1. Initial program 56.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{\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}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \color{blue}{\frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{U \cdot \left({\ell}^{2} \cdot n\right)}}{Om}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
      11. lower-*.f6450.8

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
    5. Simplified50.8%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}} \]
    6. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}\right)} \]
      5. lower-*.f6456.4

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\left(U \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}\right)} \]
    7. Applied egg-rr56.4%

      \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{\left(U \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}\right)} \]

    if -4.80000000000000047e-221 < Om < 3.05e-189

    1. Initial program 62.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift--.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \color{blue}{\left(U - U*\right)}\right)} \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)} \cdot \left(U - U*\right)\right)} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)}\right)} \]
      7. lift-pow.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right)\right)} \]
      8. unpow2N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \left(n \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}\right)\right)} \]
      9. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(U - U*\right) \cdot \color{blue}{\left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}\right)}\right)} \]
      10. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
      12. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)} \cdot \frac{\ell}{Om}\right)} \]
      13. lower-*.f6462.4

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(\left(U - U*\right) \cdot \color{blue}{\left(n \cdot \frac{\ell}{Om}\right)}\right) \cdot \frac{\ell}{Om}\right)} \]
    4. Applied egg-rr62.4%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \color{blue}{\left(\left(U - U*\right) \cdot \left(n \cdot \frac{\ell}{Om}\right)\right) \cdot \frac{\ell}{Om}}\right)} \]
    5. Applied egg-rr56.4%

      \[\leadsto \sqrt{\color{blue}{\left(\left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2 - \frac{\ell \cdot \ell}{Om} \cdot \left(n \cdot \left(U - U*\right)\right)}{Om}\right) \cdot n\right) \cdot \left(2 \cdot U\right)}} \]
    6. Taylor expanded in U* around inf

      \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)}{{Om}^{2}}}} \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot \left(U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)\right)}{{Om}^{2}}}} \]
      2. lower-/.f64N/A

        \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot \left(U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)\right)}{{Om}^{2}}}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{\color{blue}{2 \cdot \left(U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)\right)}}{{Om}^{2}}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{2 \cdot \color{blue}{\left(U \cdot \left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right)\right)}}{{Om}^{2}}} \]
      5. associate-*r*N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \color{blue}{\left(\left(U* \cdot {\ell}^{2}\right) \cdot {n}^{2}\right)}\right)}{{Om}^{2}}} \]
      6. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \color{blue}{\left(\left(U* \cdot {\ell}^{2}\right) \cdot {n}^{2}\right)}\right)}{{Om}^{2}}} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\color{blue}{\left(U* \cdot {\ell}^{2}\right)} \cdot {n}^{2}\right)\right)}{{Om}^{2}}} \]
      8. unpow2N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot {n}^{2}\right)\right)}{{Om}^{2}}} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot {n}^{2}\right)\right)}{{Om}^{2}}} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \left(\ell \cdot \ell\right)\right) \cdot \color{blue}{\left(n \cdot n\right)}\right)\right)}{{Om}^{2}}} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \left(\ell \cdot \ell\right)\right) \cdot \color{blue}{\left(n \cdot n\right)}\right)\right)}{{Om}^{2}}} \]
      12. unpow2N/A

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot n\right)\right)\right)}{\color{blue}{Om \cdot Om}}} \]
      13. lower-*.f6450.5

        \[\leadsto \sqrt{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot n\right)\right)\right)}{\color{blue}{Om \cdot Om}}} \]
    8. Simplified50.5%

      \[\leadsto \sqrt{\color{blue}{\frac{2 \cdot \left(U \cdot \left(\left(U* \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification55.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -4.8 \cdot 10^{-221}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{elif}\;Om \leq 3.05 \cdot 10^{-189}:\\ \;\;\;\;\sqrt{\frac{2 \cdot \left(U \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot U*\right) \cdot \left(n \cdot n\right)\right)\right)}{Om \cdot Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\ell \cdot \left(U \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 46.0% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 7.7 \cdot 10^{+124}:\\ \;\;\;\;\sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{-4 \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 7.7e+124)
   (sqrt (* U (fma 2.0 (* n t) (/ (* -4.0 (* n (* l l))) Om))))
   (sqrt (* 2.0 (/ (* l (* (* n l) (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 7.7e+124) {
		tmp = sqrt((U * fma(2.0, (n * t), ((-4.0 * (n * (l * l))) / Om))));
	} else {
		tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 7.7e+124)
		tmp = sqrt(Float64(U * fma(2.0, Float64(n * t), Float64(Float64(-4.0 * Float64(n * Float64(l * l))) / Om))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(l * Float64(Float64(n * l) * Float64(U * -2.0))) / Om)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 7.7e+124], N[Sqrt[N[(U * N[(2.0 * N[(n * t), $MachinePrecision] + N[(N[(-4.0 * N[(n * N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(l * N[(N[(n * l), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 7.7 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{-4 \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 7.6999999999999999e124

    1. Initial program 62.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}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right) + -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}} \]
      2. lower-fma.f64N/A

        \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, \color{blue}{U \cdot \left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \color{blue}{\left(n \cdot t\right)}, -4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \color{blue}{-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      6. lower-/.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \color{blue}{\frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}}\right)} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{\color{blue}{U \cdot \left({\ell}^{2} \cdot n\right)}}{Om}\right)} \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}\right)} \]
      10. unpow2N/A

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
      11. lower-*.f6451.9

        \[\leadsto \sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}\right)} \]
    5. Simplified51.9%

      \[\leadsto \sqrt{\color{blue}{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), -4 \cdot \frac{U \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}} \]
    6. Taylor expanded in U around 0

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om} + 2 \cdot \left(n \cdot t\right)\right)}} \]
    7. Step-by-step derivation
      1. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om} + 2 \cdot \left(n \cdot t\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{U \cdot \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om} + 2 \cdot \left(n \cdot t\right)\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \sqrt{U \cdot \color{blue}{\left(2 \cdot \left(n \cdot t\right) + -4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}} \]
      4. lower-fma.f64N/A

        \[\leadsto \sqrt{U \cdot \color{blue}{\mathsf{fma}\left(2, n \cdot t, -4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, \color{blue}{n \cdot t}, -4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \color{blue}{\frac{{\ell}^{2} \cdot n}{Om} \cdot -4}\right)} \]
      7. associate-*l/N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \color{blue}{\frac{\left({\ell}^{2} \cdot n\right) \cdot -4}{Om}}\right)} \]
      8. lower-/.f64N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \color{blue}{\frac{\left({\ell}^{2} \cdot n\right) \cdot -4}{Om}}\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\color{blue}{\left({\ell}^{2} \cdot n\right) \cdot -4}}{Om}\right)} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\color{blue}{\left(n \cdot {\ell}^{2}\right)} \cdot -4}{Om}\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\color{blue}{\left(n \cdot {\ell}^{2}\right)} \cdot -4}{Om}\right)} \]
      12. unpow2N/A

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot -4}{Om}\right)} \]
      13. lower-*.f6452.0

        \[\leadsto \sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot -4}{Om}\right)} \]
    8. Simplified52.0%

      \[\leadsto \color{blue}{\sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot -4}{Om}\right)}} \]

    if 7.6999999999999999e124 < l

    1. Initial program 19.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. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{Om}}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      4. lower-*.f6425.4

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    4. Applied egg-rr25.4%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    5. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)} \]
      4. sub-negN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      5. lower-+.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \left(\mathsf{neg}\left(\color{blue}{\frac{{\ell}^{2}}{Om} \cdot 2}\right)\right)\right)\right)\right)} \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right)} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot \color{blue}{-2}\right)\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot -2}\right)\right)\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om}} \cdot -2\right)\right)\right)} \]
      11. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
      12. lower-*.f6420.3

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
    7. Simplified20.3%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)\right)}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      8. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
      9. lower-*.f6414.7

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
    10. Simplified14.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}}} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(-2 \cdot U\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(U \cdot -2\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      8. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(U \cdot -2\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      9. lower-*.f6435.1

        \[\leadsto \sqrt{2 \cdot \frac{\left(\left(U \cdot -2\right) \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}} \]
    12. Applied egg-rr35.1%

      \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(U \cdot -2\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification49.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 7.7 \cdot 10^{+124}:\\ \;\;\;\;\sqrt{U \cdot \mathsf{fma}\left(2, n \cdot t, \frac{-4 \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 40.7% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.5e+70)
   (sqrt (* t (* n (* 2.0 U))))
   (sqrt (* 2.0 (/ (* l (* (* n l) (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.5e+70) {
		tmp = sqrt((t * (n * (2.0 * U))));
	} else {
		tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
	}
	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 <= 1.5d+70) then
        tmp = sqrt((t * (n * (2.0d0 * u))))
    else
        tmp = sqrt((2.0d0 * ((l * ((n * l) * (u * (-2.0d0)))) / om)))
    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 <= 1.5e+70) {
		tmp = Math.sqrt((t * (n * (2.0 * U))));
	} else {
		tmp = Math.sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.5e+70:
		tmp = math.sqrt((t * (n * (2.0 * U))))
	else:
		tmp = math.sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.5e+70)
		tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(l * Float64(Float64(n * l) * Float64(U * -2.0))) / Om)));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.5e+70)
		tmp = sqrt((t * (n * (2.0 * U))));
	else
		tmp = sqrt((2.0 * ((l * ((n * l) * (U * -2.0))) / Om)));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+70], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(l * N[(N[(n * l), $MachinePrecision] * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.49999999999999988e70

    1. Initial program 63.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{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 t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6443.2

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified43.2%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)} \cdot t} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      8. lower-*.f6443.5

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t}} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot 2\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(n \cdot U\right)} \cdot 2\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(U \cdot 2\right)\right)} \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot \color{blue}{\left(2 \cdot U\right)}\right) \cdot t} \]
      14. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \color{blue}{\left(2 \cdot U\right)}\right) \cdot t} \]
      15. lower-*.f6443.5

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(2 \cdot U\right)\right)} \cdot t} \]
    7. Applied egg-rr43.5%

      \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t}} \]

    if 1.49999999999999988e70 < l

    1. Initial program 29.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. associate-/l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{Om}}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      4. lower-*.f6434.2

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    4. Applied egg-rr34.2%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    5. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)} \]
      4. sub-negN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      5. lower-+.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \left(\mathsf{neg}\left(\color{blue}{\frac{{\ell}^{2}}{Om} \cdot 2}\right)\right)\right)\right)\right)} \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right)} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot \color{blue}{-2}\right)\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot -2}\right)\right)\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om}} \cdot -2\right)\right)\right)} \]
      11. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
      12. lower-*.f6435.6

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
    7. Simplified35.6%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)\right)}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      8. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
      9. lower-*.f6426.9

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
    10. Simplified26.9%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}}} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)}}{Om}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(-2 \cdot U\right) \cdot \left(n \cdot \ell\right)\right)} \cdot \ell}{Om}} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(-2 \cdot U\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      7. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(U \cdot -2\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      8. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(\color{blue}{\left(U \cdot -2\right)} \cdot \left(n \cdot \ell\right)\right) \cdot \ell}{Om}} \]
      9. lower-*.f6439.1

        \[\leadsto \sqrt{2 \cdot \frac{\left(\left(U \cdot -2\right) \cdot \color{blue}{\left(n \cdot \ell\right)}\right) \cdot \ell}{Om}} \]
    12. Applied egg-rr39.1%

      \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(U \cdot -2\right) \cdot \left(n \cdot \ell\right)\right) \cdot \ell}}{Om}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\ell \cdot \left(\left(n \cdot \ell\right) \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 40.7% accurate, 3.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.5e+70)
   (sqrt (* t (* n (* 2.0 U))))
   (sqrt (* 2.0 (/ (* (* n l) (* l (* U -2.0))) Om)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.5e+70) {
		tmp = sqrt((t * (n * (2.0 * U))));
	} else {
		tmp = sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)));
	}
	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 <= 1.5d+70) then
        tmp = sqrt((t * (n * (2.0d0 * u))))
    else
        tmp = sqrt((2.0d0 * (((n * l) * (l * (u * (-2.0d0)))) / om)))
    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 <= 1.5e+70) {
		tmp = Math.sqrt((t * (n * (2.0 * U))));
	} else {
		tmp = Math.sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.5e+70:
		tmp = math.sqrt((t * (n * (2.0 * U))))
	else:
		tmp = math.sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.5e+70)
		tmp = sqrt(Float64(t * Float64(n * Float64(2.0 * U))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(Float64(n * l) * Float64(l * Float64(U * -2.0))) / Om)));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.5e+70)
		tmp = sqrt((t * (n * (2.0 * U))));
	else
		tmp = sqrt((2.0 * (((n * l) * (l * (U * -2.0))) / Om)));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+70], N[Sqrt[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(N[(n * l), $MachinePrecision] * N[(l * N[(U * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\
\;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.49999999999999988e70

    1. Initial program 63.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Add Preprocessing
    3. Taylor expanded in t around inf

      \[\leadsto \sqrt{\color{blue}{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 t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      4. lower-*.f6443.2

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
    5. Simplified43.2%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(2 \cdot U\right)} \cdot n\right) \cdot t} \]
      4. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(U \cdot n\right)\right)} \cdot t} \]
      5. *-commutativeN/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot \color{blue}{\left(n \cdot U\right)}\right) \cdot t} \]
      7. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      8. lower-*.f6443.5

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right) \cdot t}} \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t} \]
      10. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(n \cdot U\right) \cdot 2\right)} \cdot t} \]
      11. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\color{blue}{\left(n \cdot U\right)} \cdot 2\right) \cdot t} \]
      12. associate-*l*N/A

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(U \cdot 2\right)\right)} \cdot t} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{\left(n \cdot \color{blue}{\left(2 \cdot U\right)}\right) \cdot t} \]
      14. lift-*.f64N/A

        \[\leadsto \sqrt{\left(n \cdot \color{blue}{\left(2 \cdot U\right)}\right) \cdot t} \]
      15. lower-*.f6443.5

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(2 \cdot U\right)\right)} \cdot t} \]
    7. Applied egg-rr43.5%

      \[\leadsto \sqrt{\color{blue}{\left(n \cdot \left(2 \cdot U\right)\right) \cdot t}} \]

    if 1.49999999999999988e70 < l

    1. Initial program 29.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. associate-/l*N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\ell \cdot \frac{\ell}{Om}\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \color{blue}{\frac{\ell}{Om}}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      4. lower-*.f6434.2

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    4. Applied egg-rr34.2%

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\right)}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    5. Taylor expanded in n around 0

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)} \]
      4. sub-negN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      5. lower-+.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\left(t + \left(\mathsf{neg}\left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)\right)} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \left(\mathsf{neg}\left(\color{blue}{\frac{{\ell}^{2}}{Om} \cdot 2}\right)\right)\right)\right)\right)} \]
      7. distribute-rgt-neg-inN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot \left(\mathsf{neg}\left(2\right)\right)}\right)\right)\right)} \]
      8. metadata-evalN/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot \color{blue}{-2}\right)\right)\right)} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om} \cdot -2}\right)\right)\right)} \]
      10. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \color{blue}{\frac{{\ell}^{2}}{Om}} \cdot -2\right)\right)\right)} \]
      11. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
      12. lower-*.f6435.6

        \[\leadsto \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\color{blue}{\ell \cdot \ell}}{Om} \cdot -2\right)\right)\right)} \]
    7. Simplified35.6%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)\right)}} \]
    8. Taylor expanded in t around 0

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}} \]
    9. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      2. lower-/.f64N/A

        \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{-2 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)}{Om}}} \]
      3. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right) \cdot \left({\ell}^{2} \cdot n\right)}}{Om}} \]
      5. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left({\ell}^{2} \cdot n\right)}{Om}} \]
      6. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      7. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot {\ell}^{2}\right)}}{Om}} \]
      8. unpow2N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
      9. lower-*.f6426.9

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
    10. Simplified26.9%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}}} \]
    11. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(-2 \cdot U\right)} \cdot \left(n \cdot \left(\ell \cdot \ell\right)\right)}{Om}} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right)}{Om}} \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(-2 \cdot U\right) \cdot \color{blue}{\left(n \cdot \left(\ell \cdot \ell\right)\right)}}{Om}} \]
      4. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \left(\ell \cdot \ell\right)\right) \cdot \left(-2 \cdot U\right)}}{Om}} \]
      5. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \left(\ell \cdot \ell\right)\right)} \cdot \left(-2 \cdot U\right)}{Om}} \]
      6. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(n \cdot \color{blue}{\left(\ell \cdot \ell\right)}\right) \cdot \left(-2 \cdot U\right)}{Om}} \]
      7. associate-*r*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(\left(n \cdot \ell\right) \cdot \ell\right)} \cdot \left(-2 \cdot U\right)}{Om}} \]
      8. associate-*l*N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(-2 \cdot U\right)\right)}}{Om}} \]
      9. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(-2 \cdot U\right)\right)}}{Om}} \]
      10. lower-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \ell\right)} \cdot \left(\ell \cdot \left(-2 \cdot U\right)\right)}{Om}} \]
      11. lower-*.f6439.1

        \[\leadsto \sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \color{blue}{\left(\ell \cdot \left(-2 \cdot U\right)\right)}}{Om}} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \color{blue}{\left(-2 \cdot U\right)}\right)}{Om}} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \color{blue}{\left(U \cdot -2\right)}\right)}{Om}} \]
      14. lower-*.f6439.1

        \[\leadsto \sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \color{blue}{\left(U \cdot -2\right)}\right)}{Om}} \]
    12. Applied egg-rr39.1%

      \[\leadsto \sqrt{2 \cdot \frac{\color{blue}{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}}{Om}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification42.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+70}:\\ \;\;\;\;\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{\left(n \cdot \ell\right) \cdot \left(\ell \cdot \left(U \cdot -2\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 36.8% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 U) (* n t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt(((2.0 * U) * (n * 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 * u) * (n * 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 * U) * (n * t)));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((2.0 * U) * (n * t)))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(2.0 * U) * Float64(n * t)))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((2.0 * U) * (n * t)));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}
\end{array}
Derivation
  1. Initial program 56.9%

    \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
  2. Add Preprocessing
  3. Taylor expanded in t around inf

    \[\leadsto \sqrt{\color{blue}{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 t\right)}} \]
    2. lower-*.f64N/A

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    3. lower-*.f64N/A

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
    4. lower-*.f6437.7

      \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
  5. Simplified37.7%

    \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
  6. Add Preprocessing

Reproduce

?
herbie shell --seed 2024219 
(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*))))))