Toniolo and Linder, Equation (13)

Percentage Accurate: 50.2% → 63.2%
Time: 34.0s
Alternatives: 15
Speedup: 1.9×

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

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

Initial Program: 50.2% accurate, 1.0× speedup?

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

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

Alternative 1: 63.2% accurate, 0.4× speedup?

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

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

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

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


\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*)))) < 4.94066e-324

    1. Initial program 10.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. Simplified10.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 n around 0 39.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.94066e-324 < (*.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 64.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. Simplified66.5%

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

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. associate-*l*66.4%

        \[\leadsto {\color{blue}{\left(2 \cdot \left(\left(n \cdot U\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)\right)\right)}}^{0.5} \]
      3. unpow-prod-down67.3%

        \[\leadsto \color{blue}{{2}^{0.5} \cdot {\left(\left(n \cdot U\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)\right)}^{0.5}} \]
      4. pow1/267.3%

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

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      6. associate-*r*70.7%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      7. *-commutative70.7%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      8. *-commutative70.7%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
    4. Applied egg-rr70.7%

      \[\leadsto \color{blue}{\sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Step-by-step derivation
      1. unpow1/270.7%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\left(n \cdot U\right) \cdot \left(t - \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)}} \]
    7. Step-by-step derivation
      1. fma-udef70.7%

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

      \[\leadsto \sqrt{2} \cdot \sqrt{\left(n \cdot U\right) \cdot \left(t - \color{blue}{\left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) + \left(U - U*\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\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. Simplified3.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. Step-by-step derivation
      1. pow1/23.0%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef3.0%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv0.0%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in n around 0 36.6%

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

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

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

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

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

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

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

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

    \[\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 5 \cdot 10^{-324}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(-2, \frac{n \cdot n}{\frac{\frac{Om}{\ell}}{\ell} \cdot \frac{Om}{U \cdot \left(U - U*\right)}}, \left(2 \cdot n\right) \cdot \left(U \cdot \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\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{2} \cdot \sqrt{\left(n \cdot U\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}^{0.5}\\ \end{array} \]

Alternative 2: 61.8% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\frac{Om}{\ell}}{\ell}\\
t_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)}\\
\mathbf{if}\;t_2 \leq 4 \cdot 10^{-101}:\\
\;\;\;\;\sqrt{\mathsf{fma}\left(2, U \cdot \left(n \cdot t\right), \frac{n \cdot -4}{\frac{t_1}{U}}\right)}\\

\mathbf{elif}\;t_2 \leq 4 \cdot 10^{+120}:\\
\;\;\;\;t_2\\

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

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


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

    1. Initial program 25.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. Simplified25.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 Om around inf 47.0%

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

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

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

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

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

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

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

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

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

    if 4.00000000000000021e-101 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 3.9999999999999999e120

    1. Initial program 99.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)} \]

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

    1. Initial program 33.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. Simplified41.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 U around 0 30.7%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)} \]
      2. mul-1-neg30.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\frac{2}{Om} \cdot \color{blue}{\frac{n \cdot \ell}{\frac{\frac{Om}{U \cdot U*}}{n \cdot \ell}}}} \]
    9. Simplified43.2%

      \[\leadsto \color{blue}{\sqrt{\frac{2}{Om} \cdot \frac{n \cdot \ell}{\frac{\frac{Om}{U \cdot U*}}{n \cdot \ell}}}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification61.4%

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

Alternative 3: 61.7% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 25.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. Simplified25.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 Om around inf 47.0%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 63.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified65.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. Step-by-step derivation
      1. pow1/265.7%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. associate-*l*65.7%

        \[\leadsto {\color{blue}{\left(2 \cdot \left(\left(n \cdot U\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)\right)\right)}}^{0.5} \]
      3. unpow-prod-down66.6%

        \[\leadsto \color{blue}{{2}^{0.5} \cdot {\left(\left(n \cdot U\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)\right)}^{0.5}} \]
      4. pow1/266.6%

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

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      6. associate-*r*70.2%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      7. *-commutative70.2%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
      8. *-commutative70.2%

        \[\leadsto \sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5} \]
    4. Applied egg-rr70.2%

      \[\leadsto \color{blue}{\sqrt{2} \cdot {\left(\left(n \cdot U\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Step-by-step derivation
      1. unpow1/270.2%

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

      \[\leadsto \color{blue}{\sqrt{2} \cdot \sqrt{\left(n \cdot U\right) \cdot \left(t - \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)}} \]
    7. Step-by-step derivation
      1. fma-udef70.2%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\frac{2}{Om} \cdot \color{blue}{\frac{n \cdot \ell}{\frac{\frac{Om}{U \cdot U*}}{n \cdot \ell}}}} \]
    9. Simplified43.2%

      \[\leadsto \color{blue}{\sqrt{\frac{2}{Om} \cdot \frac{n \cdot \ell}{\frac{\frac{Om}{U \cdot U*}}{n \cdot \ell}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.0%

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

Alternative 4: 61.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, t_1 \cdot \left(U - U*\right)\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 25.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. Simplified25.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 Om around inf 47.0%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 63.7%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified65.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. Step-by-step derivation
      1. pow1/265.7%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef65.7%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv63.7%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\frac{2}{Om} \cdot \color{blue}{\frac{n \cdot \ell}{\frac{\frac{Om}{U \cdot U*}}{n \cdot \ell}}}} \]
    9. Simplified43.2%

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

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

Alternative 5: 53.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.1 \cdot 10^{+44}:\\
\;\;\;\;\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{else}:\\
\;\;\;\;{\left(2 \cdot \left(n \cdot \left(U \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}^{0.5}\\


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

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

      \[\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 1.09999999999999998e44 < l

    1. Initial program 22.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. Simplified37.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. Step-by-step derivation
      1. pow1/237.2%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef37.2%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv22.6%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in n around 0 37.8%

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

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

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

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

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

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

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

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

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

Alternative 6: 46.1% accurate, 1.7× speedup?

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

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

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

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


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

    1. Initial program 50.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. Simplified50.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 t around inf 40.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      4. expm1-udef22.1%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      2. expm1-log1p40.9%

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

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

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

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

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

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

    if 3.04999999999999982e-174 < l < 2.99999999999999987e44

    1. Initial program 59.7%

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \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)} \]
      2. mul-1-neg59.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.99999999999999987e44 < l

    1. Initial program 22.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. Simplified37.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. Step-by-step derivation
      1. pow1/237.2%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef37.2%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv22.6%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in n around 0 37.8%

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

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

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

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

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

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

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

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

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

Alternative 7: 45.7% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;\ell \leq 7.2 \cdot 10^{-22}:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{n}{Om} \cdot \frac{\left(\ell \cdot \ell\right) \cdot \left(U - U*\right)}{Om}\right)\right)}^{0.5}\\

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


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

    1. Initial program 50.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      4. expm1-udef22.2%

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

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

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

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

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

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

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

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

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

    if 2.2499999999999999e-163 < l < 7.1999999999999996e-22

    1. Initial program 61.1%

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

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

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef53.1%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv61.1%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in Om around 0 63.9%

      \[\leadsto {\left(\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)\right)}^{0.5} \]
    6. Step-by-step derivation
      1. *-commutative63.9%

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

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

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

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

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

    if 7.1999999999999996e-22 < l

    1. Initial program 27.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. Simplified38.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. Step-by-step derivation
      1. pow1/238.0%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef38.0%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv27.6%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in n around 0 43.4%

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

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

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

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

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

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

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

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

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

Alternative 8: 55.5% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 44.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. Simplified44.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. Step-by-step derivation
      1. pow1/244.6%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef44.6%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv44.2%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in n around 0 45.5%

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

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

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

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

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

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

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

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

    if 2.19999999999999997e-13 < U

    1. Initial program 57.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. Simplified64.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. Step-by-step derivation
      1. pow1/264.8%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef64.8%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv57.1%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in Om around inf 57.5%

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

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

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

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

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

Alternative 9: 42.6% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 52.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. Simplified51.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. Taylor expanded in t around inf 40.9%

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      4. expm1-udef22.6%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      2. expm1-log1p40.9%

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

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

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

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

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

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

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

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

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

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

    if 2.20000000000000012e-107 < l

    1. Initial program 34.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. Simplified41.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 Om around inf 29.2%

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

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

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

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

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

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

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

Alternative 10: 53.9% accurate, 1.9× speedup?

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

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

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

      \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
    2. fma-udef48.4%

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

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

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

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

      \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
    7. cancel-sign-sub-inv46.7%

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

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

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

    \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
  5. Taylor expanded in n around 0 46.6%

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

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

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

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

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

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

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

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

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

Alternative 11: 37.1% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq 10^{-110}:\\ \;\;\;\;{\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 (<= l 1e-110)
   (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 (l <= 1e-110) {
		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 (l <= 1d-110) 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 (l <= 1e-110) {
		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 l <= 1e-110:
		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 (l <= 1e-110)
		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 (l <= 1e-110)
		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[l, 1e-110], 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}\;\ell \leq 10^{-110}:\\
\;\;\;\;{\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 l < 1.0000000000000001e-110

    1. Initial program 52.1%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified51.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. Step-by-step derivation
      1. pow1/251.2%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. fma-udef51.2%

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\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)}\right)}^{0.5} \]
      7. cancel-sign-sub-inv52.1%

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

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

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

      \[\leadsto \color{blue}{{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \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)\right)}^{0.5}} \]
    5. Taylor expanded in t around inf 42.2%

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

    if 1.0000000000000001e-110 < l

    1. Initial program 35.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 10^{-110}:\\ \;\;\;\;{\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 12: 37.1% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \left(n \cdot \color{blue}{\left(U \cdot t\right)}\right)} \]
      3. expm1-log1p-u39.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      4. expm1-udef22.7%

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def39.9%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      2. expm1-log1p41.1%

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000001e-110 < l

    1. Initial program 35.1%

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

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

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

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

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

Alternative 13: 36.2% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

    if 7.4000000000000005e-116 < l

    1. Initial program 35.5%

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

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

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

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

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

Alternative 14: 36.2% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.1%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      4. expm1-udef23.0%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)} - 1} \]
    7. Applied egg-rr23.0%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)} - 1} \]
    8. Step-by-step derivation
      1. expm1-def39.8%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\right)\right)} \]
      2. expm1-log1p41.0%

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

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

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

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

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

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

    if 7.5000000000000004e-116 < l

    1. Initial program 35.5%

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

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

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

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

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

Alternative 15: 35.9% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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