Toniolo and Linder, Equation (13)

Percentage Accurate: 50.0% → 64.6%
Time: 31.0s
Alternatives: 22
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 alternatives:

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

Initial Program: 50.0% accurate, 1.0× speedup?

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

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

Alternative 1: 64.6% accurate, 0.3× speedup?

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

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

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

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


\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 13.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. Simplified34.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. *-commutative34.3%

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

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

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

    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.6%

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

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

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #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.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 Om around -inf 38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 60.1% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \left(U \cdot \frac{n}{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*))))) < 9.9999999999999997e-148

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

      \[\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 35.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)}} \]
    5. Taylor expanded in U around 0 37.5%

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

    if 9.9999999999999997e-148 < (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.3%

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

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

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #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.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 Om around -inf 38.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.5% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 12.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. Simplified34.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 Om around -inf 34.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.6%

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified6.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 Om around -inf 38.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(\left(t - 2 \cdot t\_1\right) + t\_4\right)}\\

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


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

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

    if 5.00000000000000037e-286 < (*.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.3%

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

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

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

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

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

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified6.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 Om around -inf 38.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 63.9% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 16.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. Simplified37.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. Taylor expanded in Om around inf 33.7%

      \[\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)}} \]
    5. Taylor expanded in U around 0 38.1%

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

    if 1.00000000000000002e-294 < (*.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.3%

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

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

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

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

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

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified6.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 Om around -inf 38.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.1% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+298}:\\
\;\;\;\;\sqrt{t\_1}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(\sqrt{2} \cdot \sqrt{n \cdot \left(U \cdot \left(U* \cdot \frac{n}{{Om}^{2}}\right) + -2 \cdot \frac{U}{Om}\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*)))) < 1.00000000000000002e-294

    1. Initial program 16.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. Simplified37.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. Taylor expanded in Om around inf 33.7%

      \[\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)}} \]
    5. Taylor expanded in U around 0 38.1%

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

    if 1.00000000000000002e-294 < (*.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*)))) < 9.9999999999999996e297

    1. Initial program 96.0%

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

    if 9.9999999999999996e297 < (*.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 20.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. Simplified29.0%

      \[\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 Om around -inf 30.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 64.3% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\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*)))) < 1.00000000000000002e-294

    1. Initial program 16.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. Simplified37.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. Taylor expanded in Om around inf 33.7%

      \[\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)}} \]
    5. Taylor expanded in U around 0 38.1%

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

    if 1.00000000000000002e-294 < (*.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.3%

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

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

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

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

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

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified6.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 Om around -inf 38.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 60.9% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 16.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. Simplified37.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. Taylor expanded in Om around inf 33.7%

      \[\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)}} \]
    5. Taylor expanded in U around 0 38.1%

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

    if 1.00000000000000002e-294 < (*.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.3%

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

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

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

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

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

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified6.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 U* around inf 36.8%

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

Alternative 9: 60.8% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \frac{U* \cdot t\_1}{{Om}^{2}}\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*)))) < 1.00000000000000002e-294

    1. Initial program 16.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. Simplified37.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. Taylor expanded in Om around inf 33.7%

      \[\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)}} \]
    5. Taylor expanded in U around 0 38.1%

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

    if 1.00000000000000002e-294 < (*.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.3%

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

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

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

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

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

    1. Initial program 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified6.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 U* around inf 34.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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification61.5%

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

Alternative 10: 54.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.85 \cdot 10^{-244} \lor \neg \left(n \leq 7.7 \cdot 10^{-137}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(U* - U\right) \cdot \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.8500000000000001e-244 or 7.7000000000000004e-137 < n

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

      \[\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 -1.8500000000000001e-244 < n < 7.7000000000000004e-137

    1. Initial program 39.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. Simplified38.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. Taylor expanded in Om around inf 52.6%

      \[\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)}} \]
    5. Taylor expanded in U around 0 57.8%

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

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

Alternative 11: 54.2% accurate, 1.0× speedup?

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

\mathbf{elif}\;n \leq 1.6 \cdot 10^{-135}:\\
\;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{n \cdot {l\_m}^{2}}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\

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


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

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

      \[\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 -1.4000000000000001e-245 < n < 1.6e-135

    1. Initial program 39.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. Simplified38.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. Taylor expanded in Om around inf 52.6%

      \[\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)}} \]
    5. Taylor expanded in U around 0 57.8%

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

    if 1.6e-135 < n

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

Alternative 12: 45.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 3.55 \cdot 10^{+65}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\

\mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot {l\_m}^{2}\right)\right)}{Om}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 3.5500000000000002e65

    1. Initial program 55.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. Simplified55.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 t around inf 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5500000000000002e65 < l < 1.35000000000000003e154

    1. Initial program 40.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. Simplified34.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 Om around inf 44.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)}} \]
    5. Taylor expanded in U around 0 38.4%

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

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

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

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

    if 1.35000000000000003e154 < l

    1. Initial program 21.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. Simplified33.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 Om around -inf 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 44.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 1.7 \cdot 10^{+67}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\

\mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(U \cdot \left(n \cdot {l\_m}^{2}\right)\right)}{Om}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.7000000000000001e67

    1. Initial program 55.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. Simplified55.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 t around inf 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7000000000000001e67 < l < 1.35000000000000003e154

    1. Initial program 40.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. Simplified34.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 Om around inf 44.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)}} \]
    5. Taylor expanded in U around 0 38.4%

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

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

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

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

    if 1.35000000000000003e154 < l

    1. Initial program 21.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. Simplified33.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 Om around -inf 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 48.2% accurate, 1.0× speedup?

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

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

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


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

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

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

      \[\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)}} \]
    5. Taylor expanded in U around 0 54.4%

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

    if 1.35000000000000003e154 < l

    1. Initial program 21.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. Simplified33.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 Om around -inf 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 48.4% accurate, 1.0× speedup?

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

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

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


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

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

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

      \[\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.4e154 < l

    1. Initial program 21.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. Simplified33.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 Om around -inf 24.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 41.0% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 5.5 \cdot 10^{+64}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\

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


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

    1. Initial program 55.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. Simplified55.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 t around inf 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.4999999999999996e64 < l

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

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around inf 31.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)}} \]
    5. Taylor expanded in U around 0 28.9%

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

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

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

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

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

Alternative 17: 39.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l\_m \leq 2.4 \cdot 10^{+21}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right|}\\

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


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

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4e21 < l

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

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

      \[\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)}} \]
    5. Taylor expanded in U around 0 28.8%

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

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

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

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

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

Alternative 18: 39.2% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.4% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

Alternative 20: 36.6% accurate, 2.1× speedup?

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

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

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

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

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

Alternative 21: 36.6% 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 51.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. Simplified51.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 35.2%

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

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

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

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

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

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

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

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

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

Alternative 22: 35.8% 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 51.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. Simplified51.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 35.2%

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

Reproduce

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