Toniolo and Linder, Equation (13)

Percentage Accurate: 50.3% → 64.9%
Time: 25.0s
Alternatives: 19
Speedup: 0.4×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 50.3% accurate, 1.0× speedup?

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

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

Alternative 1: 64.9% accurate, 0.4× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

    if 9.99999999999999985e-266 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 9.9999999999999994e304

    1. Initial program 98.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. Simplified98.2%

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

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

    1. Initial program 16.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. Simplified27.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 64.9% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 25.0%

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e-133 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.0000000000000002e152

    1. Initial program 98.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. Simplified98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 25.0%

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

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

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

    if 4.9999999999999999e-133 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 4.0000000000000002e152

    1. Initial program 98.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. Simplified98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 25.0%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 25.0%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 48.8% accurate, 1.0× speedup?

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

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

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

\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 < -4.4000000000000002e-46

    1. Initial program 64.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. Simplified69.3%

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

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

    if -4.4000000000000002e-46 < U < 2.95000000000000016e122

    1. Initial program 43.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. Simplified52.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.95000000000000016e122 < U

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot U}} \cdot \sqrt{n \cdot t} \]
    8. Simplified62.2%

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

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

Alternative 7: 45.9% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.35999999999999994e181

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.35999999999999994e181 < t < 1.8000000000000001e129

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

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

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

    if 1.8000000000000001e129 < t

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(2 \cdot U\right) \cdot n\right) \cdot t\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. unpow-prod-down62.2%

        \[\leadsto \color{blue}{{\left(\left(2 \cdot U\right) \cdot n\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. metadata-eval62.2%

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot n\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. metadata-eval62.2%

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

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

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

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

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

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

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

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

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

Alternative 8: 46.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.9999999999999996e180

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999996e180 < t < 2.35000000000000004e129

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

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

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

    if 2.35000000000000004e129 < t

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(2 \cdot U\right) \cdot n\right) \cdot t\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. unpow-prod-down62.2%

        \[\leadsto \color{blue}{{\left(\left(2 \cdot U\right) \cdot n\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. metadata-eval62.2%

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot n\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. metadata-eval62.2%

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

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

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

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

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

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

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

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

Alternative 9: 40.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.8499999999999999e-300

    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. Simplified52.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.8499999999999999e-300 < t < 2.65000000000000008e-163

    1. Initial program 36.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. Simplified41.2%

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

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

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

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

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

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

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

    if 2.65000000000000008e-163 < t

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(2 \cdot U\right) \cdot n\right) \cdot t\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. unpow-prod-down55.1%

        \[\leadsto \color{blue}{{\left(\left(2 \cdot U\right) \cdot n\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. metadata-eval55.1%

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot n\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. metadata-eval55.1%

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

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

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

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

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

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

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

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

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

Alternative 10: 40.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.20000000000000021e-300

    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. Simplified52.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000021e-300 < t < 1.67999999999999996e-164

    1. Initial program 36.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. Simplified41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.67999999999999996e-164 < t

    1. Initial program 55.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(2 \cdot U\right) \cdot n\right) \cdot t\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. unpow-prod-down55.1%

        \[\leadsto \color{blue}{{\left(\left(2 \cdot U\right) \cdot n\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. metadata-eval55.1%

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot n\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. metadata-eval55.1%

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

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

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

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

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

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

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

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

Alternative 11: 39.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 7.19999999999999993e40

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.19999999999999993e40 < n

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 40.9% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.59999999999999983e-274 < t

    1. Initial program 53.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto {\color{blue}{\left(\left(\left(2 \cdot U\right) \cdot n\right) \cdot t\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. unpow-prod-down50.6%

        \[\leadsto \color{blue}{{\left(\left(2 \cdot U\right) \cdot n\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. metadata-eval50.6%

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot n\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. metadata-eval50.6%

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

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

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

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

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

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

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

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

Alternative 13: 38.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 3.40000000000000016e-217

    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000016e-217 < n

    1. Initial program 55.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(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 33.1%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(\color{blue}{1.5 \cdot 0.3333333333333333} + 0.5\right)}} \]
      6. metadata-eval33.1%

        \[\leadsto \sqrt{{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333 + \color{blue}{1.5 \cdot 0.3333333333333333}\right)}} \]
      7. pow-prod-up34.1%

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}} \]
      8. pow-prod-down17.5%

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

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

        \[\leadsto \sqrt{{\left({\color{blue}{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      11. metadata-eval17.5%

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

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

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

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

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

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

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

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

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

Alternative 14: 37.5% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 42.8%

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

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

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

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

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

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

    if -3e-284 < n

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(\color{blue}{1.5 \cdot 0.3333333333333333} + 0.5\right)}} \]
      6. metadata-eval38.6%

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

        \[\leadsto \sqrt{\color{blue}{{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}}} \]
      8. pow-prod-down20.2%

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

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

        \[\leadsto \sqrt{{\left({\color{blue}{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      11. metadata-eval20.2%

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

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

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

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

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

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

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

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

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

Alternative 15: 38.2% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 2.9999999999999999e29

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

    if 2.9999999999999999e29 < n

    1. Initial program 56.6%

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

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

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

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

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

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

Alternative 16: 37.9% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.2999999999999999e-225

    1. Initial program 59.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. Simplified58.0%

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

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

    if 2.2999999999999999e-225 < l

    1. Initial program 37.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. Simplified44.8%

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

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

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

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

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

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

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

Alternative 17: 35.3% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -4.7999999999999997e-288

    1. Initial program 42.8%

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

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

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

    if -4.7999999999999997e-288 < n

    1. Initial program 57.1%

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

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

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

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

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

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

Alternative 18: 36.2% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 8.00000000000000066e-217

    1. Initial program 46.4%

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

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

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

    if 8.00000000000000066e-217 < n

    1. Initial program 55.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(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in t around inf 33.1%

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

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

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

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

Alternative 19: 36.1% 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.8%

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

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

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

Reproduce

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