Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 64.6%
Time: 29.1s
Alternatives: 17
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 49.5% 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: 64.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(\left(t - 2 \cdot \left(\sqrt{l\_m} \cdot \left(\frac{l\_m}{Om} \cdot \sqrt{l\_m}\right)\right)\right) + t\_3\right)}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 16.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.8%

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

        \[\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. *-commutative97.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)} \]
      3. add-sqr-sqrt36.4%

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

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

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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

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

Alternative 2: 63.3% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\sqrt{2} \cdot {\left({\left(U \cdot t\right)}^{0.25} \cdot {n}^{0.25}\right)}^{2}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|l\_m \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_1 0.0)
     (* (sqrt 2.0) (pow (* (pow (* U t) 0.25) (pow n 0.25)) 2.0))
     (if (<= t_1 2e+147)
       t_1
       (if (<= t_1 INFINITY)
         (*
          (* l_m (sqrt 2.0))
          (sqrt (* (* n U) (- (* U* (/ n (pow Om 2.0))) (/ 2.0 Om)))))
         (* (fabs (* l_m (* n (/ (sqrt 2.0) Om)))) (sqrt (* U U*))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt(2.0) * pow((pow((U * t), 0.25) * pow(n, 0.25)), 2.0);
	} else if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = fabs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = Math.sqrt(2.0) * Math.pow((Math.pow((U * t), 0.25) * Math.pow(n, 0.25)), 2.0);
	} else if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ * (n / Math.pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = Math.abs((l_m * (n * (Math.sqrt(2.0) / Om)))) * Math.sqrt((U * U_42_));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 0.0:
		tmp = math.sqrt(2.0) * math.pow((math.pow((U * t), 0.25) * math.pow(n, 0.25)), 2.0)
	elif t_1 <= 2e+147:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ * (n / math.pow(Om, 2.0))) - (2.0 / Om))))
	else:
		tmp = math.fabs((l_m * (n * (math.sqrt(2.0) / Om)))) * math.sqrt((U * U_42_))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(sqrt(2.0) * (Float64((Float64(U * t) ^ 0.25) * (n ^ 0.25)) ^ 2.0));
	elseif (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ * Float64(n / (Om ^ 2.0))) - Float64(2.0 / Om)))));
	else
		tmp = Float64(abs(Float64(l_m * Float64(n * Float64(sqrt(2.0) / Om)))) * sqrt(Float64(U * U_42_)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = sqrt(2.0) * ((((U * t) ^ 0.25) * (n ^ 0.25)) ^ 2.0);
	elseif (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / (Om ^ 2.0))) - (2.0 / Om))));
	else
		tmp = abs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[2.0], $MachinePrecision] * N[Power[N[(N[Power[N[(U * t), $MachinePrecision], 0.25], $MachinePrecision] * N[Power[n, 0.25], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+147], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(l$95$m * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 16.8%

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. add-sqr-sqrt25.3%

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

        \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}}\right)}^{2}} \]
    6. Applied egg-rr25.3%

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}}\right)}^{2}} \]
    7. Taylor expanded in n around 0 31.9%

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)} \cdot \sqrt{\sqrt{2}}\right)}}^{2} \]
    8. Taylor expanded in n around 0 31.9%

      \[\leadsto \color{blue}{{\left(e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)}\right)}^{2} \cdot \sqrt{2}} \]
    9. Step-by-step derivation
      1. *-commutative31.9%

        \[\leadsto \color{blue}{\sqrt{2} \cdot {\left(e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)}\right)}^{2}} \]
      2. unpow231.9%

        \[\leadsto \sqrt{2} \cdot \color{blue}{\left(e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)} \cdot e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)}\right)} \]
      3. exp-prod31.3%

        \[\leadsto \sqrt{2} \cdot \left(\color{blue}{{\left(e^{0.25}\right)}^{\left(\log n + \log \left(U \cdot t\right)\right)}} \cdot e^{0.25 \cdot \left(\log n + \log \left(U \cdot t\right)\right)}\right) \]
      4. exp-prod31.1%

        \[\leadsto \sqrt{2} \cdot \left({\left(e^{0.25}\right)}^{\left(\log n + \log \left(U \cdot t\right)\right)} \cdot \color{blue}{{\left(e^{0.25}\right)}^{\left(\log n + \log \left(U \cdot t\right)\right)}}\right) \]
      5. pow-sqr31.1%

        \[\leadsto \sqrt{2} \cdot \color{blue}{{\left(e^{0.25}\right)}^{\left(2 \cdot \left(\log n + \log \left(U \cdot t\right)\right)\right)}} \]
      6. +-commutative31.1%

        \[\leadsto \sqrt{2} \cdot {\left(e^{0.25}\right)}^{\left(2 \cdot \color{blue}{\left(\log \left(U \cdot t\right) + \log n\right)}\right)} \]
      7. remove-double-neg31.1%

        \[\leadsto \sqrt{2} \cdot {\left(e^{0.25}\right)}^{\left(2 \cdot \left(\log \left(U \cdot t\right) + \color{blue}{\left(-\left(-\log n\right)\right)}\right)\right)} \]
      8. log-rec31.1%

        \[\leadsto \sqrt{2} \cdot {\left(e^{0.25}\right)}^{\left(2 \cdot \left(\log \left(U \cdot t\right) + \left(-\color{blue}{\log \left(\frac{1}{n}\right)}\right)\right)\right)} \]
      9. mul-1-neg31.1%

        \[\leadsto \sqrt{2} \cdot {\left(e^{0.25}\right)}^{\left(2 \cdot \left(\log \left(U \cdot t\right) + \color{blue}{-1 \cdot \log \left(\frac{1}{n}\right)}\right)\right)} \]
      10. pow-sqr31.1%

        \[\leadsto \sqrt{2} \cdot \color{blue}{\left({\left(e^{0.25}\right)}^{\left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)} \cdot {\left(e^{0.25}\right)}^{\left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)}\right)} \]
      11. exp-prod31.3%

        \[\leadsto \sqrt{2} \cdot \left(\color{blue}{e^{0.25 \cdot \left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)}} \cdot {\left(e^{0.25}\right)}^{\left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)}\right) \]
      12. exp-prod31.9%

        \[\leadsto \sqrt{2} \cdot \left(e^{0.25 \cdot \left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)} \cdot \color{blue}{e^{0.25 \cdot \left(\log \left(U \cdot t\right) + -1 \cdot \log \left(\frac{1}{n}\right)\right)}}\right) \]
    10. Simplified33.6%

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 0:\\ \;\;\;\;\sqrt{2} \cdot {\left({\left(U \cdot t\right)}^{0.25} \cdot {n}^{0.25}\right)}^{2}\\ \mathbf{elif}\;\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)} \leq 2 \cdot 10^{+147}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;\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)} \leq \infty:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 63.9% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_1 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + {l\_m}^{2} \cdot \left(\left(n \cdot U*\right) \cdot {Om}^{-2} - \frac{2}{Om}\right)\right)}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|l\_m \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_1 0.0)
     (*
      (sqrt (* 2.0 n))
      (sqrt
       (*
        U
        (+ t (* (pow l_m 2.0) (- (* (* n U*) (pow Om -2.0)) (/ 2.0 Om)))))))
     (if (<= t_1 2e+147)
       t_1
       (if (<= t_1 INFINITY)
         (*
          (* l_m (sqrt 2.0))
          (sqrt (* (* n U) (- (* U* (/ n (pow Om 2.0))) (/ 2.0 Om)))))
         (* (fabs (* l_m (* n (/ (sqrt 2.0) Om)))) (sqrt (* U U*))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (pow(l_m, 2.0) * (((n * U_42_) * pow(Om, -2.0)) - (2.0 / Om))))));
	} else if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = fabs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (Math.pow(l_m, 2.0) * (((n * U_42_) * Math.pow(Om, -2.0)) - (2.0 / Om))))));
	} else if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ * (n / Math.pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = Math.abs((l_m * (n * (Math.sqrt(2.0) / Om)))) * Math.sqrt((U * U_42_));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 0.0:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (math.pow(l_m, 2.0) * (((n * U_42_) * math.pow(Om, -2.0)) - (2.0 / Om))))))
	elif t_1 <= 2e+147:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ * (n / math.pow(Om, 2.0))) - (2.0 / Om))))
	else:
		tmp = math.fabs((l_m * (n * (math.sqrt(2.0) / Om)))) * math.sqrt((U * U_42_))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * U_42_) * (Om ^ -2.0)) - Float64(2.0 / Om)))))));
	elseif (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ * Float64(n / (Om ^ 2.0))) - Float64(2.0 / Om)))));
	else
		tmp = Float64(abs(Float64(l_m * Float64(n * Float64(sqrt(2.0) / Om)))) * sqrt(Float64(U * U_42_)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + ((l_m ^ 2.0) * (((n * U_42_) * (Om ^ -2.0)) - (2.0 / Om))))));
	elseif (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / (Om ^ 2.0))) - (2.0 / Om))));
	else
		tmp = abs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] * N[Power[Om, -2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+147], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(l$95$m * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 16.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

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

Alternative 4: 64.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 16.8%

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

        \[\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. *-commutative16.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)} \]
      3. add-sqr-sqrt11.6%

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

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

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

        \[\leadsto \color{blue}{{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\left(\frac{\ell}{Om} \cdot \sqrt{\ell}\right) \cdot \sqrt{\ell}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}^{0.5}} \]
      2. associate-*l*14.4%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(\left(\frac{\ell}{Om} \cdot \sqrt{\ell}\right) \cdot \sqrt{\ell}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}}^{0.5} \]
      3. unpow-prod-down24.0%

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

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

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

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

    1. Initial program 97.8%

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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

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

Alternative 5: 64.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+147}:\\
\;\;\;\;\sqrt{t\_3 \cdot \left(\left(t - 2 \cdot \left(\sqrt{l\_m} \cdot \left(\frac{l\_m}{Om} \cdot \sqrt{l\_m}\right)\right)\right) + t\_2\right)}\\

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 16.8%

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

        \[\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. *-commutative16.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)} \]
      3. add-sqr-sqrt11.6%

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

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

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

        \[\leadsto \color{blue}{{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\left(\frac{\ell}{Om} \cdot \sqrt{\ell}\right) \cdot \sqrt{\ell}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}^{0.5}} \]
      2. associate-*l*14.4%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \left(\left(\frac{\ell}{Om} \cdot \sqrt{\ell}\right) \cdot \sqrt{\ell}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}}^{0.5} \]
      3. unpow-prod-down24.0%

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

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

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

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

    1. Initial program 97.8%

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

        \[\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. *-commutative97.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)} \]
      3. add-sqr-sqrt36.4%

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

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

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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

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

Alternative 6: 60.7% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_1 \leq 2 \cdot 10^{+147}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|l\_m \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_1 2e+147)
     t_1
     (if (<= t_1 INFINITY)
       (*
        (* l_m (sqrt 2.0))
        (sqrt (* (* n U) (- (* U* (/ n (pow Om 2.0))) (/ 2.0 Om)))))
       (* (fabs (* l_m (* n (/ (sqrt 2.0) Om)))) (sqrt (* U U*)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = fabs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 2e+147) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt(((n * U) * ((U_42_ * (n / Math.pow(Om, 2.0))) - (2.0 / Om))));
	} else {
		tmp = Math.abs((l_m * (n * (Math.sqrt(2.0) / Om)))) * Math.sqrt((U * U_42_));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 2e+147:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt(((n * U) * ((U_42_ * (n / math.pow(Om, 2.0))) - (2.0 / Om))))
	else:
		tmp = math.fabs((l_m * (n * (math.sqrt(2.0) / Om)))) * math.sqrt((U * U_42_))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(n * U) * Float64(Float64(U_42_ * Float64(n / (Om ^ 2.0))) - Float64(2.0 / Om)))));
	else
		tmp = Float64(abs(Float64(l_m * Float64(n * Float64(sqrt(2.0) / Om)))) * sqrt(Float64(U * U_42_)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * ((l_m / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 2e+147)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (l_m * sqrt(2.0)) * sqrt(((n * U) * ((U_42_ * (n / (Om ^ 2.0))) - (2.0 / Om))));
	else
		tmp = abs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e+147], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] * N[(N[(U$42$ * N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Abs[N[(l$95$m * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\

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


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

    1. Initial program 75.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

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

    1. Initial program 21.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. Simplified37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 2 \cdot 10^{+147}:\\ \;\;\;\;\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)}\\ \mathbf{elif}\;\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)} \leq \infty:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 60.3% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|l\_m \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U))))
   (if (<=
        (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))
        INFINITY)
     (sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
     (* (fabs (* l_m (* n (/ (sqrt 2.0) Om)))) (sqrt (* U U*))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
	double tmp;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = fabs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
	double tmp;
	if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = Math.abs((l_m * (n * (Math.sqrt(2.0) / Om)))) * Math.sqrt((U * U_42_));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)
	tmp = 0
	if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= math.inf:
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))))
	else:
		tmp = math.fabs((l_m * (n * (math.sqrt(2.0) / Om)))) * math.sqrt((U * U_42_))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))
	tmp = 0.0
	if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))));
	else
		tmp = Float64(abs(Float64(l_m * Float64(n * Float64(sqrt(2.0) / Om)))) * sqrt(Float64(U * U_42_)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U);
	tmp = 0.0;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= Inf)
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	else
		tmp = abs((l_m * (n * (sqrt(2.0) / Om)))) * sqrt((U * U_42_));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Abs[N[(l$95$m * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 52.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. Simplified59.3%

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\left|\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right|} \cdot \sqrt{U \cdot U*} \]
      3. associate-/l*46.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left|\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right| \cdot \sqrt{U \cdot U*}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 59.1% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ \mathbf{if}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(-2 \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U))))
   (if (<=
        (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))
        INFINITY)
     (sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
     (pow (* (* 2.0 U) (* -2.0 (* (pow l_m 2.0) (/ n Om)))) 0.5))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
	double tmp;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = pow(((2.0 * U) * (-2.0 * (pow(l_m, 2.0) * (n / Om)))), 0.5);
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
	double tmp;
	if (Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = Math.pow(((2.0 * U) * (-2.0 * (Math.pow(l_m, 2.0) * (n / Om)))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)
	tmp = 0
	if math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= math.inf:
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))))
	else:
		tmp = math.pow(((2.0 * U) * (-2.0 * (math.pow(l_m, 2.0) * (n / Om)))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))
	tmp = 0.0
	if (sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))) <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))));
	else
		tmp = Float64(Float64(2.0 * U) * Float64(-2.0 * Float64((l_m ^ 2.0) * Float64(n / Om)))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U);
	tmp = 0.0;
	if (sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1))) <= Inf)
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	else
		tmp = ((2.0 * U) * (-2.0 * ((l_m ^ 2.0) * (n / Om)))) ^ 0.5;
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(2.0 * U), $MachinePrecision] * N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(-2 \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)\right)\right)}^{0.5}\\


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

    1. Initial program 52.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. Simplified59.3%

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

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

    1. Initial program 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. Simplified10.5%

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}\right)} \]
    8. Step-by-step derivation
      1. pow1/229.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*29.9%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 39.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-255} \lor \neg \left(t \leq 4.5 \cdot 10^{-79}\right) \land t \leq 3.3 \cdot 10^{+138}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t} \cdot \sqrt{n \cdot \left(2 \cdot U\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (or (<= t 1.05e-255) (and (not (<= t 4.5e-79)) (<= t 3.3e+138)))
   (sqrt (* 2.0 (fabs (* U (* n t)))))
   (* (sqrt t) (sqrt (* n (* 2.0 U))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if ((t <= 1.05e-255) || (!(t <= 4.5e-79) && (t <= 3.3e+138))) {
		tmp = sqrt((2.0 * fabs((U * (n * t)))));
	} else {
		tmp = sqrt(t) * sqrt((n * (2.0 * U)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if ((t <= 1.05d-255) .or. (.not. (t <= 4.5d-79)) .and. (t <= 3.3d+138)) then
        tmp = sqrt((2.0d0 * abs((u * (n * t)))))
    else
        tmp = sqrt(t) * sqrt((n * (2.0d0 * u)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if ((t <= 1.05e-255) || (!(t <= 4.5e-79) && (t <= 3.3e+138))) {
		tmp = Math.sqrt((2.0 * Math.abs((U * (n * t)))));
	} else {
		tmp = Math.sqrt(t) * Math.sqrt((n * (2.0 * U)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if (t <= 1.05e-255) or (not (t <= 4.5e-79) and (t <= 3.3e+138)):
		tmp = math.sqrt((2.0 * math.fabs((U * (n * t)))))
	else:
		tmp = math.sqrt(t) * math.sqrt((n * (2.0 * U)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if ((t <= 1.05e-255) || (!(t <= 4.5e-79) && (t <= 3.3e+138)))
		tmp = sqrt(Float64(2.0 * abs(Float64(U * Float64(n * t)))));
	else
		tmp = Float64(sqrt(t) * sqrt(Float64(n * Float64(2.0 * U))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if ((t <= 1.05e-255) || (~((t <= 4.5e-79)) && (t <= 3.3e+138)))
		tmp = sqrt((2.0 * abs((U * (n * t)))));
	else
		tmp = sqrt(t) * sqrt((n * (2.0 * U)));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[Or[LessEqual[t, 1.05e-255], And[N[Not[LessEqual[t, 4.5e-79]], $MachinePrecision], LessEqual[t, 3.3e+138]]], N[Sqrt[N[(2.0 * N[Abs[N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[t], $MachinePrecision] * N[Sqrt[N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.05 \cdot 10^{-255} \lor \neg \left(t \leq 4.5 \cdot 10^{-79}\right) \land t \leq 3.3 \cdot 10^{+138}:\\
\;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.05e-255 or 4.5000000000000003e-79 < t < 3.29999999999999978e138

    1. Initial program 45.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. Simplified50.9%

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
      2. add-sqr-sqrt33.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\sqrt{U \cdot \left(n \cdot t\right)} \cdot \sqrt{U \cdot \left(n \cdot t\right)}\right)}} \]
      3. sqrt-unprod30.4%

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

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

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

        \[\leadsto \sqrt{2 \cdot \sqrt{\color{blue}{\left(U \cdot \left(n \cdot t\right)\right) \cdot \left(U \cdot \left(n \cdot t\right)\right)}}} \]
      2. rem-sqrt-square36.9%

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

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

    if 1.05e-255 < t < 4.5000000000000003e-79 or 3.29999999999999978e138 < t

    1. Initial program 39.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. Simplified43.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-255} \lor \neg \left(t \leq 4.5 \cdot 10^{-79}\right) \land t \leq 3.3 \cdot 10^{+138}:\\ \;\;\;\;\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t} \cdot \sqrt{n \cdot \left(2 \cdot U\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 50.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.5 \cdot 10^{+183}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.50000000000000004e183

    1. Initial program 45.1%

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/244.3%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*44.9%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. cancel-sign-sub-inv44.9%

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      4. metadata-eval44.9%

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    6. Applied egg-rr44.9%

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

      \[\leadsto {\left(2 \cdot \color{blue}{\left(U \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\right)}^{0.5} \]

    if 2.50000000000000004e183 < t

    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. Simplified38.5%

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

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

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

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

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

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

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

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

Alternative 11: 50.0% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.9 \cdot 10^{+183}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.9e183

    1. Initial program 45.1%

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

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/244.3%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*44.9%

        \[\leadsto {\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\right)}^{0.5} \]
      3. cancel-sign-sub-inv44.9%

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \color{blue}{\left(t + \left(-2\right) \cdot \frac{{\ell}^{2}}{Om}\right)}\right)\right)}^{0.5} \]
      4. metadata-eval44.9%

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + \color{blue}{-2} \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5} \]
    6. Applied egg-rr44.9%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}} \]

    if 1.9e183 < t

    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. Simplified38.5%

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

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

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

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

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

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

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

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

Alternative 12: 46.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.3 \cdot 10^{+176}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot U\right) \cdot \left(-2 \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 1.29999999999999995e176

    1. Initial program 48.8%

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

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

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

    if 1.29999999999999995e176 < l

    1. Initial program 8.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. Simplified26.6%

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(U \cdot \color{blue}{\left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}\right)} \]
    8. Step-by-step derivation
      1. pow1/224.2%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)\right)\right)}^{0.5}} \]
      2. associate-*r*24.2%

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

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

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

Alternative 13: 38.8% accurate, 1.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U -5e-310)
   (sqrt (* 2.0 (* t (* n U))))
   (* (sqrt (* 2.0 U)) (sqrt (* n t)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= -5e-310) {
		tmp = sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (u <= (-5d-310)) then
        tmp = sqrt((2.0d0 * (t * (n * u))))
    else
        tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (U <= -5e-310) {
		tmp = Math.sqrt((2.0 * (t * (n * U))));
	} else {
		tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= -5e-310:
		tmp = math.sqrt((2.0 * (t * (n * U))))
	else:
		tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= -5e-310)
		tmp = sqrt(Float64(2.0 * Float64(t * Float64(n * U))));
	else
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (U <= -5e-310)
		tmp = sqrt((2.0 * (t * (n * U))));
	else
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[U, -5e-310], N[Sqrt[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
\mathbf{if}\;U \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\


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

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

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

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

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

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

    if -4.999999999999985e-310 < U

    1. Initial program 42.8%

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
      2. associate-*r*32.1%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
      3. *-commutative32.1%

        \[\leadsto {\left(\color{blue}{\left(U \cdot 2\right)} \cdot \left(n \cdot t\right)\right)}^{0.5} \]
      4. unpow-prod-down39.4%

        \[\leadsto \color{blue}{{\left(U \cdot 2\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      5. pow1/239.4%

        \[\leadsto \color{blue}{\sqrt{U \cdot 2}} \cdot {\left(n \cdot t\right)}^{0.5} \]
      6. *-commutative39.4%

        \[\leadsto \sqrt{\color{blue}{2 \cdot U}} \cdot {\left(n \cdot t\right)}^{0.5} \]
      7. pow1/238.6%

        \[\leadsto \sqrt{2 \cdot U} \cdot \color{blue}{\sqrt{n \cdot t}} \]
    6. Applied egg-rr38.6%

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

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

Alternative 14: 38.3% accurate, 1.1× speedup?

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

\\
\sqrt{2 \cdot \left|U \cdot \left(n \cdot t\right)\right|}
\end{array}
Derivation
  1. Initial program 43.5%

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(U \cdot \left(n \cdot t\right)\right)}} \]
    2. add-sqr-sqrt32.9%

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

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

      \[\leadsto \sqrt{2 \cdot \sqrt{\color{blue}{{\left(U \cdot \left(n \cdot t\right)\right)}^{2}}}} \]
  8. Applied egg-rr29.3%

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

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

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

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

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

Alternative 15: 37.6% accurate, 2.1× speedup?

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

\\
{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 43.5%

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

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

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

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  6. Applied egg-rr34.6%

    \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  7. Final simplification34.6%

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

Alternative 16: 35.6% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 43.5%

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

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

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

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

Alternative 17: 35.8% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Derivation
  1. Initial program 43.5%

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

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

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

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

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

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

Reproduce

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