Toniolo and Linder, Equation (13)

Percentage Accurate: 50.4% → 65.2%
Time: 27.2s
Alternatives: 15
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 50.4% accurate, 1.0× speedup?

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

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

Alternative 1: 65.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t_5 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot t_1\right) + t_4\right)}\\

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


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

    1. Initial program 10.2%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sqrt-prod51.6%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
      2. fma-udef51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.3%

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.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. Simplified0.2%

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

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

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

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

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

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

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

Alternative 2: 65.2% accurate, 0.3× 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)\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + -2 \cdot \frac{{l_m}^{2}}{Om}\right)}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)} \cdot \left(l_m \cdot \sqrt{2}\right)\\ \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)))
        (t_2 (* (* 2.0 n) U))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* -2.0 (/ (pow l_m 2.0) Om))))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
       (*
        (sqrt (* U (* n (- (/ n (/ (pow Om 2.0) (- U* U))) (/ 2.0 Om)))))
        (* l_m (sqrt 2.0)))))))
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 t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (-2.0 * (pow(l_m, 2.0) / Om)))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = sqrt((U * (n * ((n / (pow(Om, 2.0) / (U_42_ - U))) - (2.0 / Om))))) * (l_m * sqrt(2.0));
	}
	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 t_2 = (2.0 * n) * U;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om)))));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = Math.sqrt((U * (n * ((n / (Math.pow(Om, 2.0) / (U_42_ - U))) - (2.0 / Om))))) * (l_m * Math.sqrt(2.0));
	}
	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)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (-2.0 * (math.pow(l_m, 2.0) / Om)))))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))
	else:
		tmp = math.sqrt((U * (n * ((n / (math.pow(Om, 2.0) / (U_42_ - U))) - (2.0 / Om))))) * (l_m * math.sqrt(2.0))
	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))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(n / Float64((Om ^ 2.0) / Float64(U_42_ - U))) - Float64(2.0 / Om))))) * Float64(l_m * sqrt(2.0)));
	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);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (-2.0 * ((l_m ^ 2.0) / Om)))));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	else
		tmp = sqrt((U * (n * ((n / ((Om ^ 2.0) / (U_42_ - U))) - (2.0 / Om))))) * (l_m * sqrt(2.0));
	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]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * 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]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(n / N[(N[Power[Om, 2.0], $MachinePrecision] / N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $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)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + -2 \cdot \frac{{l_m}^{2}}{Om}\right)}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\

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


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

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sqrt-prod54.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
      2. fma-udef54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.3%

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

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.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. Simplified5.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.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 \sqrt{U \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\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:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 61.6% accurate, 0.3× 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)\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\ t_4 := l_m \cdot \frac{l_m}{Om}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot t_4\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_4\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)))
        (t_2 (* (* 2.0 n) U))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
        (t_4 (* l_m (/ l_m Om))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 n)) (sqrt (* U t)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 t_4)) t_1)))
       (pow (* 2.0 (* (* n U) (+ t (* -2.0 t_4)))) 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 t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double t_4 = l_m * (l_m / Om);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	} else {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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 t_2 = (2.0 * n) * U;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double t_4 = l_m * (l_m / Om);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	} else {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)))
	t_4 = l_m * (l_m / Om)
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)))
	else:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)))
	t_4 = Float64(l_m * Float64(l_m / Om))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_4)) + t_1)));
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_4)))) ^ 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);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	t_4 = l_m * (l_m / Om);
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	else
		tmp = (2.0 * ((n * U) * (t + (-2.0 * t_4)))) ^ 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]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * 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]}, Block[{t$95$4 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$4), $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)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\
t_4 := l_m \cdot \frac{l_m}{Om}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot t_4\right) + t_1\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_4\right)\right)\right)}^{0.5}\\


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

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sqrt-prod54.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
      2. fma-udef54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{U \cdot t}} \]

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

    1. Initial program 67.3%

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

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.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. Simplified11.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 1.4%

      \[\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/234.4%

        \[\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*33.7%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow20.2%

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

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

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

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

Alternative 4: 62.2% accurate, 0.3× 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)\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\ t_4 := l_m \cdot \frac{l_m}{Om}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + -2 \cdot \frac{{l_m}^{2}}{Om}\right)}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot t_4\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_4\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)))
        (t_2 (* (* 2.0 n) U))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
        (t_4 (* l_m (/ l_m Om))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 n)) (sqrt (* U (+ t (* -2.0 (/ (pow l_m 2.0) Om))))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 t_4)) t_1)))
       (pow (* 2.0 (* (* n U) (+ t (* -2.0 t_4)))) 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 t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double t_4 = l_m * (l_m / Om);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (-2.0 * (pow(l_m, 2.0) / Om)))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	} else {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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 t_2 = (2.0 * n) * U;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double t_4 = l_m * (l_m / Om);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (-2.0 * (Math.pow(l_m, 2.0) / Om)))));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	} else {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)))
	t_4 = l_m * (l_m / Om)
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (-2.0 * (math.pow(l_m, 2.0) / Om)))))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)))
	else:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * t_4)))), 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))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)))
	t_4 = Float64(l_m * Float64(l_m / Om))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(-2.0 * Float64((l_m ^ 2.0) / Om))))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * t_4)) + t_1)));
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_4)))) ^ 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);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	t_4 = l_m * (l_m / Om);
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (-2.0 * ((l_m ^ 2.0) / Om)))));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * t_4)) + t_1)));
	else
		tmp = (2.0 * ((n * U) * (t + (-2.0 * t_4)))) ^ 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]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * 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]}, Block[{t$95$4 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(-2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * t$95$4), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$4), $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)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\
t_4 := l_m \cdot \frac{l_m}{Om}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + -2 \cdot \frac{{l_m}^{2}}{Om}\right)}\\

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot t_4\right) + t_1\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_4\right)\right)\right)}^{0.5}\\


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

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sqrt-prod54.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
      2. fma-udef54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 67.3%

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

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.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. Simplified11.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 1.4%

      \[\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/234.4%

        \[\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*33.7%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow20.2%

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

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

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

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

Alternative 5: 55.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := t + -2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\\ \mathbf{if}\;U \leq 7.8 \cdot 10^{-249}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;U \leq 5.2 \cdot 10^{-74} \lor \neg \left(U \leq 7.6 \cdot 10^{+118}\right):\\ \;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot t_1}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t_1\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 (+ t (* -2.0 (* l_m (/ l_m Om))))))
   (if (<= U 7.8e-249)
     (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 0.5)
     (if (or (<= U 5.2e-74) (not (<= U 7.6e+118)))
       (* (pow (* 2.0 U) 0.5) (sqrt (* n t_1)))
       (pow (* 2.0 (* (* n U) t_1)) 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 = t + (-2.0 * (l_m * (l_m / Om)));
	double tmp;
	if (U <= 7.8e-249) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if ((U <= 5.2e-74) || !(U <= 7.6e+118)) {
		tmp = pow((2.0 * U), 0.5) * sqrt((n * t_1));
	} else {
		tmp = pow((2.0 * ((n * U) * t_1)), 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) :: t_1
    real(8) :: tmp
    t_1 = t + ((-2.0d0) * (l_m * (l_m / om)))
    if (u <= 7.8d-249) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 0.5d0
    else if ((u <= 5.2d-74) .or. (.not. (u <= 7.6d+118))) then
        tmp = ((2.0d0 * u) ** 0.5d0) * sqrt((n * t_1))
    else
        tmp = (2.0d0 * ((n * u) * t_1)) ** 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 t_1 = t + (-2.0 * (l_m * (l_m / Om)));
	double tmp;
	if (U <= 7.8e-249) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if ((U <= 5.2e-74) || !(U <= 7.6e+118)) {
		tmp = Math.pow((2.0 * U), 0.5) * Math.sqrt((n * t_1));
	} else {
		tmp = Math.pow((2.0 * ((n * U) * t_1)), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = t + (-2.0 * (l_m * (l_m / Om)))
	tmp = 0
	if U <= 7.8e-249:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	elif (U <= 5.2e-74) or not (U <= 7.6e+118):
		tmp = math.pow((2.0 * U), 0.5) * math.sqrt((n * t_1))
	else:
		tmp = math.pow((2.0 * ((n * U) * t_1)), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(t + Float64(-2.0 * Float64(l_m * Float64(l_m / Om))))
	tmp = 0.0
	if (U <= 7.8e-249)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 0.5;
	elseif ((U <= 5.2e-74) || !(U <= 7.6e+118))
		tmp = Float64((Float64(2.0 * U) ^ 0.5) * sqrt(Float64(n * t_1)));
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * t_1)) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = t + (-2.0 * (l_m * (l_m / Om)));
	tmp = 0.0;
	if (U <= 7.8e-249)
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 0.5;
	elseif ((U <= 5.2e-74) || ~((U <= 7.6e+118)))
		tmp = ((2.0 * U) ^ 0.5) * sqrt((n * t_1));
	else
		tmp = (2.0 * ((n * U) * t_1)) ^ 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[(t + N[(-2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[U, 7.8e-249], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[Or[LessEqual[U, 5.2e-74], N[Not[LessEqual[U, 7.6e+118]], $MachinePrecision]], N[(N[Power[N[(2.0 * U), $MachinePrecision], 0.5], $MachinePrecision] * N[Sqrt[N[(n * t$95$1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := t + -2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\\
\mathbf{if}\;U \leq 7.8 \cdot 10^{-249}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;U \leq 5.2 \cdot 10^{-74} \lor \neg \left(U \leq 7.6 \cdot 10^{+118}\right):\\
\;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot t_1}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t_1\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < 7.7999999999999998e-249

    1. Initial program 49.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. Simplified52.0%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 41.5%

      \[\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/250.5%

        \[\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*49.2%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow231.5%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv55.6%

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

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

    if 7.7999999999999998e-249 < U < 5.2000000000000002e-74 or 7.60000000000000033e118 < U

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 43.4%

      \[\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/246.7%

        \[\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*46.7%

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

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

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

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

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

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

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

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

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

    if 5.2000000000000002e-74 < U < 7.60000000000000033e118

    1. Initial program 59.9%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 47.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. Step-by-step derivation
      1. pow1/255.4%

        \[\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*59.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-inv59.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-eval59.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-rr59.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. Step-by-step derivation
      1. unpow218.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq 7.8 \cdot 10^{-249}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;U \leq 5.2 \cdot 10^{-74} \lor \neg \left(U \leq 7.6 \cdot 10^{+118}\right):\\ \;\;\;\;{\left(2 \cdot U\right)}^{0.5} \cdot \sqrt{n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 56.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 2.2 \cdot 10^{+124}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\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 2.2e+124)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (+
       (- t (/ (* 2.0 (* l_m l_m)) Om))
       (* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
   (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 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 <= 2.2e+124) {
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 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 <= 2.2d+124) then
        tmp = sqrt(((2.0d0 * n) * (u * ((t - ((2.0d0 * (l_m * l_m)) / om)) + (n * (((l_m / om) ** 2.0d0) * (u_42 - u)))))))
    else
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 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 <= 2.2e+124) {
		tmp = 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)))))));
	} else {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 2.2e+124:
		tmp = 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)))))))
	else:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 2.2e+124)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U)))))));
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 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 <= 2.2e+124)
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (((l_m / Om) ^ 2.0) * (U_42_ - U)))))));
	else
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 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, 2.2e+124], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 54.9%

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

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

    if 2.2000000000000001e124 < l

    1. Initial program 19.9%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 17.7%

      \[\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/234.6%

        \[\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*34.4%

        \[\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-inv34.4%

        \[\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-eval34.4%

        \[\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-rr34.4%

      \[\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. Step-by-step derivation
      1. unpow26.1%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv54.8%

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

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

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

Alternative 7: 52.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.2 \cdot 10^{+25}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{+194}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= t 1.2e+25)
   (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 0.5)
   (if (<= t 2.9e+194)
     (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
     (* (sqrt (* 2.0 (* n U))) (sqrt t)))))
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.2e+25) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (t <= 2.9e+194) {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
	} else {
		tmp = sqrt((2.0 * (n * U))) * sqrt(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 (t <= 1.2d+25) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 0.5d0
    else if (t <= 2.9d+194) then
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))))
    else
        tmp = sqrt((2.0d0 * (n * u))) * sqrt(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 (t <= 1.2e+25) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (t <= 2.9e+194) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))));
	} else {
		tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if t <= 1.2e+25:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	elif t <= 2.9e+194:
		tmp = math.sqrt(((2.0 * n) * (U * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))))
	else:
		tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (t <= 1.2e+25)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 0.5;
	elseif (t <= 2.9e+194)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))));
	else
		tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(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 (t <= 1.2e+25)
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 0.5;
	elseif (t <= 2.9e+194)
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))));
	else
		tmp = sqrt((2.0 * (n * U))) * sqrt(t);
	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.2e+25], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 2.9e+194], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t \leq 2.9 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.19999999999999998e25

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 41.5%

      \[\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/250.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*48.7%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow230.1%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv55.0%

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

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

    if 1.19999999999999998e25 < t < 2.9000000000000001e194

    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. Simplified60.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around inf 49.5%

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

    if 2.9000000000000001e194 < t

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 54.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l_m \cdot \frac{l_m}{Om}\\ t_2 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\ \mathbf{if}\;n \leq -1.66 \cdot 10^{-124}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 3.55 \cdot 10^{-274}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 9.5 \cdot 10^{-187}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;n \leq 7.5 \cdot 10^{-153}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\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 (* l_m (/ l_m Om)))
        (t_2 (sqrt (* 2.0 (* U (* n (- t (* 2.0 t_1))))))))
   (if (<= n -1.66e-124)
     (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 0.5)
     (if (<= n 3.55e-274)
       t_2
       (if (<= n 9.5e-187)
         (* (sqrt (* 2.0 n)) (sqrt (* U t)))
         (if (<= n 7.5e-153)
           t_2
           (pow (* 2.0 (* (* n U) (+ t (* -2.0 t_1)))) 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 = l_m * (l_m / Om);
	double t_2 = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	double tmp;
	if (n <= -1.66e-124) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (n <= 3.55e-274) {
		tmp = t_2;
	} else if (n <= 9.5e-187) {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	} else if (n <= 7.5e-153) {
		tmp = t_2;
	} else {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = l_m * (l_m / om)
    t_2 = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * t_1))))))
    if (n <= (-1.66d-124)) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 0.5d0
    else if (n <= 3.55d-274) then
        tmp = t_2
    else if (n <= 9.5d-187) then
        tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
    else if (n <= 7.5d-153) then
        tmp = t_2
    else
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * t_1)))) ** 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 t_1 = l_m * (l_m / Om);
	double t_2 = Math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	double tmp;
	if (n <= -1.66e-124) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (n <= 3.55e-274) {
		tmp = t_2;
	} else if (n <= 9.5e-187) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
	} else if (n <= 7.5e-153) {
		tmp = t_2;
	} else {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = l_m * (l_m / Om)
	t_2 = math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))))
	tmp = 0
	if n <= -1.66e-124:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	elif n <= 3.55e-274:
		tmp = t_2
	elif n <= 9.5e-187:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t))
	elif n <= 7.5e-153:
		tmp = t_2
	else:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	t_2 = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1))))))
	tmp = 0.0
	if (n <= -1.66e-124)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 0.5;
	elseif (n <= 3.55e-274)
		tmp = t_2;
	elseif (n <= 9.5e-187)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	elseif (n <= 7.5e-153)
		tmp = t_2;
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_1)))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = l_m * (l_m / Om);
	t_2 = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	tmp = 0.0;
	if (n <= -1.66e-124)
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 0.5;
	elseif (n <= 3.55e-274)
		tmp = t_2;
	elseif (n <= 9.5e-187)
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	elseif (n <= 7.5e-153)
		tmp = t_2;
	else
		tmp = (2.0 * ((n * U) * (t + (-2.0 * t_1)))) ^ 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[n, -1.66e-124], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, 3.55e-274], t$95$2, If[LessEqual[n, 9.5e-187], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[n, 7.5e-153], t$95$2, N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l_m \cdot \frac{l_m}{Om}\\
t_2 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\
\mathbf{if}\;n \leq -1.66 \cdot 10^{-124}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;n \leq 3.55 \cdot 10^{-274}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;n \leq 9.5 \cdot 10^{-187}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\

\mathbf{elif}\;n \leq 7.5 \cdot 10^{-153}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if n < -1.6599999999999999e-124

    1. Initial program 52.5%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 38.8%

      \[\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/251.7%

        \[\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*55.0%

        \[\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-inv55.0%

        \[\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-eval55.0%

        \[\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-rr55.0%

      \[\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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv63.2%

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

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

    if -1.6599999999999999e-124 < n < 3.54999999999999982e-274 or 9.49999999999999936e-187 < n < 7.5e-153

    1. Initial program 41.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. Simplified46.9%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 48.4%

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

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

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

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

    if 3.54999999999999982e-274 < n < 9.49999999999999936e-187

    1. Initial program 24.9%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. sqrt-prod61.4%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
      2. fma-udef61.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{U \cdot t}} \]

    if 7.5e-153 < n

    1. Initial program 60.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. Simplified60.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 45.9%

      \[\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/255.6%

        \[\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*55.6%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow259.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -1.66 \cdot 10^{-124}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 3.55 \cdot 10^{-274}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 9.5 \cdot 10^{-187}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;n \leq 7.5 \cdot 10^{-153}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 53.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq 1.15 \cdot 10^{+25}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+194}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot U\right)} \cdot \sqrt{t}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= t 1.15e+25)
   (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 0.5)
   (if (<= t 1.1e+194)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (* l_m (/ l_m Om))))))))
     (* (sqrt (* 2.0 (* n U))) (sqrt t)))))
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.15e+25) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (t <= 1.1e+194) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))));
	} else {
		tmp = sqrt((2.0 * (n * U))) * sqrt(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 (t <= 1.15d+25) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 0.5d0
    else if (t <= 1.1d+194) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * (l_m * (l_m / om))))))))
    else
        tmp = sqrt((2.0d0 * (n * u))) * sqrt(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 (t <= 1.15e+25) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (t <= 1.1e+194) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))));
	} else {
		tmp = Math.sqrt((2.0 * (n * U))) * Math.sqrt(t);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if t <= 1.15e+25:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	elif t <= 1.1e+194:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))))
	else:
		tmp = math.sqrt((2.0 * (n * U))) * math.sqrt(t)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (t <= 1.15e+25)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 0.5;
	elseif (t <= 1.1e+194)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))));
	else
		tmp = Float64(sqrt(Float64(2.0 * Float64(n * U))) * sqrt(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 (t <= 1.15e+25)
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 0.5;
	elseif (t <= 1.1e+194)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))));
	else
		tmp = sqrt((2.0 * (n * U))) * sqrt(t);
	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.15e+25], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 1.1e+194], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+194}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.1499999999999999e25

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 41.5%

      \[\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/250.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*48.7%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow230.1%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv55.0%

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

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

    if 1.1499999999999999e25 < t < 1.1000000000000001e194

    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. Simplified60.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 49.4%

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

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

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

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

    if 1.1000000000000001e194 < t

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 55.3% accurate, 1.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l_m \cdot \frac{l_m}{Om}\\ \mathbf{if}\;n \leq -5.6 \cdot 10^{-126} \lor \neg \left(n \leq 5.5 \cdot 10^{-155}\right):\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* l_m (/ l_m Om))))
   (if (or (<= n -5.6e-126) (not (<= n 5.5e-155)))
     (pow (* 2.0 (* (* n U) (+ t (* -2.0 t_1)))) 0.5)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 t_1)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = l_m * (l_m / Om);
	double tmp;
	if ((n <= -5.6e-126) || !(n <= 5.5e-155)) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5);
	} else {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = l_m * (l_m / om)
    if ((n <= (-5.6d-126)) .or. (.not. (n <= 5.5d-155))) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * t_1)))) ** 0.5d0
    else
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * t_1))))))
    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 t_1 = l_m * (l_m / Om);
	double tmp;
	if ((n <= -5.6e-126) || !(n <= 5.5e-155)) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5);
	} else {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = l_m * (l_m / Om)
	tmp = 0
	if (n <= -5.6e-126) or not (n <= 5.5e-155):
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5)
	else:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	tmp = 0.0
	if ((n <= -5.6e-126) || !(n <= 5.5e-155))
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_1)))) ^ 0.5;
	else
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1))))));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = l_m * (l_m / Om);
	tmp = 0.0;
	if ((n <= -5.6e-126) || ~((n <= 5.5e-155)))
		tmp = (2.0 * ((n * U) * (t + (-2.0 * t_1)))) ^ 0.5;
	else
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[n, -5.6e-126], N[Not[LessEqual[n, 5.5e-155]], $MachinePrecision]], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l_m \cdot \frac{l_m}{Om}\\
\mathbf{if}\;n \leq -5.6 \cdot 10^{-126} \lor \neg \left(n \leq 5.5 \cdot 10^{-155}\right):\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -5.59999999999999983e-126 or 5.50000000000000018e-155 < n

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 42.4%

      \[\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/253.7%

        \[\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*55.3%

        \[\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-inv55.3%

        \[\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-eval55.3%

        \[\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-rr55.3%

      \[\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. Step-by-step derivation
      1. unpow230.4%

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

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

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

    if -5.59999999999999983e-126 < n < 5.50000000000000018e-155

    1. Initial program 37.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. Simplified42.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 43.7%

      \[\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. unpow228.1%

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

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

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

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

Alternative 11: 55.3% accurate, 1.8× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l_m \cdot \frac{l_m}{Om}\\ \mathbf{if}\;n \leq -4.7 \cdot 10^{-125}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;n \leq 1.6 \cdot 10^{-152}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\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 (* l_m (/ l_m Om))))
   (if (<= n -4.7e-125)
     (pow (* 2.0 (* (* n U) (+ t (* -2.0 (/ l_m (/ Om l_m)))))) 0.5)
     (if (<= n 1.6e-152)
       (sqrt (* 2.0 (* U (* n (- t (* 2.0 t_1))))))
       (pow (* 2.0 (* (* n U) (+ t (* -2.0 t_1)))) 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 = l_m * (l_m / Om);
	double tmp;
	if (n <= -4.7e-125) {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (n <= 1.6e-152) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	} else {
		tmp = pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 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) :: t_1
    real(8) :: tmp
    t_1 = l_m * (l_m / om)
    if (n <= (-4.7d-125)) then
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * (l_m / (om / l_m)))))) ** 0.5d0
    else if (n <= 1.6d-152) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * t_1))))))
    else
        tmp = (2.0d0 * ((n * u) * (t + ((-2.0d0) * t_1)))) ** 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 t_1 = l_m * (l_m / Om);
	double tmp;
	if (n <= -4.7e-125) {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5);
	} else if (n <= 1.6e-152) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	} else {
		tmp = Math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = l_m * (l_m / Om)
	tmp = 0
	if n <= -4.7e-125:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))), 0.5)
	elif n <= 1.6e-152:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))))
	else:
		tmp = math.pow((2.0 * ((n * U) * (t + (-2.0 * t_1)))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	tmp = 0.0
	if (n <= -4.7e-125)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * Float64(l_m / Float64(Om / l_m)))))) ^ 0.5;
	elseif (n <= 1.6e-152)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * t_1))))));
	else
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(-2.0 * t_1)))) ^ 0.5;
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = l_m * (l_m / Om);
	tmp = 0.0;
	if (n <= -4.7e-125)
		tmp = (2.0 * ((n * U) * (t + (-2.0 * (l_m / (Om / l_m)))))) ^ 0.5;
	elseif (n <= 1.6e-152)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * t_1))))));
	else
		tmp = (2.0 * ((n * U) * (t + (-2.0 * t_1)))) ^ 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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, -4.7e-125], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * N[(l$95$m / N[(Om / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[n, 1.6e-152], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(-2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l_m \cdot \frac{l_m}{Om}\\
\mathbf{if}\;n \leq -4.7 \cdot 10^{-125}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot \frac{l_m}{\frac{Om}{l_m}}\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;n \leq 1.6 \cdot 10^{-152}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot t_1\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + -2 \cdot t_1\right)\right)\right)}^{0.5}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -4.7e-125

    1. Initial program 52.5%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 38.8%

      \[\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/251.7%

        \[\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*55.0%

        \[\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-inv55.0%

        \[\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-eval55.0%

        \[\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-rr55.0%

      \[\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. Step-by-step derivation
      1. unpow20.0%

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + -2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right)\right)\right)}^{0.5} \]
      3. un-div-inv63.2%

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

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

    if -4.7e-125 < n < 1.60000000000000006e-152

    1. Initial program 37.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. Simplified42.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 43.7%

      \[\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. unpow228.1%

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

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

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

    if 1.60000000000000006e-152 < n

    1. Initial program 60.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. Simplified60.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 45.9%

      \[\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/255.6%

        \[\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*55.6%

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

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

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

      \[\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. Step-by-step derivation
      1. unpow259.4%

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

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

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

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

Alternative 12: 48.5% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right)\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 (* 2.0 (* l_m (/ l_m Om)))))))))
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 - (2.0 * (l_m * (l_m / Om))))))));
}
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 - (2.0d0 * (l_m * (l_m / om))))))))
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 - (2.0 * (l_m * (l_m / Om))))))));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))))))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (l_m * (l_m / Om))))))));
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 * N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 49.7%

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

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
  3. Add Preprocessing
  4. Taylor expanded in n around 0 42.9%

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

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

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

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

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

Alternative 13: 38.3% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq 6.1 \cdot 10^{+143}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 6.1000000000000004e143

    1. Initial program 48.2%

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 43.1%

      \[\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/252.0%

        \[\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*47.2%

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

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

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

      \[\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 t around inf 37.1%

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

    if 6.1000000000000004e143 < Om

    1. Initial program 56.7%

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

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

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

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

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

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

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

Alternative 14: 36.4% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 1.2999999999999999e143

    1. Initial program 48.2%

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

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

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

    if 1.2999999999999999e143 < Om

    1. Initial program 56.7%

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

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

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

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

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

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

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

Alternative 15: 36.4% 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 49.7%

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

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

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

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

Reproduce

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