Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 62.4%
Time: 32.9s
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.1% 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: 62.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\

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

\mathbf{else}:\\
\;\;\;\;e^{\log \left(\left|2 \cdot \frac{n \cdot \left(-2 \cdot \left(U \cdot {\ell}^{2}\right)\right)}{Om}\right|\right) \cdot 0.5}\\


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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    7. Applied egg-rr51.9%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    8. Step-by-step derivation
      1. distribute-lft-out51.9%

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.0000000000000001e152

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*5.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. *-commutative5.1%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(\left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}} \]
      2. pow-to-exp4.8%

        \[\leadsto \color{blue}{e^{\log \left(\left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right) \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right) \cdot 0.5}} \]
      3. +-commutative4.8%

        \[\leadsto e^{\log \left(\color{blue}{\left(\frac{{\ell}^{2}}{Om} \cdot -2 + t\right)} \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right) \cdot 0.5} \]
      4. fma-udef4.8%

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

        \[\leadsto e^{\log \color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)} \cdot 0.5} \]
    7. Applied egg-rr4.8%

      \[\leadsto \color{blue}{e^{\log \left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right) \cdot 0.5}} \]
    8. Step-by-step derivation
      1. pow14.8%

        \[\leadsto e^{\log \color{blue}{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{1}\right)} \cdot 0.5} \]
      2. metadata-eval4.8%

        \[\leadsto e^{\log \left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{\color{blue}{\left(0.5 + 0.5\right)}}\right) \cdot 0.5} \]
      3. pow-prod-up34.8%

        \[\leadsto e^{\log \color{blue}{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{0.5} \cdot {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{0.5}\right)} \cdot 0.5} \]
      4. pow-prod-down35.1%

        \[\leadsto e^{\log \color{blue}{\left({\left(\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right) \cdot \left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)\right)}^{0.5}\right)} \cdot 0.5} \]
      5. pow235.1%

        \[\leadsto e^{\log \left({\color{blue}{\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{2}\right)}}^{0.5}\right) \cdot 0.5} \]
    9. Applied egg-rr35.1%

      \[\leadsto e^{\log \color{blue}{\left({\left({\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{2}\right)}^{0.5}\right)} \cdot 0.5} \]
    10. Step-by-step derivation
      1. unpow1/235.1%

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

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

        \[\leadsto e^{\log \color{blue}{\left(\left|\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right|\right)} \cdot 0.5} \]
      4. associate-*l*35.1%

        \[\leadsto e^{\log \left(\left|\color{blue}{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}\right|\right) \cdot 0.5} \]
      5. associate-*l*39.8%

        \[\leadsto e^{\log \left(\left|2 \cdot \color{blue}{\left(n \cdot \left(U \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)\right)}\right|\right) \cdot 0.5} \]
    11. Simplified39.8%

      \[\leadsto e^{\log \color{blue}{\left(\left|2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)\right)\right|\right)} \cdot 0.5} \]
    12. Taylor expanded in l around inf 40.0%

      \[\leadsto e^{\log \left(\left|2 \cdot \color{blue}{\left(-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}\right|\right) \cdot 0.5} \]
    13. Step-by-step derivation
      1. associate-*r/40.0%

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

        \[\leadsto e^{\log \left(\left|2 \cdot \frac{-2 \cdot \color{blue}{\left(\left(U \cdot {\ell}^{2}\right) \cdot n\right)}}{Om}\right|\right) \cdot 0.5} \]
      3. associate-*r*40.0%

        \[\leadsto e^{\log \left(\left|2 \cdot \frac{\color{blue}{\left(-2 \cdot \left(U \cdot {\ell}^{2}\right)\right) \cdot n}}{Om}\right|\right) \cdot 0.5} \]
    14. Simplified40.0%

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

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

Alternative 2: 62.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\

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

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


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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    7. Applied egg-rr51.9%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    8. Step-by-step derivation
      1. distribute-lft-out51.9%

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.0000000000000001e152

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 61.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\

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

\mathbf{else}:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\frac{{\ell}^{2}}{Om}, -2, t\right)\right)}^{0.5}\\


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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    7. Applied egg-rr51.9%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    8. Step-by-step derivation
      1. distribute-lft-out51.9%

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.0000000000000001e152

    1. Initial program 98.6%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}} \]
    4. Step-by-step derivation
      1. associate-*r*5.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. *-commutative5.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 58.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+152}:\\
\;\;\;\;t\_4\\

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


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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    7. Applied egg-rr51.9%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
    8. Step-by-step derivation
      1. distribute-lft-out51.9%

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 2.0000000000000001e152

    1. Initial program 98.6%

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

    if 2.0000000000000001e152 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

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

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

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

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

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

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

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

Alternative 5: 52.7% accurate, 1.0× speedup?

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

\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 50.2%

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

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

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

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

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

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

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

Alternative 6: 53.3% accurate, 1.0× speedup?

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

\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 50.2%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
  7. Applied egg-rr48.2%

    \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \left(2 \cdot \frac{\ell}{Om}\right) \cdot \ell\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)} \]
  8. Step-by-step derivation
    1. distribute-lft-out56.0%

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

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

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

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

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

Alternative 7: 43.9% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 51.7%

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

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

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

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

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

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

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

    if 7.4999999999999993e218 < t

    1. Initial program 36.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 40.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U \leq -5000000000000:\\ \;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\ \mathbf{elif}\;U \leq 1.9 \cdot 10^{+124}:\\ \;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= U -5000000000000.0)
   (sqrt (fabs (* t (* n (* 2.0 U)))))
   (if (<= U 1.9e+124)
     (sqrt (fabs (* n (* t (* 2.0 U)))))
     (* (sqrt (* 2.0 U)) (sqrt (* n t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -5000000000000.0) {
		tmp = sqrt(fabs((t * (n * (2.0 * U)))));
	} else if (U <= 1.9e+124) {
		tmp = sqrt(fabs((n * (t * (2.0 * U)))));
	} else {
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	}
	return tmp;
}
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
    real(8) :: tmp
    if (u <= (-5000000000000.0d0)) then
        tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
    else if (u <= 1.9d+124) then
        tmp = sqrt(abs((n * (t * (2.0d0 * u)))))
    else
        tmp = sqrt((2.0d0 * u)) * sqrt((n * t))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -5000000000000.0) {
		tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
	} else if (U <= 1.9e+124) {
		tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
	} else {
		tmp = Math.sqrt((2.0 * U)) * Math.sqrt((n * t));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -5000000000000.0:
		tmp = math.sqrt(math.fabs((t * (n * (2.0 * U)))))
	elif U <= 1.9e+124:
		tmp = math.sqrt(math.fabs((n * (t * (2.0 * U)))))
	else:
		tmp = math.sqrt((2.0 * U)) * math.sqrt((n * t))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -5000000000000.0)
		tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U)))));
	elseif (U <= 1.9e+124)
		tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U)))));
	else
		tmp = Float64(sqrt(Float64(2.0 * U)) * sqrt(Float64(n * t)));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -5000000000000.0)
		tmp = sqrt(abs((t * (n * (2.0 * U)))));
	elseif (U <= 1.9e+124)
		tmp = sqrt(abs((n * (t * (2.0 * U)))));
	else
		tmp = sqrt((2.0 * U)) * sqrt((n * t));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -5000000000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.9e+124], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;U \leq 1.9 \cdot 10^{+124}:\\
\;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\

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


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

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in t around inf 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e12 < U < 1.8999999999999999e124

    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. Simplified51.9%

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(U \cdot t\right)}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt34.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/234.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/235.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-down25.6%

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

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

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

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

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

        \[\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-square31.2%

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

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

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

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

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

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

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

    if 1.8999999999999999e124 < U

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in t around inf 49.6%

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

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

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

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

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

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

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

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

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

Alternative 9: 40.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U \leq -50000000:\\ \;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\ \mathbf{elif}\;U \leq 5 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot t} \cdot \sqrt{U}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= U -50000000.0)
   (sqrt (fabs (* t (* n (* 2.0 U)))))
   (if (<= U 5e+122)
     (sqrt (fabs (* n (* t (* 2.0 U)))))
     (* (sqrt (* (* 2.0 n) t)) (sqrt U)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -50000000.0) {
		tmp = sqrt(fabs((t * (n * (2.0 * U)))));
	} else if (U <= 5e+122) {
		tmp = sqrt(fabs((n * (t * (2.0 * U)))));
	} else {
		tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
	}
	return tmp;
}
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
    real(8) :: tmp
    if (u <= (-50000000.0d0)) then
        tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
    else if (u <= 5d+122) then
        tmp = sqrt(abs((n * (t * (2.0d0 * u)))))
    else
        tmp = sqrt(((2.0d0 * n) * t)) * sqrt(u)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -50000000.0) {
		tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
	} else if (U <= 5e+122) {
		tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * t)) * Math.sqrt(U);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -50000000.0:
		tmp = math.sqrt(math.fabs((t * (n * (2.0 * U)))))
	elif U <= 5e+122:
		tmp = math.sqrt(math.fabs((n * (t * (2.0 * U)))))
	else:
		tmp = math.sqrt(((2.0 * n) * t)) * math.sqrt(U)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -50000000.0)
		tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U)))));
	elseif (U <= 5e+122)
		tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U)))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * t)) * sqrt(U));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -50000000.0)
		tmp = sqrt(abs((t * (n * (2.0 * U)))));
	elseif (U <= 5e+122)
		tmp = sqrt(abs((n * (t * (2.0 * U)))));
	else
		tmp = sqrt(((2.0 * n) * t)) * sqrt(U);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -50000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 5e+122], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{elif}\;U \leq 5 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\

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


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

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in t around inf 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5e7 < U < 4.99999999999999989e122

    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. Simplified51.9%

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(U \cdot t\right)}} \]
    7. Step-by-step derivation
      1. add-sqr-sqrt34.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/234.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/235.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-down25.6%

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

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

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

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

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

        \[\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-square31.2%

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

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

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

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

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

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

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

    if 4.99999999999999989e122 < U

    1. Initial program 58.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. Add Preprocessing
    3. Taylor expanded in t around inf 49.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 38.5% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 49.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999993e79 < t

    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 38.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U \leq -10000000000:\\ \;\;\;\;\sqrt{\left|t \cdot \left(n \cdot \left(2 \cdot U\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|n \cdot \left(t \cdot \left(2 \cdot U\right)\right)\right|}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= U -10000000000.0)
   (sqrt (fabs (* t (* n (* 2.0 U)))))
   (sqrt (fabs (* n (* t (* 2.0 U)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -10000000000.0) {
		tmp = sqrt(fabs((t * (n * (2.0 * U)))));
	} else {
		tmp = sqrt(fabs((n * (t * (2.0 * U)))));
	}
	return tmp;
}
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
    real(8) :: tmp
    if (u <= (-10000000000.0d0)) then
        tmp = sqrt(abs((t * (n * (2.0d0 * u)))))
    else
        tmp = sqrt(abs((n * (t * (2.0d0 * u)))))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U <= -10000000000.0) {
		tmp = Math.sqrt(Math.abs((t * (n * (2.0 * U)))));
	} else {
		tmp = Math.sqrt(Math.abs((n * (t * (2.0 * U)))));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U <= -10000000000.0:
		tmp = math.sqrt(math.fabs((t * (n * (2.0 * U)))))
	else:
		tmp = math.sqrt(math.fabs((n * (t * (2.0 * U)))))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U <= -10000000000.0)
		tmp = sqrt(abs(Float64(t * Float64(n * Float64(2.0 * U)))));
	else
		tmp = sqrt(abs(Float64(n * Float64(t * Float64(2.0 * U)))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U <= -10000000000.0)
		tmp = sqrt(abs((t * (n * (2.0 * U)))));
	else
		tmp = sqrt(abs((n * (t * (2.0 * U)))));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U, -10000000000.0], N[Sqrt[N[Abs[N[(t * N[(n * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Sqrt[N[Abs[N[(n * N[(t * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 65.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. Add Preprocessing
    3. Taylor expanded in t around inf 38.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e10 < U

    1. Initial program 47.1%

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

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

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

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

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

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

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

        \[\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/235.7%

        \[\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/236.8%

        \[\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-down26.5%

        \[\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. pow226.5%

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

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

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

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

        \[\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.2%

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

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

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

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

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

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

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

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

Alternative 12: 37.8% accurate, 1.1× speedup?

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

\\
\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}
\end{array}
Derivation
  1. Initial program 50.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. Add Preprocessing
  3. Taylor expanded in t around inf 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 37.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{+84}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -4.8e+84)
   (sqrt (* 2.0 (* U (* n t))))
   (pow (* t (* 2.0 (* n U))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.8e+84) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = pow((t * (2.0 * (n * U))), 0.5);
	}
	return tmp;
}
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
    real(8) :: tmp
    if (t <= (-4.8d+84)) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.8e+84) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -4.8e+84:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.pow((t * (2.0 * (n * U))), 0.5)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -4.8e+84)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5;
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -4.8e+84)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = (t * (2.0 * (n * U))) ^ 0.5;
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4.8e+84], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 49.4%

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

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

    if -4.7999999999999999e84 < t

    1. Initial program 50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 37.0% accurate, 2.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.35 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= Om -1.35e+79)
   (sqrt (* (* 2.0 n) (* U t)))
   (pow (* (* n t) (* 2.0 U)) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.35e+79) {
		tmp = sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = pow(((n * t) * (2.0 * U)), 0.5);
	}
	return tmp;
}
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
    real(8) :: tmp
    if (om <= (-1.35d+79)) then
        tmp = sqrt(((2.0d0 * n) * (u * t)))
    else
        tmp = ((n * t) * (2.0d0 * u)) ** 0.5d0
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (Om <= -1.35e+79) {
		tmp = Math.sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = Math.pow(((n * t) * (2.0 * U)), 0.5);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if Om <= -1.35e+79:
		tmp = math.sqrt(((2.0 * n) * (U * t)))
	else:
		tmp = math.pow(((n * t) * (2.0 * U)), 0.5)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (Om <= -1.35e+79)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t)));
	else
		tmp = Float64(Float64(n * t) * Float64(2.0 * U)) ^ 0.5;
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (Om <= -1.35e+79)
		tmp = sqrt(((2.0 * n) * (U * t)));
	else
		tmp = ((n * t) * (2.0 * U)) ^ 0.5;
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[Om, -1.35e+79], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.35e79

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

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

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

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

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

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

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

    if -1.35e79 < Om

    1. Initial program 47.4%

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

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

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

        \[\leadsto {\color{blue}{\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}}^{0.5} \]
    5. Applied egg-rr33.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 simplification38.1%

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

Alternative 15: 35.2% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 56.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. Simplified57.4%

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

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

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

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

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

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

    if 9.99999999999999965e-106 < l

    1. Initial program 36.8%

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

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

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

Alternative 16: 35.1% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Add Preprocessing
  3. Taylor expanded in t around inf 35.4%

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

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

Reproduce

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