Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 67.0%
Time: 28.7s
Alternatives: 23
Speedup: 1.1×

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

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

Initial Program: 50.1% 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: 67.0% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := t - 2 \cdot \frac{l_m \cdot l_m}{Om}\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\\ t_4 := \sqrt{t_2 \cdot \left(t_1 + t_3 \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_4 \leq 0:\\ \;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{{l_m}^{2}}{Om}, t_3 \cdot \left(U - U*\right)\right)\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t_4 \leq 5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{t_2 \cdot \left(t_1 + {\left({\left(\sqrt[3]{\frac{l_m}{Om}}\right)}^{2} \cdot \sqrt[3]{n}\right)}^{3} \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{{Om}^{2}}, U* - U, \frac{-2}{Om}\right)\right|} \cdot \left(l_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (- t (* 2.0 (/ (* l_m l_m) Om))))
        (t_2 (* (* 2.0 n) U))
        (t_3 (* n (pow (/ l_m Om) 2.0)))
        (t_4 (sqrt (* t_2 (+ t_1 (* t_3 (- U* U)))))))
   (if (<= t_4 0.0)
     (pow
      (* (* 2.0 n) (* U (- t (fma 2.0 (/ (pow l_m 2.0) Om) (* t_3 (- U U*))))))
      0.5)
     (if (<= t_4 5e+150)
       (sqrt
        (*
         t_2
         (+
          t_1
          (* (pow (* (pow (cbrt (/ l_m Om)) 2.0) (cbrt n)) 3.0) (- U* U)))))
       (*
        (sqrt (fabs (* (* n U) (fma (/ n (pow Om 2.0)) (- U* U) (/ -2.0 Om)))))
        (* l_m (sqrt 2.0)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = t - (2.0 * ((l_m * l_m) / Om));
	double t_2 = (2.0 * n) * U;
	double t_3 = n * pow((l_m / Om), 2.0);
	double t_4 = sqrt((t_2 * (t_1 + (t_3 * (U_42_ - U)))));
	double tmp;
	if (t_4 <= 0.0) {
		tmp = pow(((2.0 * n) * (U * (t - fma(2.0, (pow(l_m, 2.0) / Om), (t_3 * (U - U_42_)))))), 0.5);
	} else if (t_4 <= 5e+150) {
		tmp = sqrt((t_2 * (t_1 + (pow((pow(cbrt((l_m / Om)), 2.0) * cbrt(n)), 3.0) * (U_42_ - U)))));
	} else {
		tmp = sqrt(fabs(((n * U) * fma((n / pow(Om, 2.0)), (U_42_ - U), (-2.0 / Om))))) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om)))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = Float64(n * (Float64(l_m / Om) ^ 2.0))
	t_4 = sqrt(Float64(t_2 * Float64(t_1 + Float64(t_3 * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_4 <= 0.0)
		tmp = Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, Float64((l_m ^ 2.0) / Om), Float64(t_3 * Float64(U - U_42_)))))) ^ 0.5;
	elseif (t_4 <= 5e+150)
		tmp = sqrt(Float64(t_2 * Float64(t_1 + Float64((Float64((cbrt(Float64(l_m / Om)) ^ 2.0) * cbrt(n)) ^ 3.0) * Float64(U_42_ - U)))));
	else
		tmp = Float64(sqrt(abs(Float64(Float64(n * U) * fma(Float64(n / (Om ^ 2.0)), Float64(U_42_ - U), Float64(-2.0 / Om))))) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(t$95$2 * N[(t$95$1 + N[(t$95$3 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$4, 0.0], N[Power[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(t$95$3 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t$95$4, 5e+150], N[Sqrt[N[(t$95$2 * N[(t$95$1 + N[(N[Power[N[(N[Power[N[Power[N[(l$95$m / Om), $MachinePrecision], 1/3], $MachinePrecision], 2.0], $MachinePrecision] * N[Power[n, 1/3], $MachinePrecision]), $MachinePrecision], 3.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[Abs[N[(N[(n * U), $MachinePrecision] * N[(N[(n / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t_4 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{t_2 \cdot \left(t_1 + {\left({\left(\sqrt[3]{\frac{l_m}{Om}}\right)}^{2} \cdot \sqrt[3]{n}\right)}^{3} \cdot \left(U* - U\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{{Om}^{2}}, U* - U, \frac{-2}{Om}\right)\right|} \cdot \left(l_m \cdot \sqrt{2}\right)\\


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

    1. Initial program 10.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. Step-by-step derivation
      1. add-cube-cbrt10.1%

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.00000000000000009e150

    1. Initial program 98.0%

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000009e150 < (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 26.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. Simplified32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 66.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+150}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(n \cdot U\right) \cdot \mathsf{fma}\left(\frac{n}{{Om}^{2}}, U* - U, \frac{-2}{Om}\right)\right|} \cdot \left(l_m \cdot \sqrt{2}\right)\\


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

    1. Initial program 10.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. Step-by-step derivation
      1. add-cube-cbrt10.1%

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 5.00000000000000009e150

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

    if 5.00000000000000009e150 < (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 26.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. Simplified32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 60.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 57.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\

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


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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\sqrt{t_1}\\

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.00000000000000011e301

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

    if 2.00000000000000011e301 < (*.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 27.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. Simplified32.7%

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

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

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

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

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

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

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

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

Alternative 6: 65.2% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;\sqrt{t_1}\\

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.00000000000000011e301

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

    if 2.00000000000000011e301 < (*.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 27.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. Simplified32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 65.3% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 8.6%

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.00000000000000011e301

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

    if 2.00000000000000011e301 < (*.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 27.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. Simplified32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 65.2% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))) < 2.00000000000000011e301

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

    if 2.00000000000000011e301 < (*.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 27.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. Simplified32.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 55.6% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 1.7 \cdot 10^{+22}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;l_m \leq 1.6 \cdot 10^{+159} \lor \neg \left(l_m \leq 4.8 \cdot 10^{+295}\right):\\ \;\;\;\;{\left(U \cdot \left(2 \cdot \left(n \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot {\left(U \cdot \frac{-2}{\frac{Om}{n}}\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 1.7e+22)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (+
       (- t (/ (* 2.0 (* l_m l_m)) Om))
       (* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
   (if (or (<= l_m 1.6e+159) (not (<= l_m 4.8e+295)))
     (pow (* U (* 2.0 (* n (+ t (* (/ (pow l_m 2.0) Om) -2.0))))) 0.5)
     (* (* l_m (sqrt 2.0)) (pow (* U (/ -2.0 (/ Om n))) 0.5)))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 1.7e+22) {
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else if ((l_m <= 1.6e+159) || !(l_m <= 4.8e+295)) {
		tmp = pow((U * (2.0 * (n * (t + ((pow(l_m, 2.0) / Om) * -2.0))))), 0.5);
	} else {
		tmp = (l_m * sqrt(2.0)) * pow((U * (-2.0 / (Om / n))), 0.5);
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 1.7d+22) then
        tmp = sqrt(((2.0d0 * n) * (u * ((t - ((2.0d0 * (l_m * l_m)) / om)) + (n * (((l_m / om) ** 2.0d0) * (u_42 - u)))))))
    else if ((l_m <= 1.6d+159) .or. (.not. (l_m <= 4.8d+295))) then
        tmp = (u * (2.0d0 * (n * (t + (((l_m ** 2.0d0) / om) * (-2.0d0)))))) ** 0.5d0
    else
        tmp = (l_m * sqrt(2.0d0)) * ((u * ((-2.0d0) / (om / n))) ** 0.5d0)
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 1.7e+22) {
		tmp = Math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (Math.pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else if ((l_m <= 1.6e+159) || !(l_m <= 4.8e+295)) {
		tmp = Math.pow((U * (2.0 * (n * (t + ((Math.pow(l_m, 2.0) / Om) * -2.0))))), 0.5);
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.pow((U * (-2.0 / (Om / n))), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 1.7e+22:
		tmp = math.sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (math.pow((l_m / Om), 2.0) * (U_42_ - U)))))))
	elif (l_m <= 1.6e+159) or not (l_m <= 4.8e+295):
		tmp = math.pow((U * (2.0 * (n * (t + ((math.pow(l_m, 2.0) / Om) * -2.0))))), 0.5)
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.pow((U * (-2.0 / (Om / n))), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 1.7e+22)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U)))))));
	elseif ((l_m <= 1.6e+159) || !(l_m <= 4.8e+295))
		tmp = Float64(U * Float64(2.0 * Float64(n * Float64(t + Float64(Float64((l_m ^ 2.0) / Om) * -2.0))))) ^ 0.5;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * (Float64(U * Float64(-2.0 / Float64(Om / n))) ^ 0.5));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 1.7e+22)
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (((l_m / Om) ^ 2.0) * (U_42_ - U)))))));
	elseif ((l_m <= 1.6e+159) || ~((l_m <= 4.8e+295)))
		tmp = (U * (2.0 * (n * (t + (((l_m ^ 2.0) / Om) * -2.0))))) ^ 0.5;
	else
		tmp = (l_m * sqrt(2.0)) * ((U * (-2.0 / (Om / n))) ^ 0.5);
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.7e+22], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[Or[LessEqual[l$95$m, 1.6e+159], N[Not[LessEqual[l$95$m, 4.8e+295]], $MachinePrecision]], N[Power[N[(U * N[(2.0 * N[(n * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Power[N[(U * N[(-2.0 / N[(Om / n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l_m \leq 1.6 \cdot 10^{+159} \lor \neg \left(l_m \leq 4.8 \cdot 10^{+295}\right):\\
\;\;\;\;{\left(U \cdot \left(2 \cdot \left(n \cdot \left(t + \frac{{l_m}^{2}}{Om} \cdot -2\right)\right)\right)\right)}^{0.5}\\

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


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

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

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

    if 1.7e22 < l < 1.59999999999999992e159 or 4.80000000000000009e295 < l

    1. Initial program 52.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. add-cube-cbrt52.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.59999999999999992e159 < l < 4.80000000000000009e295

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{+22}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(\ell \cdot \ell\right)}{Om}\right) + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.6 \cdot 10^{+159} \lor \neg \left(\ell \leq 4.8 \cdot 10^{+295}\right):\\ \;\;\;\;{\left(U \cdot \left(2 \cdot \left(n \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot {\left(U \cdot \frac{-2}{\frac{Om}{n}}\right)}^{0.5}\\ \end{array} \]

Alternative 10: 48.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 57.6%

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

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

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

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

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

    if 1.70000000000000009e-37 < l < 3.4e124

    1. Initial program 56.3%

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

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

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

    if 3.4e124 < l

    1. Initial program 19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 43.2% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;l_m \leq 4.2 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\

\mathbf{elif}\;l_m \leq 3.5 \cdot 10^{+134}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 4.19999999999999975e-46

    1. Initial program 57.9%

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

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

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

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

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

    if 4.19999999999999975e-46 < l < 4.20000000000000016e79

    1. Initial program 52.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(2 \cdot \left(U \cdot t\right)\right)}} \]
      4. add-sqr-sqrt34.2%

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

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

        \[\leadsto \sqrt{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5}}} \]
      7. pow-prod-down22.1%

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{2}\right)}^{0.5}}} \]
    7. Step-by-step derivation
      1. unpow1/222.1%

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

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

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

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

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

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

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

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

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

    if 4.20000000000000016e79 < l < 3.50000000000000003e134

    1. Initial program 54.5%

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

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

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

    if 3.50000000000000003e134 < l

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{U \cdot \frac{-2 \cdot n}{Om}} \cdot {\left(\sqrt[3]{\ell \cdot \sqrt{2}}\right)}^{3}\right)} - 1} \]
      3. *-un-lft-identity28.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{U \cdot \frac{-2 \cdot n}{\color{blue}{1 \cdot Om}}} \cdot {\left(\sqrt[3]{\ell \cdot \sqrt{2}}\right)}^{3}\right)} - 1 \]
      4. times-frac28.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{U \cdot \color{blue}{\left(\frac{-2}{1} \cdot \frac{n}{Om}\right)}} \cdot {\left(\sqrt[3]{\ell \cdot \sqrt{2}}\right)}^{3}\right)} - 1 \]
      5. metadata-eval28.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{U \cdot \left(\color{blue}{-2} \cdot \frac{n}{Om}\right)} \cdot {\left(\sqrt[3]{\ell \cdot \sqrt{2}}\right)}^{3}\right)} - 1 \]
      6. rem-cube-cbrt28.6%

        \[\leadsto e^{\mathsf{log1p}\left(\sqrt{U \cdot \left(-2 \cdot \frac{n}{Om}\right)} \cdot \color{blue}{\left(\ell \cdot \sqrt{2}\right)}\right)} - 1 \]
    12. Applied egg-rr28.6%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\sqrt{U \cdot \left(-2 \cdot \frac{n}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\right)} - 1} \]
    13. Step-by-step derivation
      1. expm1-def28.6%

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

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

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

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

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

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

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

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

Alternative 12: 43.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;l_m \leq 4.6 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\

\mathbf{elif}\;l_m \leq 4.2 \cdot 10^{+133}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 5.5000000000000003e-45

    1. Initial program 57.9%

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

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

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

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

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

    if 5.5000000000000003e-45 < l < 4.6000000000000001e79

    1. Initial program 52.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(2 \cdot \left(U \cdot t\right)\right)}} \]
      4. add-sqr-sqrt34.2%

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

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

        \[\leadsto \sqrt{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5}}} \]
      7. pow-prod-down22.1%

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{2}\right)}^{0.5}}} \]
    7. Step-by-step derivation
      1. unpow1/222.1%

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

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

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

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

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

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

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

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

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

    if 4.6000000000000001e79 < l < 4.2e133

    1. Initial program 54.5%

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

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

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

    if 4.2e133 < l

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 5.5 \cdot 10^{-45}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{elif}\;\ell \leq 4.6 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+133}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]

Alternative 13: 43.6% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;l_m \leq 6.5 \cdot 10^{+79}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\

\mathbf{elif}\;l_m \leq 3.7 \cdot 10^{+133}:\\
\;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 2.6000000000000002e-46

    1. Initial program 57.9%

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

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

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

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

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

    if 2.6000000000000002e-46 < l < 6.49999999999999954e79

    1. Initial program 52.0%

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(2 \cdot \left(U \cdot t\right)\right)}} \]
      4. add-sqr-sqrt34.2%

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

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

        \[\leadsto \sqrt{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5}}} \]
      7. pow-prod-down22.1%

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{2}\right)}^{0.5}}} \]
    7. Step-by-step derivation
      1. unpow1/222.1%

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

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

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

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

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

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

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

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

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

    if 6.49999999999999954e79 < l < 3.70000000000000023e133

    1. Initial program 54.5%

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

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

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

    if 3.70000000000000023e133 < l

    1. Initial program 18.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 2.6 \cdot 10^{-46}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{elif}\;\ell \leq 6.5 \cdot 10^{+79}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+133}:\\ \;\;\;\;\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{U \cdot \left(n \cdot -2\right)}{Om}}\\ \end{array} \]

Alternative 14: 48.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 57.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. Simplified56.5%

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

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

    if 2.90000000000000021e124 < l

    1. Initial program 19.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 50.6% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 44.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;l_m \leq 5.2 \cdot 10^{+51}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\

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


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

    1. Initial program 58.0%

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

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

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

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

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

    if 5.2000000000000002e51 < l

    1. Initial program 27.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. Simplified34.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 39.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.2000000000000001e-43

    1. Initial program 56.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. add-cube-cbrt56.9%

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

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

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

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

    if -1.2000000000000001e-43 < Om

    1. Initial program 50.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. add-cube-cbrt50.4%

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(2 \cdot \left(U \cdot t\right)\right)}} \]
      4. add-sqr-sqrt27.6%

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

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

        \[\leadsto \sqrt{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5}}} \]
      7. pow-prod-down24.6%

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{2}\right)}^{0.5}}} \]
    7. Step-by-step derivation
      1. unpow1/224.6%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 40.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U \leq 1.92 \cdot 10^{+84}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(n \cdot \left(2 \cdot t\right)\right)\right|}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 1.91999999999999993e84

    1. Initial program 51.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. Step-by-step derivation
      1. add-cube-cbrt51.1%

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

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

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

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

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

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

        \[\leadsto \sqrt{\color{blue}{n \cdot \left(2 \cdot \left(U \cdot t\right)\right)}} \]
      4. add-sqr-sqrt31.9%

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

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

        \[\leadsto \sqrt{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5} \cdot \color{blue}{{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}^{0.5}}} \]
      7. pow-prod-down26.4%

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

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

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

      \[\leadsto \sqrt{\color{blue}{{\left({\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{2}\right)}^{0.5}}} \]
    7. Step-by-step derivation
      1. unpow1/226.4%

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

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

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

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

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

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

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

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

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

    if 1.91999999999999993e84 < U

    1. Initial program 60.2%

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

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

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

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

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

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{0.5} \cdot {\left(n \cdot t\right)}^{0.5}} \]
      4. pow1/250.1%

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

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

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

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

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

Alternative 19: 36.9% accurate, 2.1× speedup?

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

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

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


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

    1. Initial program 52.4%

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

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

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

    if -8.1999999999999997e-251 < U

    1. Initial program 52.7%

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

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

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

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

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

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

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

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

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

Alternative 20: 38.6% accurate, 2.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.1499999999999999e-43

    1. Initial program 56.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. add-cube-cbrt56.9%

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

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

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

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

    if -1.1499999999999999e-43 < Om

    1. Initial program 50.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. add-cube-cbrt50.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 36.7% accurate, 2.1× speedup?

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

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

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


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

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

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

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

    if 4.00000000000000017e-215 < U

    1. Initial program 61.1%

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

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

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

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

Alternative 22: 36.7% accurate, 2.1× speedup?

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

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

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


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

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

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

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

    if 3.0500000000000001e-215 < U

    1. Initial program 61.1%

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

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

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

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

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

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

Alternative 23: 36.7% accurate, 2.1× speedup?

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

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

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

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

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

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

Reproduce

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