Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 65.3%
Time: 28.7s
Alternatives: 17
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 49.5% accurate, 1.0× speedup?

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

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

Alternative 1: 65.3% accurate, 0.3× speedup?

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

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

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\left|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\right|\\

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


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

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5e287

    1. Initial program 99.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. Step-by-step derivation
      1. associate-*l/99.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)} \]
    3. Applied egg-rr99.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 5e287 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < +inf.0

    1. Initial program 30.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. Simplified43.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

Alternative 2: 62.6% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(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{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)}\\

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\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|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\right|\\


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

    1. Initial program 8.3%

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5e287

    1. Initial program 99.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. Step-by-step derivation
      1. associate-*l/99.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)} \]
    3. Applied egg-rr99.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 5e287 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 63.0% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(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 \left(t - \frac{2 \cdot {l_m}^{2}}{Om}\right)}\\

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+287}:\\
\;\;\;\;\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|\left(n \cdot \sqrt{2}\right) \cdot \left(\frac{l_m}{Om} \cdot \sqrt{U \cdot \left(U* - U\right)}\right)\right|\\


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

    1. Initial program 8.3%

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 5e287

    1. Initial program 99.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. Step-by-step derivation
      1. associate-*l/99.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)} \]
    3. Applied egg-rr99.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 5e287 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))

    1. Initial program 21.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 59.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := 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{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\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}:\\
\;\;\;\;\frac{\sqrt{U \cdot \left(U* - U\right)} \cdot \left(\sqrt{2} \cdot \left(n \cdot l_m\right)\right)}{Om}\\


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

    1. Initial program 8.3%

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

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

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

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

    1. Initial program 67.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. Step-by-step derivation
      1. associate-*l/73.3%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

Alternative 5: 49.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 51.2%

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

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

    if 1.35e42 < t

    1. Initial program 41.4%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval43.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.35 \cdot 10^{+42}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \end{array} \]

Alternative 6: 40.0% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 1.9 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;l_m \leq 1.25 \cdot 10^{+145}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\ \mathbf{elif}\;l_m \leq 1.05 \cdot 10^{+249} \lor \neg \left(l_m \leq 1.4 \cdot 10^{+272}\right):\\ \;\;\;\;\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{l_m}{\frac{Om}{n \cdot \sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \frac{l_m \cdot \left(n \cdot \left(-\sqrt{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 1.9e+31)
   (sqrt (fabs (* U (* 2.0 (* n t)))))
   (if (<= l_m 1.25e+145)
     (sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
     (if (or (<= l_m 1.05e+249) (not (<= l_m 1.4e+272)))
       (* (sqrt (* U (- U* U))) (/ l_m (/ Om (* n (sqrt 2.0)))))
       (* (sqrt (* U U*)) (/ (* l_m (* n (- (sqrt 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 <= 1.9e+31) {
		tmp = sqrt(fabs((U * (2.0 * (n * t)))));
	} else if (l_m <= 1.25e+145) {
		tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
	} else if ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272)) {
		tmp = sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * sqrt(2.0))));
	} else {
		tmp = sqrt((U * U_42_)) * ((l_m * (n * -sqrt(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 <= 1.9d+31) then
        tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
    else if (l_m <= 1.25d+145) then
        tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
    else if ((l_m <= 1.05d+249) .or. (.not. (l_m <= 1.4d+272))) then
        tmp = sqrt((u * (u_42 - u))) * (l_m / (om / (n * sqrt(2.0d0))))
    else
        tmp = sqrt((u * u_42)) * ((l_m * (n * -sqrt(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 <= 1.9e+31) {
		tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
	} else if (l_m <= 1.25e+145) {
		tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
	} else if ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272)) {
		tmp = Math.sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * Math.sqrt(2.0))));
	} else {
		tmp = Math.sqrt((U * U_42_)) * ((l_m * (n * -Math.sqrt(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 <= 1.9e+31:
		tmp = math.sqrt(math.fabs((U * (2.0 * (n * t)))))
	elif l_m <= 1.25e+145:
		tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0))))))
	elif (l_m <= 1.05e+249) or not (l_m <= 1.4e+272):
		tmp = math.sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * math.sqrt(2.0))))
	else:
		tmp = math.sqrt((U * U_42_)) * ((l_m * (n * -math.sqrt(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 <= 1.9e+31)
		tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t)))));
	elseif (l_m <= 1.25e+145)
		tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0))))));
	elseif ((l_m <= 1.05e+249) || !(l_m <= 1.4e+272))
		tmp = Float64(sqrt(Float64(U * Float64(U_42_ - U))) * Float64(l_m / Float64(Om / Float64(n * sqrt(2.0)))));
	else
		tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(Float64(l_m * Float64(n * Float64(-sqrt(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 <= 1.9e+31)
		tmp = sqrt(abs((U * (2.0 * (n * t)))));
	elseif (l_m <= 1.25e+145)
		tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0))))));
	elseif ((l_m <= 1.05e+249) || ~((l_m <= 1.4e+272)))
		tmp = sqrt((U * (U_42_ - U))) * (l_m / (Om / (n * sqrt(2.0))));
	else
		tmp = sqrt((U * U_42_)) * ((l_m * (n * -sqrt(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, 1.9e+31], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.25e+145], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 1.05e+249], N[Not[LessEqual[l$95$m, 1.4e+272]], $MachinePrecision]], N[(N[Sqrt[N[(U * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m / N[(Om / N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(N[(l$95$m * N[(n * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l_m \leq 1.25 \cdot 10^{+145}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\

\mathbf{elif}\;l_m \leq 1.05 \cdot 10^{+249} \lor \neg \left(l_m \leq 1.4 \cdot 10^{+272}\right):\\
\;\;\;\;\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{l_m}{\frac{Om}{n \cdot \sqrt{2}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 1.9000000000000001e31

    1. Initial program 53.9%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e31 < l < 1.24999999999999992e145

    1. Initial program 43.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. Simplified33.8%

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative47.9%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
    6. Simplified47.9%

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

    if 1.24999999999999992e145 < l < 1.0499999999999999e249 or 1.4e272 < l

    1. Initial program 17.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. Simplified33.3%

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

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

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

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

    if 1.0499999999999999e249 < l < 1.4e272

    1. Initial program 20.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. Simplified40.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.9 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+145}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}}\\ \mathbf{elif}\;\ell \leq 1.05 \cdot 10^{+249} \lor \neg \left(\ell \leq 1.4 \cdot 10^{+272}\right):\\ \;\;\;\;\sqrt{U \cdot \left(U* - U\right)} \cdot \frac{\ell}{\frac{Om}{n \cdot \sqrt{2}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \frac{\ell \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\ \end{array} \]

Alternative 7: 39.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
t_2 := n \cdot \sqrt{2}\\
\mathbf{if}\;l_m \leq 3.6 \cdot 10^{+28}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\

\mathbf{elif}\;l_m \leq 1.9 \cdot 10^{+131}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\

\mathbf{elif}\;l_m \leq 2.5 \cdot 10^{+248}:\\
\;\;\;\;t_1 \cdot \left(\frac{l_m}{Om} \cdot t_2\right)\\

\mathbf{elif}\;l_m \leq 1.95 \cdot 10^{+272}:\\
\;\;\;\;t_1 \cdot \left(t_2 \cdot \frac{-l_m}{Om}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{l_m \cdot t_2}{Om} \cdot t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < 3.5999999999999999e28

    1. Initial program 53.9%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5999999999999999e28 < l < 1.9000000000000002e131

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative50.4%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
    6. Simplified50.4%

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

    if 1.9000000000000002e131 < l < 2.4999999999999998e248

    1. Initial program 18.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. Simplified35.6%

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

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

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

        \[\leadsto \color{blue}{\frac{\ell}{\frac{Om}{n \cdot \sqrt{2}}}} \cdot \sqrt{U \cdot U*} \]
      2. *-commutative42.5%

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

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

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

    if 2.4999999999999998e248 < l < 1.95e272

    1. Initial program 20.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. Simplified40.0%

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{\frac{Om}{n \cdot \sqrt{2}}}} \cdot \sqrt{U \cdot U*} \]
      3. *-commutative40.5%

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

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

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

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

    if 1.95e272 < l

    1. Initial program 27.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.6 \cdot 10^{+28}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+131}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}}\\ \mathbf{elif}\;\ell \leq 2.5 \cdot 10^{+248}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \sqrt{2}\right)\right)\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+272}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\left(n \cdot \sqrt{2}\right) \cdot \frac{-\ell}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \end{array} \]

Alternative 8: 39.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{U \cdot U*}\\ t_2 := n \cdot \sqrt{2}\\ \mathbf{if}\;l_m \leq 9.2 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;l_m \leq 9.5 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\ \mathbf{elif}\;l_m \leq 1.45 \cdot 10^{+248}:\\ \;\;\;\;t_1 \cdot \left(\frac{l_m}{Om} \cdot t_2\right)\\ \mathbf{elif}\;l_m \leq 1.95 \cdot 10^{+272}:\\ \;\;\;\;t_1 \cdot \frac{l_m \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\ \mathbf{else}:\\ \;\;\;\;\frac{l_m \cdot t_2}{Om} \cdot t_1\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (sqrt (* U U*))) (t_2 (* n (sqrt 2.0))))
   (if (<= l_m 9.2e+31)
     (sqrt (fabs (* U (* 2.0 (* n t)))))
     (if (<= l_m 9.5e+129)
       (sqrt (* -4.0 (/ U (/ Om (* n (pow l_m 2.0))))))
       (if (<= l_m 1.45e+248)
         (* t_1 (* (/ l_m Om) t_2))
         (if (<= l_m 1.95e+272)
           (* t_1 (/ (* l_m (* n (- (sqrt 2.0)))) Om))
           (* (/ (* l_m t_2) Om) 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 = sqrt((U * U_42_));
	double t_2 = n * sqrt(2.0);
	double tmp;
	if (l_m <= 9.2e+31) {
		tmp = sqrt(fabs((U * (2.0 * (n * t)))));
	} else if (l_m <= 9.5e+129) {
		tmp = sqrt((-4.0 * (U / (Om / (n * pow(l_m, 2.0))))));
	} else if (l_m <= 1.45e+248) {
		tmp = t_1 * ((l_m / Om) * t_2);
	} else if (l_m <= 1.95e+272) {
		tmp = t_1 * ((l_m * (n * -sqrt(2.0))) / Om);
	} else {
		tmp = ((l_m * t_2) / Om) * 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 = sqrt((u * u_42))
    t_2 = n * sqrt(2.0d0)
    if (l_m <= 9.2d+31) then
        tmp = sqrt(abs((u * (2.0d0 * (n * t)))))
    else if (l_m <= 9.5d+129) then
        tmp = sqrt(((-4.0d0) * (u / (om / (n * (l_m ** 2.0d0))))))
    else if (l_m <= 1.45d+248) then
        tmp = t_1 * ((l_m / om) * t_2)
    else if (l_m <= 1.95d+272) then
        tmp = t_1 * ((l_m * (n * -sqrt(2.0d0))) / om)
    else
        tmp = ((l_m * t_2) / om) * 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.sqrt((U * U_42_));
	double t_2 = n * Math.sqrt(2.0);
	double tmp;
	if (l_m <= 9.2e+31) {
		tmp = Math.sqrt(Math.abs((U * (2.0 * (n * t)))));
	} else if (l_m <= 9.5e+129) {
		tmp = Math.sqrt((-4.0 * (U / (Om / (n * Math.pow(l_m, 2.0))))));
	} else if (l_m <= 1.45e+248) {
		tmp = t_1 * ((l_m / Om) * t_2);
	} else if (l_m <= 1.95e+272) {
		tmp = t_1 * ((l_m * (n * -Math.sqrt(2.0))) / Om);
	} else {
		tmp = ((l_m * t_2) / Om) * t_1;
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((U * U_42_))
	t_2 = n * math.sqrt(2.0)
	tmp = 0
	if l_m <= 9.2e+31:
		tmp = math.sqrt(math.fabs((U * (2.0 * (n * t)))))
	elif l_m <= 9.5e+129:
		tmp = math.sqrt((-4.0 * (U / (Om / (n * math.pow(l_m, 2.0))))))
	elif l_m <= 1.45e+248:
		tmp = t_1 * ((l_m / Om) * t_2)
	elif l_m <= 1.95e+272:
		tmp = t_1 * ((l_m * (n * -math.sqrt(2.0))) / Om)
	else:
		tmp = ((l_m * t_2) / Om) * t_1
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(U * U_42_))
	t_2 = Float64(n * sqrt(2.0))
	tmp = 0.0
	if (l_m <= 9.2e+31)
		tmp = sqrt(abs(Float64(U * Float64(2.0 * Float64(n * t)))));
	elseif (l_m <= 9.5e+129)
		tmp = sqrt(Float64(-4.0 * Float64(U / Float64(Om / Float64(n * (l_m ^ 2.0))))));
	elseif (l_m <= 1.45e+248)
		tmp = Float64(t_1 * Float64(Float64(l_m / Om) * t_2));
	elseif (l_m <= 1.95e+272)
		tmp = Float64(t_1 * Float64(Float64(l_m * Float64(n * Float64(-sqrt(2.0)))) / Om));
	else
		tmp = Float64(Float64(Float64(l_m * t_2) / Om) * t_1);
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt((U * U_42_));
	t_2 = n * sqrt(2.0);
	tmp = 0.0;
	if (l_m <= 9.2e+31)
		tmp = sqrt(abs((U * (2.0 * (n * t)))));
	elseif (l_m <= 9.5e+129)
		tmp = sqrt((-4.0 * (U / (Om / (n * (l_m ^ 2.0))))));
	elseif (l_m <= 1.45e+248)
		tmp = t_1 * ((l_m / Om) * t_2);
	elseif (l_m <= 1.95e+272)
		tmp = t_1 * ((l_m * (n * -sqrt(2.0))) / Om);
	else
		tmp = ((l_m * t_2) / Om) * 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[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 9.2e+31], N[Sqrt[N[Abs[N[(U * N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 9.5e+129], N[Sqrt[N[(-4.0 * N[(U / N[(Om / N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.45e+248], N[(t$95$1 * N[(N[(l$95$m / Om), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.95e+272], N[(t$95$1 * N[(N[(l$95$m * N[(n * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision], N[(N[(N[(l$95$m * t$95$2), $MachinePrecision] / Om), $MachinePrecision] * t$95$1), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := \sqrt{U \cdot U*}\\
t_2 := n \cdot \sqrt{2}\\
\mathbf{if}\;l_m \leq 9.2 \cdot 10^{+31}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\

\mathbf{elif}\;l_m \leq 9.5 \cdot 10^{+129}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\

\mathbf{elif}\;l_m \leq 1.45 \cdot 10^{+248}:\\
\;\;\;\;t_1 \cdot \left(\frac{l_m}{Om} \cdot t_2\right)\\

\mathbf{elif}\;l_m \leq 1.95 \cdot 10^{+272}:\\
\;\;\;\;t_1 \cdot \frac{l_m \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\

\mathbf{else}:\\
\;\;\;\;\frac{l_m \cdot t_2}{Om} \cdot t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if l < 9.1999999999999998e31

    1. Initial program 53.9%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999998e31 < l < 9.5000000000000004e129

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative50.4%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
    6. Simplified50.4%

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

    if 9.5000000000000004e129 < l < 1.45e248

    1. Initial program 18.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. Simplified35.6%

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

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

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

        \[\leadsto \color{blue}{\frac{\ell}{\frac{Om}{n \cdot \sqrt{2}}}} \cdot \sqrt{U \cdot U*} \]
      2. *-commutative42.5%

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

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

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

    if 1.45e248 < l < 1.95e272

    1. Initial program 20.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. Simplified40.0%

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

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

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

    if 1.95e272 < l

    1. Initial program 27.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 9.2 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 9.5 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}}\\ \mathbf{elif}\;\ell \leq 1.45 \cdot 10^{+248}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \sqrt{2}\right)\right)\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{+272}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \frac{\ell \cdot \left(n \cdot \left(-\sqrt{2}\right)\right)}{Om}\\ \mathbf{else}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \end{array} \]

Alternative 9: 39.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;l_m \leq 1.9 \cdot 10^{+131}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\

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


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

    1. Initial program 53.9%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5999999999999999e32 < l < 1.9000000000000002e131

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative50.4%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
    6. Simplified50.4%

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

    if 1.9000000000000002e131 < l

    1. Initial program 20.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. Simplified35.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.6 \cdot 10^{+32}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+131}:\\ \;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {\ell}^{2}}}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \sqrt{2}\right)\right)\\ \end{array} \]

Alternative 10: 43.0% accurate, 1.1× speedup?

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

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l_m}^{2}}{Om}\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 49.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. Simplified53.9%

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

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

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

Alternative 11: 39.6% accurate, 1.1× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{Om}{n \cdot {l_m}^{2}}}}\\


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

    1. Initial program 53.9%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.4500000000000001e32 < l

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative28.6%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
    6. Simplified28.6%

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

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

Alternative 12: 39.1% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;U \leq -1.5 \cdot 10^{-308}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -1.65000000000000003e115

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

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

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

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

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

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

    if -1.65000000000000003e115 < U < -1.4999999999999999e-308

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

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

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

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

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

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

    if -1.4999999999999999e-308 < U

    1. Initial program 47.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. Simplified51.6%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    7. Simplified44.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.65 \cdot 10^{+115}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;U \leq -1.5 \cdot 10^{-308}:\\ \;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \end{array} \]

Alternative 13: 37.1% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 61.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. Simplified65.8%

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

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

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

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

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

    if -1.12e-107 < U

    1. Initial program 43.4%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}\right)}^{1}} \]
      4. metadata-eval32.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.12 \cdot 10^{-107}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(2 \cdot \left(n \cdot t\right)\right)\right|}\\ \end{array} \]

Alternative 14: 36.4% accurate, 2.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.99999999999999987e-88

    1. Initial program 49.3%

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

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

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

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

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

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

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

    if 1.99999999999999987e-88 < t

    1. Initial program 48.4%

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

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

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

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

Alternative 15: 36.4% accurate, 2.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.6 \cdot 10^{-91}:\\
\;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.60000000000000014e-91

    1. Initial program 49.3%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Step-by-step derivation
      1. associate-*l/55.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)} \]
    3. Applied egg-rr55.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. Taylor expanded in t around inf 35.8%

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

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

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

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

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

    if 2.60000000000000014e-91 < t

    1. Initial program 48.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.6 \cdot 10^{-91}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \]

Alternative 16: 35.2% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 61.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. Simplified65.8%

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

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

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

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

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

    if -1.00000000000000004e-108 < U

    1. Initial program 43.4%

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

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

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

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

Alternative 17: 34.5% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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