Toniolo and Linder, Equation (13)

Percentage Accurate: 49.2% → 61.9%
Time: 23.5s
Alternatives: 11
Speedup: 1.8×

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 11 alternatives:

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

Initial Program: 49.2% accurate, 1.0× speedup?

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

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

Alternative 1: 61.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_3 \leq \infty:\\
\;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(U* - U\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{2}{Om} + \frac{n}{\frac{{Om}^{2}}{U - U*}}\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 7.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. Step-by-step derivation
      1. associate-*l/7.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \left(\frac{{\ell}^{2}}{Om} \cdot -2 - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\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*))))) < +inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right) - \left(\frac{\ell}{Om} \cdot \color{blue}{\frac{n}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\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. Taylor expanded in l around inf 38.7%

      \[\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)}} \]
    3. Step-by-step derivation
      1. associate-*r*38.7%

        \[\leadsto \sqrt{\color{blue}{\left(-2 \cdot U\right) \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)}} \]
      2. associate-*r/38.7%

        \[\leadsto \sqrt{\left(-2 \cdot U\right) \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)} \]
      3. metadata-eval38.7%

        \[\leadsto \sqrt{\left(-2 \cdot U\right) \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)} \]
      4. associate-/l*38.7%

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

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

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

Alternative 2: 60.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(U* - U\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(U \cdot -2\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{2}{Om} + \frac{n}{\frac{{Om}^{2}}{U - U*}}\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 7.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. Simplified26.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]

    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*))))) < +inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right) - \left(\frac{\ell}{Om} \cdot \color{blue}{\frac{n}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\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. Taylor expanded in l around inf 38.7%

      \[\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)}} \]
    3. Step-by-step derivation
      1. associate-*r*38.7%

        \[\leadsto \sqrt{\color{blue}{\left(-2 \cdot U\right) \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)}} \]
      2. associate-*r/38.7%

        \[\leadsto \sqrt{\left(-2 \cdot U\right) \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)} \]
      3. metadata-eval38.7%

        \[\leadsto \sqrt{\left(-2 \cdot U\right) \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)} \]
      4. associate-/l*38.7%

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

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

Alternative 3: 61.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\sqrt{t_1 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(U* - U\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\

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


\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 7.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. Simplified26.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]

    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*))))) < +inf.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\frac{\ell}{Om} \cdot \ell\right)\right) - \left(\frac{\ell}{Om} \cdot \color{blue}{\frac{n}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\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. Taylor expanded in Om around inf 4.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 56.7% accurate, 0.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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 7.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. Simplified26.9%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]

    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*)))))

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 54.2% accurate, 1.8× speedup?

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

\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(U* - U\right) \cdot \left(\frac{\ell}{Om} \cdot \left(n \cdot \frac{\ell}{Om}\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Step-by-step derivation
    1. associate-*l/53.0%

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 54.2% accurate, 1.8× speedup?

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

\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(U* - U\right) \cdot \left(\frac{\ell}{Om} \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Step-by-step derivation
    1. associate-*l/53.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 35.9% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 46.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. Simplified45.9%

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

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

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

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

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

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

    if 1.39999999999999993e-167 < t

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

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

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

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

Alternative 8: 36.5% accurate, 2.1× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if 5e103 < t

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

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

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

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

Alternative 9: 36.5% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000025e116 < t

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

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

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

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

Alternative 10: 35.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 6 \cdot 10^{-180}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\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 (<= t 6e-180) (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 (t <= 6e-180) {
		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 (t <= 6d-180) 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 (t <= 6e-180) {
		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 t <= 6e-180:
		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 (t <= 6e-180)
		tmp = sqrt(Float64(2.0 * Float64(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 (t <= 6e-180)
		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[t, 6e-180], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $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}\;t \leq 6 \cdot 10^{-180}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\

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


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

    1. Initial program 46.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. Simplified45.9%

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

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

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

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

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

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

    if 6.0000000000000001e-180 < t

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

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

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

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

Alternative 11: 35.3% 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.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. Simplified49.9%

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

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

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

Reproduce

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