Toniolo and Linder, Equation (13)

Percentage Accurate: 49.9% → 63.0%
Time: 24.0s
Alternatives: 16
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 16 alternatives:

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

Initial Program: 49.9% 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: 63.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot t_1\right) + t_2\right)}\\

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


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

    1. Initial program 5.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/8.5%

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

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

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

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

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

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

    1. Initial program 72.4%

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 49.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \ell \cdot \frac{\ell}{Om}\\ t_2 := 2 \cdot \left(n \cdot U\right)\\ t_3 := \frac{U* - U}{Om}\\ \mathbf{if}\;\ell \leq 9.5 \cdot 10^{-28}:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left(t_1 \cdot t_3\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.4 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(-2, t_1, t\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_2 \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om} \cdot t_3 - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* l (/ l Om))) (t_2 (* 2.0 (* n U))) (t_3 (/ (- U* U) Om)))
   (if (<= l 9.5e-28)
     (sqrt (* t_2 (+ (+ t (* (/ (* l l) Om) -2.0)) (* n (* t_1 t_3)))))
     (if (<= l 7.4e+18)
       (sqrt
        (*
         (* 2.0 n)
         (* U (+ (* (/ n Om) (/ (* (* l l) U*) Om)) (fma -2.0 t_1 t)))))
       (sqrt (* t_2 (+ t (* (* l l) (- (* (/ n Om) t_3) (/ 2.0 Om))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = l * (l / Om);
	double t_2 = 2.0 * (n * U);
	double t_3 = (U_42_ - U) / Om;
	double tmp;
	if (l <= 9.5e-28) {
		tmp = sqrt((t_2 * ((t + (((l * l) / Om) * -2.0)) + (n * (t_1 * t_3)))));
	} else if (l <= 7.4e+18) {
		tmp = sqrt(((2.0 * n) * (U * (((n / Om) * (((l * l) * U_42_) / Om)) + fma(-2.0, t_1, t)))));
	} else {
		tmp = sqrt((t_2 * (t + ((l * l) * (((n / Om) * t_3) - (2.0 / Om))))));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l * Float64(l / Om))
	t_2 = Float64(2.0 * Float64(n * U))
	t_3 = Float64(Float64(U_42_ - U) / Om)
	tmp = 0.0
	if (l <= 9.5e-28)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64(t_1 * t_3)))));
	elseif (l <= 7.4e+18)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(Float64(n / Om) * Float64(Float64(Float64(l * l) * U_42_) / Om)) + fma(-2.0, t_1, t)))));
	else
		tmp = sqrt(Float64(t_2 * Float64(t + Float64(Float64(l * l) * Float64(Float64(Float64(n / Om) * t_3) - Float64(2.0 / Om))))));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]}, If[LessEqual[l, 9.5e-28], N[Sqrt[N[(t$95$2 * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.4e+18], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * t$95$1 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$2 * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * t$95$3), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;\ell \leq 7.4 \cdot 10^{+18}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(-2, t_1, t\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 9.50000000000000001e-28

    1. Initial program 60.2%

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

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

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

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

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

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

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

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

    if 9.50000000000000001e-28 < l < 7.4e18

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.4e18 < l

    1. Initial program 41.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 52.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 2 \cdot \left(n \cdot U\right)\\ \mathbf{if}\;\ell \leq 3.9 \cdot 10^{-28}:\\ \;\;\;\;\sqrt{t_1 \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.5 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_1 \cdot \left(t + \left(\ell \cdot \ell\right) \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* 2.0 (* n U))))
   (if (<= l 3.9e-28)
     (sqrt
      (*
       t_1
       (+
        (+ t (* (/ (* l l) Om) -2.0))
        (* n (* (pow (/ l Om) 2.0) (- U* U))))))
     (if (<= l 3.5e+18)
       (sqrt
        (*
         (* 2.0 n)
         (*
          U
          (+ (* (/ n Om) (/ (* (* l l) U*) Om)) (fma -2.0 (* l (/ l Om)) t)))))
       (sqrt
        (*
         t_1
         (+ t (* (* l l) (- (* (/ n Om) (/ (- U* U) Om)) (/ 2.0 Om))))))))))
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 (l <= 3.9e-28) {
		tmp = sqrt((t_1 * ((t + (((l * l) / Om) * -2.0)) + (n * (pow((l / Om), 2.0) * (U_42_ - U))))));
	} else if (l <= 3.5e+18) {
		tmp = sqrt(((2.0 * n) * (U * (((n / Om) * (((l * l) * U_42_) / Om)) + fma(-2.0, (l * (l / Om)), t)))));
	} else {
		tmp = sqrt((t_1 * (t + ((l * l) * (((n / Om) * ((U_42_ - U) / Om)) - (2.0 / Om))))));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(2.0 * Float64(n * U))
	tmp = 0.0
	if (l <= 3.9e-28)
		tmp = sqrt(Float64(t_1 * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(n * Float64((Float64(l / Om) ^ 2.0) * Float64(U_42_ - U))))));
	elseif (l <= 3.5e+18)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(Float64(n / Om) * Float64(Float64(Float64(l * l) * U_42_) / Om)) + fma(-2.0, Float64(l * Float64(l / Om)), t)))));
	else
		tmp = sqrt(Float64(t_1 * Float64(t + Float64(Float64(l * l) * Float64(Float64(Float64(n / Om) * Float64(Float64(U_42_ - U) / Om)) - Float64(2.0 / Om))))));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, 3.9e-28], N[Sqrt[N[(t$95$1 * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 3.5e+18], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(N[(l * l), $MachinePrecision] * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(t$95$1 * N[(t + N[(N[(l * l), $MachinePrecision] * N[(N[(N[(n / Om), $MachinePrecision] * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;\ell \leq 3.5 \cdot 10^{+18}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot U*}{Om} + \mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 3.89999999999999999e-28

    1. Initial program 60.2%

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

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

    if 3.89999999999999999e-28 < l < 3.5e18

    1. Initial program 40.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5e18 < l

    1. Initial program 41.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 50.8% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U* \leq -2 \cdot 10^{-107} \lor \neg \left(U* \leq 2.45 \cdot 10^{+51}\right):\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{\frac{n}{Om}}{Om} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= U* -2e-107) (not (<= U* 2.45e+51)))
   (sqrt (* (* 2.0 (* n U)) (+ t (* l (* l (* (/ (/ n Om) Om) (- U* U)))))))
   (sqrt (* 2.0 (* n (* U (+ t (* (* l (/ l Om)) -2.0))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((U_42_ <= -2e-107) || !(U_42_ <= 2.45e+51)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) / Om) * (U_42_ - U)))))));
	} else {
		tmp = sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	}
	return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if ((u_42 <= (-2d-107)) .or. (.not. (u_42 <= 2.45d+51))) then
        tmp = sqrt(((2.0d0 * (n * u)) * (t + (l * (l * (((n / om) / om) * (u_42 - u)))))))
    else
        tmp = sqrt((2.0d0 * (n * (u * (t + ((l * (l / om)) * (-2.0d0)))))))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((U_42_ <= -2e-107) || !(U_42_ <= 2.45e+51)) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) / Om) * (U_42_ - U)))))));
	} else {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (U_42_ <= -2e-107) or not (U_42_ <= 2.45e+51):
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) / Om) * (U_42_ - U)))))))
	else:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((U_42_ <= -2e-107) || !(U_42_ <= 2.45e+51))
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(l * Float64(l * Float64(Float64(Float64(n / Om) / Om) * Float64(U_42_ - U)))))));
	else
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((U_42_ <= -2e-107) || ~((U_42_ <= 2.45e+51)))
		tmp = sqrt(((2.0 * (n * U)) * (t + (l * (l * (((n / Om) / Om) * (U_42_ - U)))))));
	else
		tmp = sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[U$42$, -2e-107], N[Not[LessEqual[U$42$, 2.45e+51]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(l * N[(l * N[(N[(N[(n / Om), $MachinePrecision] / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -2 \cdot 10^{-107} \lor \neg \left(U* \leq 2.45 \cdot 10^{+51}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \ell \cdot \left(\ell \cdot \left(\frac{\frac{n}{Om}}{Om} \cdot \left(U* - U\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -2e-107 or 2.44999999999999992e51 < U*

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-107 < U* < 2.44999999999999992e51

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 49.4% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U* \leq -2.6 \cdot 10^{-106} \lor \neg \left(U* \leq 10^{+50}\right):\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{n}{\frac{\frac{Om}{\frac{U*}{Om}}}{\ell \cdot \ell}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= U* -2.6e-106) (not (<= U* 1e+50)))
   (sqrt (* (* 2.0 (* n U)) (+ t (/ n (/ (/ Om (/ U* Om)) (* l l))))))
   (sqrt (* 2.0 (* n (* U (+ t (* (* l (/ l Om)) -2.0))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((U_42_ <= -2.6e-106) || !(U_42_ <= 1e+50)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (n / ((Om / (U_42_ / Om)) / (l * l))))));
	} else {
		tmp = sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	}
	return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if ((u_42 <= (-2.6d-106)) .or. (.not. (u_42 <= 1d+50))) then
        tmp = sqrt(((2.0d0 * (n * u)) * (t + (n / ((om / (u_42 / om)) / (l * l))))))
    else
        tmp = sqrt((2.0d0 * (n * (u * (t + ((l * (l / om)) * (-2.0d0)))))))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((U_42_ <= -2.6e-106) || !(U_42_ <= 1e+50)) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (n / ((Om / (U_42_ / Om)) / (l * l))))));
	} else {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (U_42_ <= -2.6e-106) or not (U_42_ <= 1e+50):
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (n / ((Om / (U_42_ / Om)) / (l * l))))))
	else:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((U_42_ <= -2.6e-106) || !(U_42_ <= 1e+50))
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(n / Float64(Float64(Om / Float64(U_42_ / Om)) / Float64(l * l))))));
	else
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64(l * Float64(l / Om)) * -2.0))))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((U_42_ <= -2.6e-106) || ~((U_42_ <= 1e+50)))
		tmp = sqrt(((2.0 * (n * U)) * (t + (n / ((Om / (U_42_ / Om)) / (l * l))))));
	else
		tmp = sqrt((2.0 * (n * (U * (t + ((l * (l / Om)) * -2.0))))));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[U$42$, -2.6e-106], N[Not[LessEqual[U$42$, 1e+50]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(n / N[(N[(Om / N[(U$42$ / Om), $MachinePrecision]), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -2.6 \cdot 10^{-106} \lor \neg \left(U* \leq 10^{+50}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{n}{\frac{\frac{Om}{\frac{U*}{Om}}}{\ell \cdot \ell}}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -2.6000000000000001e-106 or 1.0000000000000001e50 < U*

    1. Initial program 53.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6000000000000001e-106 < U* < 1.0000000000000001e50

    1. Initial program 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 42.0% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.09999999999999995e-29

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 1.09999999999999995e-29 < l < 1.5e172

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e172 < l

    1. Initial program 9.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/13.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-rr13.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. Taylor expanded in U* around inf 31.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 42.3% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 9.49999999999999939e-30

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 9.49999999999999939e-30 < l < 1.5e172

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e172 < l

    1. Initial program 9.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/13.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-rr13.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. Taylor expanded in U* around inf 26.8%

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

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

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

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

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

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

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

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

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

Alternative 8: 42.2% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 7.8000000000000007e-30

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 7.8000000000000007e-30 < l < 1.5e172

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e172 < l

    1. Initial program 9.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/13.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-rr13.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. Taylor expanded in U* around inf 31.5%

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

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

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

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

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

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

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

Alternative 9: 42.2% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+172}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\ell \cdot \frac{\ell}{Om}\right) \cdot -2\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{t_1 \cdot \frac{U* \cdot \frac{n}{\frac{Om}{\ell \cdot \ell}}}{Om}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 8.2000000000000007e-30

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 8.2000000000000007e-30 < l < 1.5e172

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e172 < l

    1. Initial program 9.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/13.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-rr13.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. Taylor expanded in U* around inf 31.5%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 40.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 1.17999999999999996e-29 < l

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

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

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

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

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

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

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

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

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

Alternative 11: 42.2% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 60.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/61.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-rr61.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. Taylor expanded in t around inf 43.6%

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

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

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

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

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

    if 1.35000000000000011e-29 < l

    1. Initial program 41.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/43.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 38.5% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 60.0%

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

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

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

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

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

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

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

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

    if 3.4999999999999997e107 < l

    1. Initial program 25.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. Simplified32.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 36.9% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq -2.8 \cdot 10^{-144}:\\ \;\;\;\;{\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 (<= n -2.8e-144)
   (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 (n <= -2.8e-144) {
		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 (n <= (-2.8d-144)) 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 (n <= -2.8e-144) {
		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 n <= -2.8e-144:
		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 (n <= -2.8e-144)
		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 (n <= -2.8e-144)
		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[n, -2.8e-144], 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}\;n \leq -2.8 \cdot 10^{-144}:\\
\;\;\;\;{\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 n < -2.79999999999999998e-144

    1. Initial program 54.0%

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

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

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

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

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

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

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

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

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

    if -2.79999999999999998e-144 < n

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -2.8 \cdot 10^{-144}:\\ \;\;\;\;{\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 14: 36.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq -1.95 \cdot 10^{-143}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n -1.95e-143)
   (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 (n <= -1.95e-143) {
		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 (n <= (-1.95d-143)) 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 (n <= -1.95e-143) {
		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 n <= -1.95e-143:
		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 (n <= -1.95e-143)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t)));
	else
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= -1.95e-143)
		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[n, -1.95e-143], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 54.0%

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

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

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

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

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

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

    if -1.95000000000000002e-143 < n

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.3% accurate, 2.1× speedup?

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

\\
{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 54.4%

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

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

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

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

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

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

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

Alternative 16: 36.5% 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 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

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