Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 64.6%
Time: 28.4s
Alternatives: 19
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 49.5% accurate, 1.0× speedup?

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

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

Alternative 1: 64.6% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_2 := \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\\ t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\ \mathbf{if}\;t\_3 \leq 10^{-158}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(n, t\_1 \cdot \left(U - U*\right), 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{\left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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(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 (pow (/ l_m Om) 2.0))
        (t_2 (* (* n t_1) (- U* U)))
        (t_3
         (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
   (if (<= t_3 1e-158)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma n (* t_1 (- U U*)) (* 2.0 (/ (pow l_m 2.0) Om)))))))
     (if (<= t_3 INFINITY)
       (sqrt (* (+ t (- t_2 (* 2.0 (* l_m (/ l_m Om))))) (* 2.0 (* n U))))
       (*
        (sqrt
         (* U (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.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 = pow((l_m / Om), 2.0);
	double t_2 = (n * t_1) * (U_42_ - U);
	double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
	double tmp;
	if (t_3 <= 1e-158) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(n, (t_1 * (U - U_42_)), (2.0 * (pow(l_m, 2.0) / Om))))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(((t + (t_2 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.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 / Om) ^ 2.0
	t_2 = Float64(Float64(n * t_1) * Float64(U_42_ - U))
	t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2)))
	tmp = 0.0
	if (t_3 <= 1e-158)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(n, Float64(t_1 * Float64(U - U_42_)), Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(Float64(t + Float64(t_2 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.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[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 1e-158], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(t + N[(t$95$2 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $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(\frac{l\_m}{Om}\right)}^{2}\\
t_2 := \left(n \cdot t\_1\right) \cdot \left(U* - U\right)\\
t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\
\mathbf{if}\;t\_3 \leq 10^{-158}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(n, t\_1 \cdot \left(U - U*\right), 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\

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

\mathbf{else}:\\
\;\;\;\;\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(l\_m \cdot \sqrt{2}\right)\\


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

    1. Initial program 11.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. Simplified36.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - \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)} \]
      3. +-commutative37.6%

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

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

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.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 10^{-158}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right), 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\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)\\ \end{array} \]
  5. Add Preprocessing

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

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

\mathbf{else}:\\
\;\;\;\;\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(l\_m \cdot \sqrt{2}\right)\\


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

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

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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


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

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

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 4: 61.8% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := n \cdot {l\_m}^{2}\\ t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ t_3 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_2\right)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot t\_1}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{\left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \frac{t\_1 \cdot \left(2 - n \cdot \frac{U*}{Om}\right)}{Om}\right)\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 2.0)))
        (t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_3
         (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_2)))))
   (if (<= t_3 0.0)
     (sqrt (+ (* -4.0 (/ (* U t_1) Om)) (* 2.0 (* U (* n t)))))
     (if (<= t_3 INFINITY)
       (sqrt (* (+ t (- t_2 (* 2.0 (* l_m (/ l_m Om))))) (* 2.0 (* n U))))
       (sqrt (fabs (* 2.0 (* U (/ (* t_1 (- 2.0 (* n (/ U* Om)))) Om)))))))))
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, 2.0);
	double t_2 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt(((t + (t_2 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = sqrt(fabs((2.0 * (U * ((t_1 * (2.0 - (n * (U_42_ / Om)))) / Om)))));
	}
	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, 2.0);
	double t_2 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_3 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t + (t_2 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.sqrt(Math.abs((2.0 * (U * ((t_1 * (2.0 - (n * (U_42_ / Om)))) / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = n * math.pow(l_m, 2.0)
	t_2 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)
	t_3 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))))
	elif t_3 <= math.inf:
		tmp = math.sqrt(((t + (t_2 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))))
	else:
		tmp = math.sqrt(math.fabs((2.0 * (U * ((t_1 * (2.0 - (n * (U_42_ / Om)))) / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(n * (l_m ^ 2.0))
	t_2 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))
	t_3 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_2)))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = sqrt(Float64(Float64(-4.0 * Float64(Float64(U * t_1) / Om)) + Float64(2.0 * Float64(U * Float64(n * t)))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(Float64(t + Float64(t_2 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(Float64(t_1 * Float64(2.0 - Float64(n * Float64(U_42_ / Om)))) / Om)))));
	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 ^ 2.0);
	t_2 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U);
	t_3 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_2)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt(((-4.0 * ((U * t_1) / Om)) + (2.0 * (U * (n * t)))));
	elseif (t_3 <= Inf)
		tmp = sqrt(((t + (t_2 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	else
		tmp = sqrt(abs((2.0 * (U * ((t_1 * (2.0 - (n * (U_42_ / Om)))) / Om)))));
	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[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[Sqrt[N[(N[(-4.0 * N[(N[(U * t$95$1), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(N[(t + N[(t$95$2 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(N[(t$95$1 * N[(2.0 - N[(n * N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


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

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

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/20.6%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow20.6%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square0.6%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*0.6%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative0.6%

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative0.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.3% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(U* \cdot {\left(n \cdot \frac{l\_m}{Om}\right)}^{2}\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 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
   (if (<= t_2 0.0)
     (sqrt (+ (* -4.0 (/ (* U (* n (pow l_m 2.0))) Om)) (* 2.0 (* U (* n t)))))
     (if (<= t_2 INFINITY)
       (sqrt (* (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om))))) (* 2.0 (* n U))))
       (sqrt (fabs (* 2.0 (* U (* U* (pow (* n (/ l_m Om)) 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) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt(((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((t + (t_1 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = sqrt(fabs((2.0 * (U * (U_42_ * pow((n * (l_m / Om)), 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) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_2 <= 0.0) {
		tmp = Math.sqrt(((-4.0 * ((U * (n * Math.pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t)))));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((t + (t_1 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	} else {
		tmp = Math.sqrt(Math.abs((2.0 * (U * (U_42_ * Math.pow((n * (l_m / Om)), 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 - (2.0 * ((l_m * l_m) / Om))) + t_1)
	tmp = 0
	if t_2 <= 0.0:
		tmp = math.sqrt(((-4.0 * ((U * (n * math.pow(l_m, 2.0))) / Om)) + (2.0 * (U * (n * t)))))
	elif t_2 <= math.inf:
		tmp = math.sqrt(((t + (t_1 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))))
	else:
		tmp = math.sqrt(math.fabs((2.0 * (U * (U_42_ * math.pow((n * (l_m / Om)), 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(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = sqrt(Float64(Float64(-4.0 * Float64(Float64(U * Float64(n * (l_m ^ 2.0))) / Om)) + Float64(2.0 * Float64(U * Float64(n * t)))));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om))))) * Float64(2.0 * Float64(n * U))));
	else
		tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(U_42_ * (Float64(n * Float64(l_m / Om)) ^ 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 - (2.0 * ((l_m * l_m) / Om))) + t_1);
	tmp = 0.0;
	if (t_2 <= 0.0)
		tmp = sqrt(((-4.0 * ((U * (n * (l_m ^ 2.0))) / Om)) + (2.0 * (U * (n * t)))));
	elseif (t_2 <= Inf)
		tmp = sqrt(((t + (t_1 - (2.0 * (l_m * (l_m / Om))))) * (2.0 * (n * U))));
	else
		tmp = sqrt(abs((2.0 * (U * (U_42_ * ((n * (l_m / Om)) ^ 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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Sqrt[N[(N[(-4.0 * N[(N[(U * N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(U$42$ * N[Power[N[(n * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U \cdot \left(n \cdot {l\_m}^{2}\right)}{Om} + 2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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

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


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

    1. Initial program 8.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. Simplified30.3%

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/20.1%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow20.1%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square0.1%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*0.1%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative0.1%

        \[\leadsto \sqrt{\left|2 \cdot \left(\color{blue}{\left(U \cdot n\right)} \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)\right)\right|} \]
      6. fma-define0.1%

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative0.1%

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \frac{{\ell}^{2} \cdot 2 + \color{blue}{{\ell}^{2} \cdot \frac{n \cdot \left(U - U*\right)}{Om}}}{Om}\right)\right)\right|} \]
      3. distribute-lft-out34.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left|2 \cdot \left(U \cdot \left(U* \cdot \color{blue}{{\left(n \cdot \frac{\ell}{Om}\right)}^{2}}\right)\right)\right|} \]
    16. Simplified44.9%

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

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

Alternative 6: 60.4% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 8.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. Simplified30.3%

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

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

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

    1. Initial program 70.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 42.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq 4.2 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.85e-283 or 1.05e-141 < t < 4.20000000000000015e91

    1. Initial program 48.5%

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

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

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

    if -1.85e-283 < t < 1.05e-141

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{U \cdot U*} \cdot \frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om}} \]
      3. distribute-rgt-neg-in22.1%

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)} \]
      5. distribute-rgt-neg-in24.4%

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

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

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

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

    if 4.20000000000000015e91 < t

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot n\right)\right)}^{0.5} \cdot \sqrt{t}} \]
    10. Step-by-step derivation
      1. unpow1/263.9%

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

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

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

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

Alternative 8: 39.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{U \cdot U*}\\ t_2 := \frac{\sqrt{2}}{Om}\\ \mathbf{if}\;Om \leq -2.75 \cdot 10^{-198}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;Om \leq 1.4 \cdot 10^{-276}:\\ \;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(n \cdot l\_m\right)\right)\\ \mathbf{elif}\;Om \leq 5.1 \cdot 10^{-104}:\\ \;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(l\_m \cdot \left(-n\right)\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\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 (sqrt (* U U*))) (t_2 (/ (sqrt 2.0) Om)))
   (if (<= Om -2.75e-198)
     (sqrt (fabs (* 2.0 (* U (* n t)))))
     (if (<= Om 1.4e-276)
       (* t_1 (* t_2 (* n l_m)))
       (if (<= Om 5.1e-104)
         (* t_1 (* t_2 (* l_m (- n))))
         (sqrt (fabs (* 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 t_1 = sqrt((U * U_42_));
	double t_2 = sqrt(2.0) / Om;
	double tmp;
	if (Om <= -2.75e-198) {
		tmp = sqrt(fabs((2.0 * (U * (n * t)))));
	} else if (Om <= 1.4e-276) {
		tmp = t_1 * (t_2 * (n * l_m));
	} else if (Om <= 5.1e-104) {
		tmp = t_1 * (t_2 * (l_m * -n));
	} else {
		tmp = sqrt(fabs((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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = sqrt((u * u_42))
    t_2 = sqrt(2.0d0) / om
    if (om <= (-2.75d-198)) then
        tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
    else if (om <= 1.4d-276) then
        tmp = t_1 * (t_2 * (n * l_m))
    else if (om <= 5.1d-104) then
        tmp = t_1 * (t_2 * (l_m * -n))
    else
        tmp = sqrt(abs((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 t_1 = Math.sqrt((U * U_42_));
	double t_2 = Math.sqrt(2.0) / Om;
	double tmp;
	if (Om <= -2.75e-198) {
		tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
	} else if (Om <= 1.4e-276) {
		tmp = t_1 * (t_2 * (n * l_m));
	} else if (Om <= 5.1e-104) {
		tmp = t_1 * (t_2 * (l_m * -n));
	} else {
		tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((U * U_42_))
	t_2 = math.sqrt(2.0) / Om
	tmp = 0
	if Om <= -2.75e-198:
		tmp = math.sqrt(math.fabs((2.0 * (U * (n * t)))))
	elif Om <= 1.4e-276:
		tmp = t_1 * (t_2 * (n * l_m))
	elif Om <= 5.1e-104:
		tmp = t_1 * (t_2 * (l_m * -n))
	else:
		tmp = math.sqrt(math.fabs((2.0 * (t * (n * U)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(U * U_42_))
	t_2 = Float64(sqrt(2.0) / Om)
	tmp = 0.0
	if (Om <= -2.75e-198)
		tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t)))));
	elseif (Om <= 1.4e-276)
		tmp = Float64(t_1 * Float64(t_2 * Float64(n * l_m)));
	elseif (Om <= 5.1e-104)
		tmp = Float64(t_1 * Float64(t_2 * Float64(l_m * Float64(-n))));
	else
		tmp = sqrt(abs(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_)
	t_1 = sqrt((U * U_42_));
	t_2 = sqrt(2.0) / Om;
	tmp = 0.0;
	if (Om <= -2.75e-198)
		tmp = sqrt(abs((2.0 * (U * (n * t)))));
	elseif (Om <= 1.4e-276)
		tmp = t_1 * (t_2 * (n * l_m));
	elseif (Om <= 5.1e-104)
		tmp = t_1 * (t_2 * (l_m * -n));
	else
		tmp = sqrt(abs((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$_] := Block[{t$95$1 = N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[Om, -2.75e-198], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.4e-276], N[(t$95$1 * N[(t$95$2 * N[(n * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 5.1e-104], N[(t$95$1 * N[(t$95$2 * N[(l$95$m * (-n)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
t_2 := \frac{\sqrt{2}}{Om}\\
\mathbf{if}\;Om \leq -2.75 \cdot 10^{-198}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\

\mathbf{elif}\;Om \leq 1.4 \cdot 10^{-276}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(n \cdot l\_m\right)\right)\\

\mathbf{elif}\;Om \leq 5.1 \cdot 10^{-104}:\\
\;\;\;\;t\_1 \cdot \left(t\_2 \cdot \left(l\_m \cdot \left(-n\right)\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Om < -2.75e-198

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/231.6%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow231.6%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square45.6%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*45.6%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative45.6%

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative45.6%

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

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

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

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

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

    if -2.75e-198 < Om < 1.39999999999999993e-276

    1. Initial program 34.8%

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot {\left(\frac{{Om}^{2}}{\color{blue}{\left(U \cdot U*\right) \cdot \left({\ell}^{2} \cdot {n}^{2}\right)}}\right)}^{-1}} \]
      4. pow-prod-down43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.39999999999999993e-276 < Om < 5.09999999999999992e-104

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.09999999999999992e-104 < Om

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/236.3%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow236.3%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square54.2%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*54.2%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative54.2%

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative54.2%

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

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

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

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

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

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

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

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

Alternative 9: 40.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{U \cdot U*}\\ \mathbf{if}\;Om \leq -9.8 \cdot 10^{-190}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;Om \leq 3.8 \cdot 10^{-279}:\\ \;\;\;\;t\_1 \cdot \left(\frac{\sqrt{2}}{Om} \cdot \left(n \cdot l\_m\right)\right)\\ \mathbf{elif}\;Om \leq 1.5 \cdot 10^{-103}:\\ \;\;\;\;\frac{t\_1 \cdot \left(l\_m \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)\right)}{Om}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\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 (sqrt (* U U*))))
   (if (<= Om -9.8e-190)
     (sqrt (fabs (* 2.0 (* U (* n t)))))
     (if (<= Om 3.8e-279)
       (* t_1 (* (/ (sqrt 2.0) Om) (* n l_m)))
       (if (<= Om 1.5e-103)
         (/ (* t_1 (* l_m (* n (- (sqrt 2.0))))) Om)
         (sqrt (fabs (* 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 t_1 = sqrt((U * U_42_));
	double tmp;
	if (Om <= -9.8e-190) {
		tmp = sqrt(fabs((2.0 * (U * (n * t)))));
	} else if (Om <= 3.8e-279) {
		tmp = t_1 * ((sqrt(2.0) / Om) * (n * l_m));
	} else if (Om <= 1.5e-103) {
		tmp = (t_1 * (l_m * (n * -sqrt(2.0)))) / Om;
	} else {
		tmp = sqrt(fabs((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) :: t_1
    real(8) :: tmp
    t_1 = sqrt((u * u_42))
    if (om <= (-9.8d-190)) then
        tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
    else if (om <= 3.8d-279) then
        tmp = t_1 * ((sqrt(2.0d0) / om) * (n * l_m))
    else if (om <= 1.5d-103) then
        tmp = (t_1 * (l_m * (n * -sqrt(2.0d0)))) / om
    else
        tmp = sqrt(abs((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 t_1 = Math.sqrt((U * U_42_));
	double tmp;
	if (Om <= -9.8e-190) {
		tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
	} else if (Om <= 3.8e-279) {
		tmp = t_1 * ((Math.sqrt(2.0) / Om) * (n * l_m));
	} else if (Om <= 1.5e-103) {
		tmp = (t_1 * (l_m * (n * -Math.sqrt(2.0)))) / Om;
	} else {
		tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((U * U_42_))
	tmp = 0
	if Om <= -9.8e-190:
		tmp = math.sqrt(math.fabs((2.0 * (U * (n * t)))))
	elif Om <= 3.8e-279:
		tmp = t_1 * ((math.sqrt(2.0) / Om) * (n * l_m))
	elif Om <= 1.5e-103:
		tmp = (t_1 * (l_m * (n * -math.sqrt(2.0)))) / Om
	else:
		tmp = math.sqrt(math.fabs((2.0 * (t * (n * U)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(U * U_42_))
	tmp = 0.0
	if (Om <= -9.8e-190)
		tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t)))));
	elseif (Om <= 3.8e-279)
		tmp = Float64(t_1 * Float64(Float64(sqrt(2.0) / Om) * Float64(n * l_m)));
	elseif (Om <= 1.5e-103)
		tmp = Float64(Float64(t_1 * Float64(l_m * Float64(n * Float64(-sqrt(2.0))))) / Om);
	else
		tmp = sqrt(abs(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_)
	t_1 = sqrt((U * U_42_));
	tmp = 0.0;
	if (Om <= -9.8e-190)
		tmp = sqrt(abs((2.0 * (U * (n * t)))));
	elseif (Om <= 3.8e-279)
		tmp = t_1 * ((sqrt(2.0) / Om) * (n * l_m));
	elseif (Om <= 1.5e-103)
		tmp = (t_1 * (l_m * (n * -sqrt(2.0)))) / Om;
	else
		tmp = sqrt(abs((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$_] := Block[{t$95$1 = N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[Om, -9.8e-190], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 3.8e-279], N[(t$95$1 * N[(N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision] * N[(n * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[Om, 1.5e-103], N[(N[(t$95$1 * N[(l$95$m * N[(n * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
\mathbf{if}\;Om \leq -9.8 \cdot 10^{-190}:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Om < -9.7999999999999994e-190

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/231.6%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow231.6%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square45.6%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*45.6%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative45.6%

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative45.6%

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

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

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

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

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

    if -9.7999999999999994e-190 < Om < 3.80000000000000033e-279

    1. Initial program 34.8%

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot {\left(\frac{{Om}^{2}}{\color{blue}{\left(U \cdot U*\right) \cdot \left({\ell}^{2} \cdot {n}^{2}\right)}}\right)}^{-1}} \]
      4. pow-prod-down43.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.80000000000000033e-279 < Om < 1.5e-103

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(\left(n \cdot \color{blue}{\left(\sqrt{-1} \cdot \sqrt{-1}\right)}\right) \cdot \sqrt{2}\right)\right)}{Om} \]
      5. rem-square-sqrt34.4%

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

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

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

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

        \[\leadsto \frac{-\color{blue}{\left(\ell \cdot \left(n \cdot \sqrt{2}\right)\right) \cdot \sqrt{U \cdot U*}}}{Om} \]
      3. distribute-rgt-neg-in34.4%

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

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

    if 1.5e-103 < Om

    1. Initial program 54.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/236.3%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow236.3%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square54.2%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*54.2%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative54.2%

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

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative54.2%

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

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

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

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

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

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

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

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

Alternative 10: 44.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -4.2 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;Om \leq 5.2 \cdot 10^{-58}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(\left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -4.2e-123)
   (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
   (if (<= Om 5.2e-58)
     (sqrt (* 2.0 (* n (* U (* (* n (pow (/ l_m Om) 2.0)) U*)))))
     (sqrt (fabs (* 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 <= -4.2e-123) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (Om <= 5.2e-58) {
		tmp = sqrt((2.0 * (n * (U * ((n * pow((l_m / Om), 2.0)) * U_42_)))));
	} else {
		tmp = sqrt(fabs((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 <= (-4.2d-123)) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    else if (om <= 5.2d-58) then
        tmp = sqrt((2.0d0 * (n * (u * ((n * ((l_m / om) ** 2.0d0)) * u_42)))))
    else
        tmp = sqrt(abs((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 <= -4.2e-123) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	} else if (Om <= 5.2e-58) {
		tmp = Math.sqrt((2.0 * (n * (U * ((n * Math.pow((l_m / Om), 2.0)) * U_42_)))));
	} else {
		tmp = Math.sqrt(Math.abs((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 <= -4.2e-123:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	elif Om <= 5.2e-58:
		tmp = math.sqrt((2.0 * (n * (U * ((n * math.pow((l_m / Om), 2.0)) * U_42_)))))
	else:
		tmp = math.sqrt(math.fabs((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 <= -4.2e-123)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (Om <= 5.2e-58)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * U_42_)))));
	else
		tmp = sqrt(abs(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 <= -4.2e-123)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	elseif (Om <= 5.2e-58)
		tmp = sqrt((2.0 * (n * (U * ((n * ((l_m / Om) ^ 2.0)) * U_42_)))));
	else
		tmp = sqrt(abs((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, -4.2e-123], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 5.2e-58], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -4.1999999999999998e-123

    1. Initial program 48.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. Simplified49.1%

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

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

    if -4.1999999999999998e-123 < Om < 5.20000000000000013e-58

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.20000000000000013e-58 < Om

    1. Initial program 52.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. Simplified61.0%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/235.3%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow235.3%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square53.0%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*53.0%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative53.0%

        \[\leadsto \sqrt{\left|2 \cdot \left(\color{blue}{\left(U \cdot n\right)} \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)\right)\right|} \]
      6. fma-define53.0%

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative53.0%

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

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

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

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

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

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

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

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

Alternative 11: 44.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -4 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;Om \leq 5.6 \cdot 10^{-58}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(n \cdot U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= Om -4e-123)
   (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
   (if (<= Om 5.6e-58)
     (sqrt (* (* 2.0 n) (* U (* (pow (/ l_m Om) 2.0) (* n U*)))))
     (sqrt (fabs (* 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 <= -4e-123) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} else if (Om <= 5.6e-58) {
		tmp = sqrt(((2.0 * n) * (U * (pow((l_m / Om), 2.0) * (n * U_42_)))));
	} else {
		tmp = sqrt(fabs((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 <= (-4d-123)) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    else if (om <= 5.6d-58) then
        tmp = sqrt(((2.0d0 * n) * (u * (((l_m / om) ** 2.0d0) * (n * u_42)))))
    else
        tmp = sqrt(abs((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 <= -4e-123) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l_m, 2.0) / Om)))))));
	} else if (Om <= 5.6e-58) {
		tmp = Math.sqrt(((2.0 * n) * (U * (Math.pow((l_m / Om), 2.0) * (n * U_42_)))));
	} else {
		tmp = Math.sqrt(Math.abs((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 <= -4e-123:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l_m, 2.0) / Om)))))))
	elif Om <= 5.6e-58:
		tmp = math.sqrt(((2.0 * n) * (U * (math.pow((l_m / Om), 2.0) * (n * U_42_)))))
	else:
		tmp = math.sqrt(math.fabs((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 <= -4e-123)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))))));
	elseif (Om <= 5.6e-58)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64((Float64(l_m / Om) ^ 2.0) * Float64(n * U_42_)))));
	else
		tmp = sqrt(abs(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 <= -4e-123)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	elseif (Om <= 5.6e-58)
		tmp = sqrt(((2.0 * n) * (U * (((l_m / Om) ^ 2.0) * (n * U_42_)))));
	else
		tmp = sqrt(abs((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, -4e-123], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 5.6e-58], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -4.0000000000000002e-123

    1. Initial program 48.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. Simplified49.1%

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

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

    if -4.0000000000000002e-123 < Om < 5.6000000000000001e-58

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.6000000000000001e-58 < Om

    1. Initial program 52.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. Simplified61.0%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
    6. Step-by-step derivation
      1. unpow1/235.3%

        \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
      2. unpow235.3%

        \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
      3. rem-sqrt-square53.0%

        \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
      4. associate-*l*53.0%

        \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
      5. *-commutative53.0%

        \[\leadsto \sqrt{\left|2 \cdot \left(\color{blue}{\left(U \cdot n\right)} \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)\right)\right|} \]
      6. fma-define53.0%

        \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
      7. +-commutative53.0%

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

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

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

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

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

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

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

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

Alternative 12: 45.4% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := t - 2 \cdot \frac{{l\_m}^{2}}{Om}\\ \mathbf{if}\;Om \leq -1.1 \cdot 10^{-122}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\_1\right)\right)}\\ \mathbf{elif}\;Om \leq 1.45 \cdot 10^{-244}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot \left(n \cdot U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\_1}\\ \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 (/ (pow l_m 2.0) Om)))))
   (if (<= Om -1.1e-122)
     (sqrt (* 2.0 (* U (* n t_1))))
     (if (<= Om 1.45e-244)
       (sqrt (* (* 2.0 n) (* U (* (pow (/ l_m Om) 2.0) (* n U*)))))
       (sqrt (* (* (* 2.0 n) U) 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 = t - (2.0 * (pow(l_m, 2.0) / Om));
	double tmp;
	if (Om <= -1.1e-122) {
		tmp = sqrt((2.0 * (U * (n * t_1))));
	} else if (Om <= 1.45e-244) {
		tmp = sqrt(((2.0 * n) * (U * (pow((l_m / Om), 2.0) * (n * U_42_)))));
	} else {
		tmp = sqrt((((2.0 * n) * U) * 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 = t - (2.0d0 * ((l_m ** 2.0d0) / om))
    if (om <= (-1.1d-122)) then
        tmp = sqrt((2.0d0 * (u * (n * t_1))))
    else if (om <= 1.45d-244) then
        tmp = sqrt(((2.0d0 * n) * (u * (((l_m / om) ** 2.0d0) * (n * u_42)))))
    else
        tmp = sqrt((((2.0d0 * n) * u) * 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 = t - (2.0 * (Math.pow(l_m, 2.0) / Om));
	double tmp;
	if (Om <= -1.1e-122) {
		tmp = Math.sqrt((2.0 * (U * (n * t_1))));
	} else if (Om <= 1.45e-244) {
		tmp = Math.sqrt(((2.0 * n) * (U * (Math.pow((l_m / Om), 2.0) * (n * U_42_)))));
	} else {
		tmp = Math.sqrt((((2.0 * n) * U) * t_1));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = t - (2.0 * (math.pow(l_m, 2.0) / Om))
	tmp = 0
	if Om <= -1.1e-122:
		tmp = math.sqrt((2.0 * (U * (n * t_1))))
	elif Om <= 1.45e-244:
		tmp = math.sqrt(((2.0 * n) * (U * (math.pow((l_m / Om), 2.0) * (n * U_42_)))))
	else:
		tmp = math.sqrt((((2.0 * n) * U) * t_1))
	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 ^ 2.0) / Om)))
	tmp = 0.0
	if (Om <= -1.1e-122)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t_1))));
	elseif (Om <= 1.45e-244)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64((Float64(l_m / Om) ^ 2.0) * Float64(n * U_42_)))));
	else
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t_1));
	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 ^ 2.0) / Om));
	tmp = 0.0;
	if (Om <= -1.1e-122)
		tmp = sqrt((2.0 * (U * (n * t_1))));
	elseif (Om <= 1.45e-244)
		tmp = sqrt(((2.0 * n) * (U * (((l_m / Om) ^ 2.0) * (n * U_42_)))));
	else
		tmp = sqrt((((2.0 * n) * U) * 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[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[Om, -1.1e-122], N[Sqrt[N[(2.0 * N[(U * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, 1.45e-244], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(n * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t$95$1), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -1.1e-122

    1. Initial program 48.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. Simplified49.1%

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

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

    if -1.1e-122 < Om < 1.44999999999999998e-244

    1. Initial program 35.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. Simplified31.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.44999999999999998e-244 < Om

    1. Initial program 54.8%

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

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

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

Alternative 13: 44.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -4.4000000000000002e-147

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

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

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

    if -4.4000000000000002e-147 < Om < 1.9e-244

    1. Initial program 30.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. Simplified28.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9e-244 < Om

    1. Initial program 54.8%

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

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

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

Alternative 14: 38.3% accurate, 1.1× speedup?

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

\\
\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}
\end{array}
Derivation
  1. Initial program 49.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. Simplified51.3%

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}\right)}^{0.5}}} \]
  6. Step-by-step derivation
    1. unpow1/234.2%

      \[\leadsto \sqrt{\color{blue}{\sqrt{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}^{2}}}} \]
    2. unpow234.2%

      \[\leadsto \sqrt{\sqrt{\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \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)\right)}}} \]
    3. rem-sqrt-square48.2%

      \[\leadsto \sqrt{\color{blue}{\left|\left(2 \cdot \left(n \cdot U\right)\right) \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)\right|}} \]
    4. associate-*l*48.2%

      \[\leadsto \sqrt{\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \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)\right)}\right|} \]
    5. *-commutative48.2%

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

      \[\leadsto \sqrt{\left|2 \cdot \left(\left(U \cdot n\right) \cdot \left(t - \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)\right|} \]
    7. +-commutative48.2%

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

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

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

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

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

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

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

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

Alternative 15: 37.9% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;{\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 3.1e+38)
   (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 <= 3.1e+38) {
		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 <= 3.1d+38) 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 <= 3.1e+38) {
		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 <= 3.1e+38:
		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 <= 3.1e+38)
		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 <= 3.1e+38)
		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, 3.1e+38], 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 3.1 \cdot 10^{+38}:\\
\;\;\;\;{\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 < 3.10000000000000018e38

    1. Initial program 46.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. Simplified46.6%

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

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

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

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

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

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

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

    if 3.10000000000000018e38 < Om

    1. Initial program 55.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. Simplified62.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq 3.1 \cdot 10^{+38}:\\ \;\;\;\;{\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 16: 36.8% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 63.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. Simplified53.6%

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

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

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

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

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

    if -1.00000000000000004e-25 < U

    1. Initial program 44.1%

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

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

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

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

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

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

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

Alternative 17: 37.5% accurate, 2.1× speedup?

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

\\
{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 49.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. Simplified51.3%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(U \cdot n\right)\right) \cdot t\right)}^{0.5}} \]
  10. Final simplification39.0%

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

Alternative 18: 34.6% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*) :precision binary64 (sqrt (* 2.0 (* n (* U 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 * (n * (U * 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 * (n * (u * 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 * (n * (U * t))));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt((2.0 * (n * (U * t))))
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(n * Float64(U * t))))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt((2.0 * (n * (U * t))));
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 49.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. Simplified51.3%

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

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

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

Alternative 19: 35.9% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Derivation
  1. Initial program 49.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. Simplified51.3%

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

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

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

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

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

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

Reproduce

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