Toniolo and Linder, Equation (13)

Percentage Accurate: 50.2% → 60.2%
Time: 26.5s
Alternatives: 16
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 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.2% 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: 60.2% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 0.01:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om} - 2 \cdot {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{\frac{-2 \cdot \frac{U}{n} - \frac{U \cdot \left(U - U*\right)}{Om}}{Om}} \cdot \left(l\_m \cdot \left(\sqrt{2} \cdot \left(-n\right)\right)\right)\\


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

    1. Initial program 61.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. Simplified71.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 U around 0 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \color{blue}{\left(t - \frac{-1 \cdot \frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{Om} - -2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      3. cancel-sign-sub-inv74.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} + \left(--2\right) \cdot {\ell}^{2}}}{Om}\right)\right)} \]
      4. metadata-eval74.0%

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

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

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

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

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

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

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

    if 0.0100000000000000002 < (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 68.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. Simplified73.7%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot \left(U \cdot t\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{\frac{-2 \cdot \frac{U}{n} - \frac{U \cdot \left(U - U*\right)}{Om}}{Om}} \cdot \left(l\_m \cdot \left(\sqrt{2} \cdot \left(-n\right)\right)\right)\\


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 75.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. Simplified78.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 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 44.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 2.4 \cdot 10^{-305}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;n \leq 2.8 \cdot 10^{+137}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -9.4999999999999998e-51 or 2.80000000000000001e137 < n

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square37.5%

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

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

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

    if -9.4999999999999998e-51 < n < 2.40000000000000019e-305 or 3.3999999999999999e-186 < n < 2.80000000000000001e137

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

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

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

    if 2.40000000000000019e-305 < n < 3.3999999999999999e-186

    1. Initial program 32.5%

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

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

        \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}} \]
    6. Applied egg-rr63.7%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}} \]
    7. Step-by-step derivation
      1. *-commutative63.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -9.5 \cdot 10^{-51}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \mathbf{elif}\;n \leq 2.4 \cdot 10^{-305}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;n \leq 3.4 \cdot 10^{-186}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;n \leq 2.8 \cdot 10^{+137}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.5% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6000000000000002e134

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000002e134 < t

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 46.2% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 68.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. Simplified64.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 t around inf 45.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square55.6%

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

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

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

    if -102 < U < 1.30000000000000008e118

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

      \[\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.30000000000000008e118 < U

    1. Initial program 74.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. Simplified55.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 U around 0 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 38.4% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

    if -2.75e-136 < t < 1.44999999999999996e-292

    1. Initial program 44.9%

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

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

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

    if 1.44999999999999996e-292 < t

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square39.4%

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

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

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

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

Alternative 7: 38.4% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

    if -2.69999999999999999e-135 < t < 2.6999999999999999e-292

    1. Initial program 44.9%

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

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

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

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

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

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

    if 2.6999999999999999e-292 < t

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square39.4%

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

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

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

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

Alternative 8: 44.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.90000000000000034e72

    1. Initial program 54.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.90000000000000034e72 < t

    1. Initial program 53.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. 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 U around 0 44.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 40.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq -8.5 \cdot 10^{-71} \lor \neg \left(U \leq 1.45 \cdot 10^{+118}\right):\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -8.49999999999999988e-71 or 1.45000000000000008e118 < U

    1. Initial program 68.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. Simplified60.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 t around inf 40.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square50.4%

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

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

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

    if -8.49999999999999988e-71 < U < 1.45000000000000008e118

    1. Initial program 44.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. Simplified54.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 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -8.5 \cdot 10^{-71} \lor \neg \left(U \leq 1.45 \cdot 10^{+118}\right):\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right|}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq -3.9 \cdot 10^{-177} \lor \neg \left(U \leq 1.6 \cdot 10^{-95}\right):\\
\;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -3.90000000000000014e-177 or 1.5999999999999999e-95 < U

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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)}}} \]
      6. rem-sqrt-square45.5%

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

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

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

    if -3.90000000000000014e-177 < U < 1.5999999999999999e-95

    1. Initial program 30.5%

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

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

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

Alternative 11: 39.3% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 55.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. Simplified58.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 Om around inf 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.79999999999999972e193 < l

    1. Initial program 25.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. Simplified30.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 U* around inf 39.3%

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

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

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

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

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

Alternative 12: 39.3% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -3.5e-164 or 1.9999999999999999e-47 < U

    1. Initial program 67.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. Simplified62.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 Om around inf 49.4%

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

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

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

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

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

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

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

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

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

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

    if -3.5e-164 < U < 1.9999999999999999e-47

    1. Initial program 33.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. Simplified47.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 32.7%

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

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

Alternative 13: 37.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq -2 \cdot 10^{+17} \lor \neg \left(U \leq 1.32 \cdot 10^{+118}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < -2e17 or 1.3199999999999999e118 < U

    1. Initial program 70.1%

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

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

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

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

    if -2e17 < U < 1.3199999999999999e118

    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. Simplified54.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 t around inf 34.7%

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

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

Alternative 14: 38.4% accurate, 2.0× speedup?

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

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

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


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

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

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

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

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

    if 5.99999999999999981e-125 < l

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

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

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

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

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

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

Alternative 15: 36.5% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-47}:\\ \;\;\;\;\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 (<= t -5e-47) (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 (t <= -5e-47) {
		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 (t <= (-5d-47)) 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 (t <= -5e-47) {
		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 t <= -5e-47:
		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 (t <= -5e-47)
		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 (t <= -5e-47)
		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[t, -5e-47], 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}\;t \leq -5 \cdot 10^{-47}:\\
\;\;\;\;\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 t < -5.00000000000000011e-47

    1. Initial program 54.9%

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

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

    if -5.00000000000000011e-47 < t

    1. Initial program 52.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. Simplified55.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 29.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-47}:\\ \;\;\;\;\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 16: 36.0% 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 53.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. Simplified56.6%

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

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

Reproduce

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