Toniolo and Linder, Equation (13)

Percentage Accurate: 49.6% → 59.4%
Time: 22.8s
Alternatives: 18
Speedup: 1.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 49.6% 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: 59.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;\ell \leq -7.8 \cdot 10^{-191}:\\
\;\;\;\;t_2\\

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

\mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+129}:\\
\;\;\;\;t_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < -2.2000000000000002e155

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000002e155 < l < -7.7999999999999999e-191 or 2.4e-102 < l < 1.70000000000000009e129

    1. Initial program 63.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. Simplified66.3%

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

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

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

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

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

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

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

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

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

    if -7.7999999999999999e-191 < l < 2.4e-102

    1. Initial program 51.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. Simplified49.3%

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

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

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

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

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

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

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

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

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

    if 1.70000000000000009e129 < l

    1. Initial program 10.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. Simplified24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -2.2 \cdot 10^{+155}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)}}}\\ \mathbf{elif}\;\ell \leq -7.8 \cdot 10^{-191}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{Om}{\mathsf{fma}\left(\ell, -2, \frac{n}{\frac{Om}{\ell \cdot U*}}\right)}}\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.4 \cdot 10^{-102}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.7 \cdot 10^{+129}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{\frac{Om}{\mathsf{fma}\left(\ell, -2, \frac{n}{\frac{Om}{\ell \cdot U*}}\right)}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)}}}\right)\\ \end{array} \]

Alternative 2: 64.8% 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\\ t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\ \mathbf{if}\;t_3 \leq 2 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\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))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
   (if (<= t_3 2e-145)
     (sqrt
      (*
       (* 2.0 n)
       (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l (/ l Om)))) t_1)))
       (sqrt
        (* (* 2.0 n) (/ l (/ Om (* U (* l (+ -2.0 (* U* (/ n 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 t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 2e-145) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
	} else {
		tmp = sqrt(((2.0 * n) * (l / (Om / (U * (l * (-2.0 + (U_42_ * (n / Om)))))))));
	}
	return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
	double t_2 = (2.0 * n) * U;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 2e-145) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (l / (Om / (U * (l * (-2.0 + (U_42_ * (n / Om)))))))));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)))
	tmp = 0
	if t_3 <= 2e-145:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)))
	else:
		tmp = math.sqrt(((2.0 * n) * (l / (Om / (U * (l * (-2.0 + (U_42_ * (n / 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)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)))
	tmp = 0.0
	if (t_3 <= 2e-145)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l * Float64(l / Om)))) + t_1)));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(l / Float64(Om / Float64(U * Float64(l * Float64(-2.0 + Float64(U_42_ * Float64(n / Om)))))))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	tmp = 0.0;
	if (t_3 <= 2e-145)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l * (l / Om)))) + t_1)));
	else
		tmp = sqrt(((2.0 * n) * (l / (Om / (U * (l * (-2.0 + (U_42_ * (n / Om)))))))));
	end
	tmp_2 = 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]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 2e-145], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(l / N[(Om / N[(U * N[(l * N[(-2.0 + N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\

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

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


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

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

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

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

    if 1.99999999999999983e-145 < (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 71.8%

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

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

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

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

    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. Simplified47.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 61.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -9.0000000000000005e179

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.0000000000000005e179 < l < 2.5000000000000002e127

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

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

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

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

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

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

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

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

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

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

    if 2.5000000000000002e127 < l

    1. Initial program 10.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. Simplified24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 60.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -3.2999999999999998e71

    1. Initial program 31.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.2999999999999998e71 < l < 1.55999999999999997e127

    1. Initial program 60.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. Simplified59.4%

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

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

    if 1.55999999999999997e127 < l

    1. Initial program 10.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. Simplified24.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 55.0% accurate, 1.8× speedup?

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

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

\mathbf{elif}\;\ell \leq -1.1 \cdot 10^{-189} \lor \neg \left(\ell \leq 2.05 \cdot 10^{-101}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -4.4000000000000002e154

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.4000000000000002e154 < l < -1.1000000000000001e-189 or 2.05000000000000013e-101 < l

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

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

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

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

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

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

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

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

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

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

    if -1.1000000000000001e-189 < l < 2.05000000000000013e-101

    1. Initial program 51.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. Simplified49.3%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -4.4 \cdot 10^{+154}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)}}}\\ \mathbf{elif}\;\ell \leq -1.1 \cdot 10^{-189} \lor \neg \left(\ell \leq 2.05 \cdot 10^{-101}\right):\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{\frac{Om}{-2 + \frac{n}{\frac{Om}{U*}}}}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)\right)}\\ \end{array} \]

Alternative 6: 52.0% accurate, 1.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -3.5e51 or 1.62e-24 < l

    1. Initial program 34.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. Simplified55.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.5e51 < l < -1.2600000000000001e-189

    1. Initial program 76.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. Simplified70.5%

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

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

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

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

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

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

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

    if -1.2600000000000001e-189 < l < 1.62e-24

    1. Initial program 51.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. Simplified48.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3.5 \cdot 10^{+51}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)}}}\\ \mathbf{elif}\;\ell \leq -1.26 \cdot 10^{-189}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{n \cdot \left(\left(\ell \cdot \ell\right) \cdot U*\right)}{Om \cdot Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.62 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{\left(\ell \cdot \ell\right) \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot \left(-2 + U* \cdot \frac{n}{Om}\right)\right)}}}\\ \end{array} \]

Alternative 7: 55.9% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -4.79999999999999961e71

    1. Initial program 31.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. Simplified62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.79999999999999961e71 < l

    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. Simplified55.2%

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

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

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

Alternative 8: 48.1% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.8 \cdot 10^{-102} \lor \neg \left(Om \leq 4 \cdot 10^{-57}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.8e-102 or 3.99999999999999982e-57 < Om

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.8e-102 < Om < 3.99999999999999982e-57

    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. Simplified57.8%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 48.6% accurate, 1.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -0.00320000000000000015 or 5.79999999999999975e-39 < U*

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

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

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

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

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

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

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

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

    if -0.00320000000000000015 < U* < 5.79999999999999975e-39

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 48.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.2 \cdot 10^{-192} \lor \neg \left(Om \leq 1.5 \cdot 10^{-62}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -2.20000000000000006e-192 or 1.5000000000000001e-62 < Om

    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. Step-by-step derivation
      1. associate-*l*55.7%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.20000000000000006e-192 < Om < 1.5000000000000001e-62

    1. Initial program 34.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 43.9% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -7.6 \cdot 10^{+48} \lor \neg \left(\ell \leq 1.6 \cdot 10^{-6}\right):\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(-2 \cdot \left(U \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -7.60000000000000001e48 or 1.5999999999999999e-6 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(\left(2 \cdot n\right) \cdot \left(-2 \cdot \color{blue}{\left(\frac{\ell \cdot \ell}{Om} \cdot U\right)}\right)\right)}^{0.5} \]
    10. Applied egg-rr41.0%

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

    if -7.60000000000000001e48 < l < 1.5999999999999999e-6

    1. Initial program 62.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. Simplified57.9%

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

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

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

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

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

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

Alternative 12: 43.3% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4 \cdot 10^{+48} \lor \neg \left(\ell \leq 1.42 \cdot 10^{-5}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \frac{\ell}{\frac{Om}{U \cdot \left(\ell \cdot -2\right)}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -4.00000000000000018e48 or 1.42e-5 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000018e48 < l < 1.42e-5

    1. Initial program 62.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. Simplified57.9%

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

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

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

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

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

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

Alternative 13: 38.6% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -1.02 \cdot 10^{+49}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)}{Om}}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -1.02e49

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e49 < l < 0.021999999999999999

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

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

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

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

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

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

    if 0.021999999999999999 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 45.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -3 \cdot 10^{+76}:\\
\;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(-2 \cdot \left(U \cdot \frac{\ell \cdot \ell}{Om}\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -2.9999999999999998e76

    1. Initial program 30.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. Simplified62.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.9999999999999998e76 < l

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 46.9% accurate, 2.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 37.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -6.5 \cdot 10^{+48}:\\
\;\;\;\;\sqrt{\frac{-4 \cdot \left(n \cdot \left(U \cdot \left(\ell \cdot \ell\right)\right)\right)}{Om}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -6.49999999999999972e48

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999972e48 < l

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

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

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

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

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

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

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

Alternative 17: 36.0% accurate, 2.1× speedup?

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

\\
{\left(\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

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

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

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

Alternative 18: 34.6% accurate, 2.1× speedup?

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

\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

Reproduce

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