Toniolo and Linder, Equation (13)

Percentage Accurate: 48.3% → 78.0%
Time: 28.4s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 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: 48.3% 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: 78.0% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
\mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right) \leq \infty:\\
\;\;\;\;{\left(\left(\sqrt[3]{2 \cdot n} \cdot \sqrt[3]{U}\right) \cdot \sqrt[3]{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right) + t_1}\right)}^{1.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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*)))) < +inf.0

    1. Initial program 60.5%

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \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)} \]
      2. fma-udef62.9%

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\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)} \]
      6. associate--l-60.5%

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\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)}\right) \cdot \sqrt[3]{\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)}}} \]
      8. pow360.1%

        \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}\right)}^{3}}} \]
    4. Applied egg-rr66.1%

      \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}^{3}}} \]
    5. Step-by-step derivation
      1. sqrt-pow166.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{\left(\frac{3}{2}\right)}} \]
      2. metadata-eval66.0%

        \[\leadsto {\left(\sqrt[3]{\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)}^{\color{blue}{1.5}} \]
    6. Applied egg-rr66.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{1.5}} \]
    7. Step-by-step derivation
      1. cbrt-prod75.2%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    8. Applied egg-rr75.2%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    9. Step-by-step derivation
      1. associate-*r*75.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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. Simplified2.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 n around inf 36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_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)}\\
t_2 := \ell \cdot \frac{\ell}{Om}\\
\mathbf{if}\;t_1 \leq 10^{-161}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\

\mathbf{elif}\;t_1 \leq 10^{+142}:\\
\;\;\;\;t_1\\

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

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


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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000003e-161 < (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.00000000000000005e142

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

    if 1.00000000000000005e142 < (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 34.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. 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 l around 0 30.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 57.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_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)}\\
\mathbf{if}\;t_1 \leq 10^{-161}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+142}:\\
\;\;\;\;t_1\\

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

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


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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000003e-161 < (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*))))) < 5.0000000000000001e142

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

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

    1. Initial program 33.5%

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\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.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 n around inf 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.8% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+153}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;{\left(\sqrt[3]{t_1} \cdot \sqrt[3]{\mathsf{fma}\left(-2, \ell \cdot \frac{\ell}{Om}, t\right)}\right)}^{1.5}\\


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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000003e-161 < (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*))))) < 2e153

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

    if 2e153 < (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 18.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. Simplified28.3%

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \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)} \]
      2. fma-udef28.3%

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\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)} \]
      6. associate--l-18.4%

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\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)}} \]
      7. add-cube-cbrt18.4%

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\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)}\right) \cdot \sqrt[3]{\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)}}} \]
      8. pow318.4%

        \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}\right)}^{3}}} \]
    4. Applied egg-rr29.4%

      \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}^{3}}} \]
    5. Step-by-step derivation
      1. sqrt-pow129.4%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{\left(\frac{3}{2}\right)}} \]
      2. metadata-eval29.4%

        \[\leadsto {\left(\sqrt[3]{\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)}^{\color{blue}{1.5}} \]
    6. Applied egg-rr29.4%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{1.5}} \]
    7. Step-by-step derivation
      1. cbrt-prod40.6%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    8. Applied egg-rr40.6%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    9. Step-by-step derivation
      1. associate-*r*40.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 67.1% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 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*)))) < +inf.0

    1. Initial program 60.5%

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

        \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot n\right) \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)} \]
      2. fma-udef62.9%

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\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)} \]
      6. associate--l-60.5%

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

        \[\leadsto \sqrt{\color{blue}{\left(\sqrt[3]{\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)} \cdot \sqrt[3]{\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)}\right) \cdot \sqrt[3]{\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)}}} \]
      8. pow360.1%

        \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}\right)}^{3}}} \]
    4. Applied egg-rr66.1%

      \[\leadsto \sqrt{\color{blue}{{\left(\sqrt[3]{\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)}^{3}}} \]
    5. Step-by-step derivation
      1. sqrt-pow166.0%

        \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{\left(\frac{3}{2}\right)}} \]
      2. metadata-eval66.0%

        \[\leadsto {\left(\sqrt[3]{\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)}^{\color{blue}{1.5}} \]
    6. Applied egg-rr66.0%

      \[\leadsto \color{blue}{{\left(\sqrt[3]{\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)}^{1.5}} \]
    7. Step-by-step derivation
      1. cbrt-prod75.2%

        \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    8. Applied egg-rr75.2%

      \[\leadsto {\color{blue}{\left(\sqrt[3]{2 \cdot \left(n \cdot U\right)} \cdot \sqrt[3]{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)}}^{1.5} \]
    9. Step-by-step derivation
      1. associate-*r*75.2%

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

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

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

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

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

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

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

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

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

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

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

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

    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. Simplified2.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 n around inf 36.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 50.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 1.00000000000000001e41

    1. Initial program 52.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. Simplified50.5%

      \[\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.00000000000000001e41 < l < 5e176

    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. Simplified57.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 l around 0 66.2%

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

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

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

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

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

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

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

    if 5e176 < l

    1. Initial program 21.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. Simplified31.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 n around 0 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 49.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;Om \leq -2.8 \cdot 10^{-117}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;Om \leq 4.8 \cdot 10^{-153}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\frac{U}{Om} \cdot \frac{\left(U - U*\right) \cdot \left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\

\mathbf{elif}\;Om \leq 1.26 \cdot 10^{+31}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -3.20000000000000019e137 or 1.26000000000000001e31 < Om

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.20000000000000019e137 < Om < -2.8e-117 or 4.8000000000000004e-153 < Om < 1.26000000000000001e31

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

    if -2.8e-117 < Om < 4.8000000000000004e-153

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -3.2 \cdot 10^{+137}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)}\\ \mathbf{elif}\;Om \leq -2.8 \cdot 10^{-117}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\ \mathbf{elif}\;Om \leq 4.8 \cdot 10^{-153}:\\ \;\;\;\;\sqrt{-2 \cdot \left(\frac{U}{Om} \cdot \frac{\left(U - U*\right) \cdot \left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\ \mathbf{elif}\;Om \leq 1.26 \cdot 10^{+31}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \left(\ell \cdot \ell\right) \cdot \left(\frac{2}{Om} + \frac{n}{\frac{Om \cdot Om}{U - U*}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(\ell, \frac{\ell}{Om} \cdot -2, t\right)\right)\right)}\\ \end{array} \]

Alternative 8: 50.1% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;Om \leq -1.2 \cdot 10^{-114}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;Om \leq 4 \cdot 10^{-153}:\\
\;\;\;\;\sqrt{-2 \cdot \left(\frac{U}{Om} \cdot \frac{\left(U - U*\right) \cdot \left(\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)\right)}{Om}\right)}\\

\mathbf{elif}\;Om \leq 9.5 \cdot 10^{+43}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if Om < -7.19999999999999996e123

    1. Initial program 48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.19999999999999996e123 < Om < -1.2000000000000001e-114 or 4.00000000000000016e-153 < Om < 9.5000000000000004e43

    1. Initial program 45.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. Simplified44.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 l around 0 57.2%

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

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

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

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

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

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

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

    if -1.2000000000000001e-114 < Om < 4.00000000000000016e-153

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.5000000000000004e43 < Om

    1. Initial program 56.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 41.4% accurate, 1.8× speedup?

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

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

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

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


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

    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. Simplified50.6%

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

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

    if 1.49999999999999989e-165 < l < 5.19999999999999981e176

    1. Initial program 54.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. Simplified54.2%

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

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

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

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

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

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

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

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

    if 5.19999999999999981e176 < l

    1. Initial program 21.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. Simplified31.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 n around 0 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 43.8% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 4.39999999999999984e92

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

    if 4.39999999999999984e92 < l < 5e176

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5e176 < l

    1. Initial program 21.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. Simplified31.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 n around 0 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 43.4% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 2.2 \cdot 10^{+127}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{U}{Om} \cdot \frac{U* \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot n\right)\right)}{Om}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.7e98

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

    if 2.7e98 < l < 2.2000000000000002e127

    1. Initial program 50.6%

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

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

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

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

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

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

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

    if 2.2000000000000002e127 < l

    1. Initial program 27.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. Simplified38.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 n around 0 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 42.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 5.2 \cdot 10^{+176}:\\
\;\;\;\;\sqrt{2 \cdot \left(\frac{U \cdot U*}{Om} \cdot \frac{\left(n \cdot \ell\right) \cdot \left(n \cdot \ell\right)}{Om}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 2.70000000000000022e96

    1. Initial program 53.1%

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

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

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

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

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

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

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

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

    if 2.70000000000000022e96 < l < 5.19999999999999981e176

    1. Initial program 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.19999999999999981e176 < l

    1. Initial program 21.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. Simplified31.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 n around 0 23.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 38.1% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+116}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 52.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. Simplified50.6%

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

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

    if 3.59999999999999964e-105 < l < 1.14999999999999997e116

    1. Initial program 55.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.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 27.4%

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

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

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

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

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

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

    if 1.14999999999999997e116 < l

    1. Initial program 29.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. Simplified39.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 n around 0 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 44.0% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 53.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. Simplified54.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 43.8%

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

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

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

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

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

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

    if 5.2e148 < l

    1. Initial program 24.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. Simplified35.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 n around 0 25.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 36.2% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+127}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{-4 \cdot \frac{U}{\frac{\frac{Om}{n}}{\ell \cdot \ell}}}\\


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

    1. Initial program 52.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. Simplified50.6%

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

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

    if 6.19999999999999951e-104 < l < 1.2500000000000001e127

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

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

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

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

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

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

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

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

    if 1.2500000000000001e127 < l

    1. Initial program 27.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. Simplified38.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 n around 0 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. *-commutative28.8%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
      3. associate-/r*28.4%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\color{blue}{\frac{\frac{Om}{n}}{{\ell}^{2}}}}} \]
      4. unpow228.4%

        \[\leadsto \sqrt{-4 \cdot \frac{U}{\frac{\frac{Om}{n}}{\color{blue}{\ell \cdot \ell}}}} \]
    8. Simplified28.4%

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

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

Alternative 16: 36.2% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.5 \cdot 10^{+128}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 52.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. Simplified50.6%

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

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

    if 1.35e-107 < l < 1.4999999999999999e128

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

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

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

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

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

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

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

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

    if 1.4999999999999999e128 < l

    1. Initial program 27.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. Simplified38.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 n around 0 26.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 36.4% accurate, 2.0× speedup?

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

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

\mathbf{elif}\;\ell \leq 1.25 \cdot 10^{+116}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


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

    1. Initial program 52.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. Simplified50.6%

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

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

    if 3.40000000000000015e-104 < l < 1.25000000000000006e116

    1. Initial program 55.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.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 27.4%

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

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

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

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

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

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

    if 1.25000000000000006e116 < l

    1. Initial program 29.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. Simplified29.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{-4 \cdot \color{blue}{\frac{U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      2. associate-*r/28.6%

        \[\leadsto \sqrt{\color{blue}{\frac{-4 \cdot U}{\frac{Om}{{\ell}^{2} \cdot n}}}} \]
      3. *-commutative28.6%

        \[\leadsto \sqrt{\frac{-4 \cdot U}{\frac{Om}{\color{blue}{n \cdot {\ell}^{2}}}}} \]
      4. unpow228.6%

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

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

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

Alternative 18: 35.4% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.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. Simplified50.6%

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

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

    if 2.45e-105 < l

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

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

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

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

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

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

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

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

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

Alternative 19: 34.6% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.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. Simplified50.4%

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

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

    if 6.0000000000000002e-62 < l

    1. Initial program 40.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. Simplified45.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. Taylor expanded in t around inf 13.9%

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

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

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

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

Alternative 20: 34.6% accurate, 2.1× speedup?

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

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

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

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

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

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

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

Reproduce

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