Toniolo and Linder, Equation (13)

Percentage Accurate: 49.7% → 65.0%
Time: 32.1s
Alternatives: 18
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

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

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l\_m \cdot \frac{l\_m}{Om}\\ t_2 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_3 := t\_2 \cdot \left(U* - U\right)\\ t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\ \mathbf{if}\;t\_4 \leq 10^{-277}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, t\_2 \cdot \left(U - U*\right)\right)\right)\right)}\\ \mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \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 (* l_m (/ l_m Om)))
        (t_2 (* n (pow (/ l_m Om) 2.0)))
        (t_3 (* t_2 (- U* U)))
        (t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
   (if (<= t_4 1e-277)
     (sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* t_2 (- U U*)))))))
     (if (<= t_4 4e+306)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
       (*
        l_m
        (sqrt
         (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = l_m * (l_m / Om);
	double t_2 = n * pow((l_m / Om), 2.0);
	double t_3 = t_2 * (U_42_ - U);
	double t_4 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
	double tmp;
	if (t_4 <= 1e-277) {
		tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, (t_2 * (U - U_42_)))))));
	} else if (t_4 <= 4e+306) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	t_2 = Float64(n * (Float64(l_m / Om) ^ 2.0))
	t_3 = Float64(t_2 * Float64(U_42_ - U))
	t_4 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_3))
	tmp = 0.0
	if (t_4 <= 1e-277)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(t_2 * Float64(U - U_42_)))))));
	elseif (t_4 <= 4e+306)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1)))));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(2.0 / Om))))));
	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[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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] + t$95$3), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, 1e-277], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(t$95$2 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, 4e+306], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$3 - N[(2.0 * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $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 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := t\_2 \cdot \left(U* - U\right)\\
t_4 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_3\right)\\
\mathbf{if}\;t\_4 \leq 10^{-277}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, t\_2 \cdot \left(U - U*\right)\right)\right)\right)}\\

\mathbf{elif}\;t\_4 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 9.99999999999999969e-278

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow140.4%

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

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

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

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

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

    if 9.99999999999999969e-278 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.00000000000000007e306

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

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

    if 4.00000000000000007e306 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 18.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. Simplified27.8%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 20.3%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative20.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 10^{-277}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}\\ \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 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 65.0% accurate, 0.5× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ 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\right)\\ \mathbf{if}\;t\_2 \leq 10^{-277}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \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 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_2 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
   (if (<= t_2 1e-277)
     (sqrt
      (*
       2.0
       (*
        n
        (* U (+ t (/ (* (pow l_m 2.0) (- (/ (* n (- U* U)) Om) 2.0)) Om))))))
     (if (<= t_2 4e+306)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
       (*
        l_m
        (sqrt
         (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_2 <= 1e-277) {
		tmp = sqrt((2.0 * (n * (U * (t + ((pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	} else if (t_2 <= 4e+306) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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) :: t_2
    real(8) :: tmp
    t_1 = (n * ((l_m / om) ** 2.0d0)) * (u_42 - u)
    t_2 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l_m * l_m) / om))) + t_1)
    if (t_2 <= 1d-277) then
        tmp = sqrt((2.0d0 * (n * (u * (t + (((l_m ** 2.0d0) * (((n * (u_42 - u)) / om) - 2.0d0)) / om))))))
    else if (t_2 <= 4d+306) then
        tmp = sqrt(((2.0d0 * (n * u)) * (t + (t_1 - (2.0d0 * (l_m * (l_m / om)))))))
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_2 <= 1e-277) {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	} else if (t_2 <= 4e+306) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)
	tmp = 0
	if t_2 <= 1e-277:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))))
	elif t_2 <= 4e+306:
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))))
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))
	t_2 = Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))
	tmp = 0.0
	if (t_2 <= 1e-277)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0)) / Om))))));
	elseif (t_2 <= 4e+306)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_1 - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))))));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - 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 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U);
	t_2 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	tmp = 0.0;
	if (t_2 <= 1e-277)
		tmp = sqrt((2.0 * (n * (U * (t + (((l_m ^ 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	elseif (t_2 <= 4e+306)
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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 * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $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] + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, 1e-277], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, 4e+306], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(t$95$1 - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $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(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
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\right)\\
\mathbf{if}\;t\_2 \leq 10^{-277}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+306}:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 9.99999999999999969e-278

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 41.9%

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

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

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

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

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

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

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

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

    if 9.99999999999999969e-278 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))) < 4.00000000000000007e306

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

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

    if 4.00000000000000007e306 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 18.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. Simplified27.8%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 20.3%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative20.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\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 10^{-277}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right) \leq 4 \cdot 10^{+306}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 56.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 4.05e-44)
   (sqrt
    (* 2.0 (* U (* n (+ t (/ (* (pow l_m 2.0) (- (/ (* n U*) Om) 2.0)) Om))))))
   (if (<= l_m 1.35e-25)
     (* (sqrt (* (* 2.0 n) U)) (sqrt t))
     (if (<= l_m 1.35e+122)
       (sqrt
        (*
         2.0
         (*
          n
          (* U (+ t (/ (* (pow l_m 2.0) (- (/ (* n (- U* U)) Om) 2.0)) Om))))))
       (*
        l_m
        (sqrt
         (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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.05e-44) {
		tmp = sqrt((2.0 * (U * (n * (t + ((pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	} else if (l_m <= 1.35e-25) {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	} else if (l_m <= 1.35e+122) {
		tmp = sqrt((2.0 * (n * (U * (t + ((pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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.05d-44) then
        tmp = sqrt((2.0d0 * (u * (n * (t + (((l_m ** 2.0d0) * (((n * u_42) / om) - 2.0d0)) / om))))))
    else if (l_m <= 1.35d-25) then
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    else if (l_m <= 1.35d+122) then
        tmp = sqrt((2.0d0 * (n * (u * (t + (((l_m ** 2.0d0) * (((n * (u_42 - u)) / om) - 2.0d0)) / om))))))
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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.05e-44) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + ((Math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	} else if (l_m <= 1.35e-25) {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	} else if (l_m <= 1.35e+122) {
		tmp = Math.sqrt((2.0 * (n * (U * (t + ((Math.pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (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.05e-44:
		tmp = math.sqrt((2.0 * (U * (n * (t + ((math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))))
	elif l_m <= 1.35e-25:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	elif l_m <= 1.35e+122:
		tmp = math.sqrt((2.0 * (n * (U * (t + ((math.pow(l_m, 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))))
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (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.05e-44)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * U_42_) / Om) - 2.0)) / Om))))));
	elseif (l_m <= 1.35e-25)
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	elseif (l_m <= 1.35e+122)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * Float64(U_42_ - U)) / Om) - 2.0)) / Om))))));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(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.05e-44)
		tmp = sqrt((2.0 * (U * (n * (t + (((l_m ^ 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	elseif (l_m <= 1.35e-25)
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	elseif (l_m <= 1.35e+122)
		tmp = sqrt((2.0 * (n * (U * (t + (((l_m ^ 2.0) * (((n * (U_42_ - U)) / Om) - 2.0)) / Om))))));
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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.05e-44], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.35e-25], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.35e+122], N[Sqrt[N[(2.0 * N[(n * N[(U * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{-25}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\

\mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 47.8%

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

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

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

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

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

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

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

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

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

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

    if 4.0499999999999999e-44 < l < 1.35000000000000008e-25

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow136.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot U\right)}} \cdot \sqrt{t} \]
    12. Applied egg-rr99.7%

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

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

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

    if 1.35000000000000008e-25 < l < 1.3499999999999999e122

    1. Initial program 55.0%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 58.3%

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

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

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

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

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

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

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

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

    if 1.3499999999999999e122 < l

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 52.8%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 56.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{if}\;l\_m \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;l\_m \leq 3.9 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;l\_m \leq 1.15 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \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
         (sqrt
          (*
           2.0
           (*
            U
            (* n (+ t (/ (* (pow l_m 2.0) (- (/ (* n U*) Om) 2.0)) Om))))))))
   (if (<= l_m 4.05e-44)
     t_1
     (if (<= l_m 3.9e-24)
       (* (sqrt (* (* 2.0 n) U)) (sqrt t))
       (if (<= l_m 1.15e+123)
         t_1
         (*
          l_m
          (sqrt
           (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = sqrt((2.0 * (U * (n * (t + ((pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	double tmp;
	if (l_m <= 4.05e-44) {
		tmp = t_1;
	} else if (l_m <= 3.9e-24) {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	} else if (l_m <= 1.15e+123) {
		tmp = t_1;
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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 = sqrt((2.0d0 * (u * (n * (t + (((l_m ** 2.0d0) * (((n * u_42) / om) - 2.0d0)) / om))))))
    if (l_m <= 4.05d-44) then
        tmp = t_1
    else if (l_m <= 3.9d-24) then
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    else if (l_m <= 1.15d+123) then
        tmp = t_1
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 = Math.sqrt((2.0 * (U * (n * (t + ((Math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	double tmp;
	if (l_m <= 4.05e-44) {
		tmp = t_1;
	} else if (l_m <= 3.9e-24) {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	} else if (l_m <= 1.15e+123) {
		tmp = t_1;
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = math.sqrt((2.0 * (U * (n * (t + ((math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))))
	tmp = 0
	if l_m <= 4.05e-44:
		tmp = t_1
	elif l_m <= 3.9e-24:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	elif l_m <= 1.15e+123:
		tmp = t_1
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * U_42_) / Om) - 2.0)) / Om))))))
	tmp = 0.0
	if (l_m <= 4.05e-44)
		tmp = t_1;
	elseif (l_m <= 3.9e-24)
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	elseif (l_m <= 1.15e+123)
		tmp = t_1;
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - 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 = sqrt((2.0 * (U * (n * (t + (((l_m ^ 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	tmp = 0.0;
	if (l_m <= 4.05e-44)
		tmp = t_1;
	elseif (l_m <= 3.9e-24)
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	elseif (l_m <= 1.15e+123)
		tmp = t_1;
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[l$95$m, 4.05e-44], t$95$1, If[LessEqual[l$95$m, 3.9e-24], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.15e+123], t$95$1, N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $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 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\
\mathbf{if}\;l\_m \leq 4.05 \cdot 10^{-44}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;l\_m \leq 3.9 \cdot 10^{-24}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\

\mathbf{elif}\;l\_m \leq 1.15 \cdot 10^{+123}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 4.0499999999999999e-44 or 3.9e-24 < l < 1.14999999999999995e123

    1. Initial program 50.1%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 49.3%

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

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

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

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

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

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

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

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

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

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

    if 4.0499999999999999e-44 < l < 3.9e-24

    1. Initial program 40.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. Simplified40.6%

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow140.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.14999999999999995e123 < l

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 52.8%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.9 \cdot 10^{-24}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+123}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 56.2% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\\ \mathbf{if}\;l\_m \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\_1\right)\right)}\\ \mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;l\_m \leq 1.42 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \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 (+ t (/ (* (pow l_m 2.0) (- (/ (* n U*) Om) 2.0)) Om))))
   (if (<= l_m 4.05e-44)
     (sqrt (* 2.0 (* U (* n t_1))))
     (if (<= l_m 1.35e-25)
       (* (sqrt (* (* 2.0 n) U)) (sqrt t))
       (if (<= l_m 1.42e+122)
         (sqrt (* 2.0 (* n (* U t_1))))
         (*
          l_m
          (sqrt
           (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = t + ((pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om);
	double tmp;
	if (l_m <= 4.05e-44) {
		tmp = sqrt((2.0 * (U * (n * t_1))));
	} else if (l_m <= 1.35e-25) {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	} else if (l_m <= 1.42e+122) {
		tmp = sqrt((2.0 * (n * (U * t_1))));
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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 = t + (((l_m ** 2.0d0) * (((n * u_42) / om) - 2.0d0)) / om)
    if (l_m <= 4.05d-44) then
        tmp = sqrt((2.0d0 * (u * (n * t_1))))
    else if (l_m <= 1.35d-25) then
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    else if (l_m <= 1.42d+122) then
        tmp = sqrt((2.0d0 * (n * (u * t_1))))
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 = t + ((Math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om);
	double tmp;
	if (l_m <= 4.05e-44) {
		tmp = Math.sqrt((2.0 * (U * (n * t_1))));
	} else if (l_m <= 1.35e-25) {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	} else if (l_m <= 1.42e+122) {
		tmp = Math.sqrt((2.0 * (n * (U * t_1))));
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = t + ((math.pow(l_m, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om)
	tmp = 0
	if l_m <= 4.05e-44:
		tmp = math.sqrt((2.0 * (U * (n * t_1))))
	elif l_m <= 1.35e-25:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	elif l_m <= 1.42e+122:
		tmp = math.sqrt((2.0 * (n * (U * t_1))))
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(t + Float64(Float64((l_m ^ 2.0) * Float64(Float64(Float64(n * U_42_) / Om) - 2.0)) / Om))
	tmp = 0.0
	if (l_m <= 4.05e-44)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t_1))));
	elseif (l_m <= 1.35e-25)
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	elseif (l_m <= 1.42e+122)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(U * t_1))));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - 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 = t + (((l_m ^ 2.0) * (((n * U_42_) / Om) - 2.0)) / Om);
	tmp = 0.0;
	if (l_m <= 4.05e-44)
		tmp = sqrt((2.0 * (U * (n * t_1))));
	elseif (l_m <= 1.35e-25)
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	elseif (l_m <= 1.42e+122)
		tmp = sqrt((2.0 * (n * (U * t_1))));
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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[(t + N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 4.05e-44], N[Sqrt[N[(2.0 * N[(U * N[(n * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.35e-25], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision], If[LessEqual[l$95$m, 1.42e+122], N[Sqrt[N[(2.0 * N[(n * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $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 := t + \frac{{l\_m}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\\
\mathbf{if}\;l\_m \leq 4.05 \cdot 10^{-44}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\_1\right)\right)}\\

\mathbf{elif}\;l\_m \leq 1.35 \cdot 10^{-25}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\

\mathbf{elif}\;l\_m \leq 1.42 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\_1\right)\right)}\\

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 47.8%

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

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

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

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

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

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

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

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

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

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

    if 4.0499999999999999e-44 < l < 1.35000000000000008e-25

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow136.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot U\right)}} \cdot \sqrt{t} \]
    12. Applied egg-rr99.7%

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

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

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

    if 1.35000000000000008e-25 < l < 1.42000000000000005e122

    1. Initial program 55.0%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 58.3%

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

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

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

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

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

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

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

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

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

    if 1.42000000000000005e122 < l

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 52.8%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 4.05 \cdot 10^{-44}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{-25}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \mathbf{elif}\;\ell \leq 1.42 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 53.5% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := t - 2 \cdot \frac{{l\_m}^{2}}{Om}\\ \mathbf{if}\;l\_m \leq 1.5 \cdot 10^{+21}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\_1\right)\right)}^{0.5}\\ \mathbf{elif}\;l\_m \leq 7.5 \cdot 10^{+77}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \frac{{l\_m}^{2} \cdot \left(n \cdot \left(U* \cdot \frac{n}{Om} - 2\right)\right)}{Om}\right)}\\ \mathbf{elif}\;l\_m \leq 1.9 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_1\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \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 (- t (* 2.0 (/ (pow l_m 2.0) Om)))))
   (if (<= l_m 1.5e+21)
     (pow (* 2.0 (* (* n U) t_1)) 0.5)
     (if (<= l_m 7.5e+77)
       (sqrt
        (* 2.0 (* U (/ (* (pow l_m 2.0) (* n (- (* U* (/ n Om)) 2.0))) Om))))
       (if (<= l_m 1.9e+122)
         (sqrt (* (* 2.0 n) (* U t_1)))
         (*
          l_m
          (sqrt
           (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 = t - (2.0 * (pow(l_m, 2.0) / Om));
	double tmp;
	if (l_m <= 1.5e+21) {
		tmp = pow((2.0 * ((n * U) * t_1)), 0.5);
	} else if (l_m <= 7.5e+77) {
		tmp = sqrt((2.0 * (U * ((pow(l_m, 2.0) * (n * ((U_42_ * (n / Om)) - 2.0))) / Om))));
	} else if (l_m <= 1.9e+122) {
		tmp = sqrt(((2.0 * n) * (U * t_1)));
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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 = t - (2.0d0 * ((l_m ** 2.0d0) / om))
    if (l_m <= 1.5d+21) then
        tmp = (2.0d0 * ((n * u) * t_1)) ** 0.5d0
    else if (l_m <= 7.5d+77) then
        tmp = sqrt((2.0d0 * (u * (((l_m ** 2.0d0) * (n * ((u_42 * (n / om)) - 2.0d0))) / om))))
    else if (l_m <= 1.9d+122) then
        tmp = sqrt(((2.0d0 * n) * (u * t_1)))
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 = t - (2.0 * (Math.pow(l_m, 2.0) / Om));
	double tmp;
	if (l_m <= 1.5e+21) {
		tmp = Math.pow((2.0 * ((n * U) * t_1)), 0.5);
	} else if (l_m <= 7.5e+77) {
		tmp = Math.sqrt((2.0 * (U * ((Math.pow(l_m, 2.0) * (n * ((U_42_ * (n / Om)) - 2.0))) / Om))));
	} else if (l_m <= 1.9e+122) {
		tmp = Math.sqrt(((2.0 * n) * (U * t_1)));
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	t_1 = t - (2.0 * (math.pow(l_m, 2.0) / Om))
	tmp = 0
	if l_m <= 1.5e+21:
		tmp = math.pow((2.0 * ((n * U) * t_1)), 0.5)
	elif l_m <= 7.5e+77:
		tmp = math.sqrt((2.0 * (U * ((math.pow(l_m, 2.0) * (n * ((U_42_ * (n / Om)) - 2.0))) / Om))))
	elif l_m <= 1.9e+122:
		tmp = math.sqrt(((2.0 * n) * (U * t_1)))
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (2.0 / Om)))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om)))
	tmp = 0.0
	if (l_m <= 1.5e+21)
		tmp = Float64(2.0 * Float64(Float64(n * U) * t_1)) ^ 0.5;
	elseif (l_m <= 7.5e+77)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(Float64((l_m ^ 2.0) * Float64(n * Float64(Float64(U_42_ * Float64(n / Om)) - 2.0))) / Om))));
	elseif (l_m <= 1.9e+122)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t_1)));
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - 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 = t - (2.0 * ((l_m ^ 2.0) / Om));
	tmp = 0.0;
	if (l_m <= 1.5e+21)
		tmp = (2.0 * ((n * U) * t_1)) ^ 0.5;
	elseif (l_m <= 7.5e+77)
		tmp = sqrt((2.0 * (U * (((l_m ^ 2.0) * (n * ((U_42_ * (n / Om)) - 2.0))) / Om))));
	elseif (l_m <= 1.9e+122)
		tmp = sqrt(((2.0 * n) * (U * t_1)));
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l$95$m, 1.5e+21], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 7.5e+77], N[Sqrt[N[(2.0 * N[(U * N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(n * N[(N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.9e+122], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $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 := t - 2 \cdot \frac{{l\_m}^{2}}{Om}\\
\mathbf{if}\;l\_m \leq 1.5 \cdot 10^{+21}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\_1\right)\right)}^{0.5}\\

\mathbf{elif}\;l\_m \leq 7.5 \cdot 10^{+77}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \frac{{l\_m}^{2} \cdot \left(n \cdot \left(U* \cdot \frac{n}{Om} - 2\right)\right)}{Om}\right)}\\

\mathbf{elif}\;l\_m \leq 1.9 \cdot 10^{+122}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\_1\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 1.5e21

    1. Initial program 49.1%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow153.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e21 < l < 7.49999999999999955e77

    1. Initial program 55.4%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 55.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.49999999999999955e77 < l < 1.8999999999999999e122

    1. Initial program 57.8%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 72.2%

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

    if 1.8999999999999999e122 < l

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 52.8%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+21}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+77}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* \cdot \frac{n}{Om} - 2\right)\right)}{Om}\right)}\\ \mathbf{elif}\;\ell \leq 1.9 \cdot 10^{+122}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 3.6 \cdot 10^{+110}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 3.6e+110)
   (pow (* 2.0 (* (* n U) (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5)
   (*
    l_m
    (sqrt (* 2.0 (* (* n U) (- (/ (* n U*) (pow Om 2.0)) (/ 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 <= 3.6e+110) {
		tmp = pow((2.0 * ((n * U) * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
	} else {
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / pow(Om, 2.0)) - (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 <= 3.6d+110) then
        tmp = (2.0d0 * ((n * u) * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))) ** 0.5d0
    else
        tmp = l_m * sqrt((2.0d0 * ((n * u) * (((n * u_42) / (om ** 2.0d0)) - (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 <= 3.6e+110) {
		tmp = Math.pow((2.0 * ((n * U) * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
	} else {
		tmp = l_m * Math.sqrt((2.0 * ((n * U) * (((n * U_42_) / Math.pow(Om, 2.0)) - (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 <= 3.6e+110:
		tmp = math.pow((2.0 * ((n * U) * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5)
	else:
		tmp = l_m * math.sqrt((2.0 * ((n * U) * (((n * U_42_) / math.pow(Om, 2.0)) - (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 <= 3.6e+110)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5;
	else
		tmp = Float64(l_m * sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) - Float64(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 <= 3.6e+110)
		tmp = (2.0 * ((n * U) * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5;
	else
		tmp = l_m * sqrt((2.0 * ((n * U) * (((n * U_42_) / (Om ^ 2.0)) - (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, 3.6e+110], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(l$95$m * N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 50.2%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow153.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5999999999999997e110 < l

    1. Initial program 13.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. Simplified24.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 55.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)} \]
    5. Step-by-step derivation
      1. *-commutative55.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.6 \cdot 10^{+110}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(\frac{n \cdot U*}{{Om}^{2}} - \frac{2}{Om}\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 43.9% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 3.6 \cdot 10^{+109}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;l\_m \leq 6.2 \cdot 10^{+155}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{n \cdot {l\_m}^{2}}{Om}\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 3.6e+109)
   (sqrt (fabs (* (* (* 2.0 n) U) t)))
   (if (<= l_m 6.2e+155)
     (sqrt (* 2.0 (* U (* -2.0 (/ (* n (pow l_m 2.0)) Om)))))
     (* (* 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 <= 3.6e+109) {
		tmp = sqrt(fabs((((2.0 * n) * U) * t)));
	} else if (l_m <= 6.2e+155) {
		tmp = sqrt((2.0 * (U * (-2.0 * ((n * pow(l_m, 2.0)) / Om)))));
	} 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 <= 3.6d+109) then
        tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
    else if (l_m <= 6.2d+155) then
        tmp = sqrt((2.0d0 * (u * ((-2.0d0) * ((n * (l_m ** 2.0d0)) / om)))))
    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 <= 3.6e+109) {
		tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
	} else if (l_m <= 6.2e+155) {
		tmp = Math.sqrt((2.0 * (U * (-2.0 * ((n * Math.pow(l_m, 2.0)) / Om)))));
	} 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 <= 3.6e+109:
		tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t)))
	elif l_m <= 6.2e+155:
		tmp = math.sqrt((2.0 * (U * (-2.0 * ((n * math.pow(l_m, 2.0)) / Om)))))
	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 <= 3.6e+109)
		tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t)));
	elseif (l_m <= 6.2e+155)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(-2.0 * Float64(Float64(n * (l_m ^ 2.0)) / Om)))));
	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 <= 3.6e+109)
		tmp = sqrt(abs((((2.0 * n) * U) * t)));
	elseif (l_m <= 6.2e+155)
		tmp = sqrt((2.0 * (U * (-2.0 * ((n * (l_m ^ 2.0)) / Om)))));
	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, 3.6e+109], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 6.2e+155], N[Sqrt[N[(2.0 * N[(U * N[(-2.0 * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $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 3.6 \cdot 10^{+109}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\

\mathbf{elif}\;l\_m \leq 6.2 \cdot 10^{+155}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{n \cdot {l\_m}^{2}}{Om}\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 3 regimes
  2. if l < 3.6e109

    1. Initial program 50.2%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow153.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.6e109 < l < 6.19999999999999978e155

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow139.7%

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

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

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

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

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

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

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

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

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

    if 6.19999999999999978e155 < l

    1. Initial program 5.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. Simplified20.2%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 49.6%

      \[\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)} \]
    5. Step-by-step derivation
      1. *-commutative49.6%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 3.6 \cdot 10^{+109}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+155}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(-2 \cdot \frac{n \cdot {\ell}^{2}}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 49.3% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 6.5 \cdot 10^{+153}:\\ \;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\ \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 6.5e+153)
   (pow (* 2.0 (* (* n U) (- t (* 2.0 (/ (pow l_m 2.0) Om))))) 0.5)
   (* (* 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 <= 6.5e+153) {
		tmp = pow((2.0 * ((n * U) * (t - (2.0 * (pow(l_m, 2.0) / Om))))), 0.5);
	} 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 <= 6.5d+153) then
        tmp = (2.0d0 * ((n * u) * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))) ** 0.5d0
    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 <= 6.5e+153) {
		tmp = Math.pow((2.0 * ((n * U) * (t - (2.0 * (Math.pow(l_m, 2.0) / Om))))), 0.5);
	} 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 <= 6.5e+153:
		tmp = math.pow((2.0 * ((n * U) * (t - (2.0 * (math.pow(l_m, 2.0) / Om))))), 0.5)
	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 <= 6.5e+153)
		tmp = Float64(2.0 * Float64(Float64(n * U) * Float64(t - Float64(2.0 * Float64((l_m ^ 2.0) / Om))))) ^ 0.5;
	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 <= 6.5e+153)
		tmp = (2.0 * ((n * U) * (t - (2.0 * ((l_m ^ 2.0) / Om))))) ^ 0.5;
	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, 6.5e+153], N[Power[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $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 6.5 \cdot 10^{+153}:\\
\;\;\;\;{\left(2 \cdot \left(\left(n \cdot U\right) \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}^{0.5}\\

\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 2 regimes
  2. if l < 6.49999999999999972e153

    1. Initial program 50.0%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow153.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.49999999999999972e153 < l

    1. Initial program 5.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. Simplified19.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 51.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)} \]
    5. Step-by-step derivation
      1. *-commutative51.4%

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

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

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

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

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

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

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

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

Alternative 10: 48.1% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 6.5 \cdot 10^{+153}:\\ \;\;\;\;\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 \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 6.5e+153)
   (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l_m 2.0) Om)))))))
   (* (* 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 <= 6.5e+153) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l_m, 2.0) / Om)))))));
	} 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 <= 6.5d+153) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l_m ** 2.0d0) / om)))))))
    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 <= 6.5e+153) {
		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.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 <= 6.5e+153:
		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.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 <= 6.5e+153)
		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)) * 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 <= 6.5e+153)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l_m ^ 2.0) / Om)))))));
	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, 6.5e+153], 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[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 6.5 \cdot 10^{+153}:\\
\;\;\;\;\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 \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\


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

    1. Initial program 50.0%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 41.7%

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

    if 6.49999999999999972e153 < l

    1. Initial program 5.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. Simplified19.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 51.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)} \]
    5. Step-by-step derivation
      1. *-commutative51.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 6.5 \cdot 10^{+153}:\\ \;\;\;\;\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 \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 47.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.5 \cdot 10^{+152}:\\ \;\;\;\;\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 \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 1.5e+152)
   (sqrt (* (* 2.0 n) (* U (- t (* 2.0 (/ (pow l_m 2.0) Om))))))
   (* (* 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 <= 1.5e+152) {
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * (pow(l_m, 2.0) / Om))))));
	} 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 <= 1.5d+152) then
        tmp = sqrt(((2.0d0 * n) * (u * (t - (2.0d0 * ((l_m ** 2.0d0) / om))))))
    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 <= 1.5e+152) {
		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.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 <= 1.5e+152:
		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.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 <= 1.5e+152)
		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)) * 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 <= 1.5e+152)
		tmp = sqrt(((2.0 * n) * (U * (t - (2.0 * ((l_m ^ 2.0) / Om))))));
	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, 1.5e+152], 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[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 1.5 \cdot 10^{+152}:\\
\;\;\;\;\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 \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\


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

    1. Initial program 50.0%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Taylor expanded in n around 0 42.1%

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

    if 1.49999999999999995e152 < l

    1. Initial program 5.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. Simplified19.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 51.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)} \]
    5. Step-by-step derivation
      1. *-commutative51.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+152}:\\ \;\;\;\;\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 \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 41.6% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -1.3 \cdot 10^{-160}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;U \leq 1.06 \cdot 10^{-303}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot {\left(n \cdot t\right)}^{0.5}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U -1.3e-160)
   (sqrt (fabs (* (* (* 2.0 n) U) t)))
   (if (<= U 1.06e-303)
     (sqrt (* 2.0 (* U (* n t))))
     (* (sqrt (* 2.0 U)) (pow (* n 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 <= -1.3e-160) {
		tmp = sqrt(fabs((((2.0 * n) * U) * t)));
	} else if (U <= 1.06e-303) {
		tmp = sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = sqrt((2.0 * U)) * pow((n * 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 <= (-1.3d-160)) then
        tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
    else if (u <= 1.06d-303) then
        tmp = sqrt((2.0d0 * (u * (n * t))))
    else
        tmp = sqrt((2.0d0 * u)) * ((n * 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 <= -1.3e-160) {
		tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
	} else if (U <= 1.06e-303) {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	} else {
		tmp = Math.sqrt((2.0 * U)) * Math.pow((n * t), 0.5);
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= -1.3e-160:
		tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t)))
	elif U <= 1.06e-303:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	else:
		tmp = math.sqrt((2.0 * U)) * math.pow((n * t), 0.5)
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= -1.3e-160)
		tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t)));
	elseif (U <= 1.06e-303)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * t))));
	else
		tmp = Float64(sqrt(Float64(2.0 * U)) * (Float64(n * 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 <= -1.3e-160)
		tmp = sqrt(abs((((2.0 * n) * U) * t)));
	elseif (U <= 1.06e-303)
		tmp = sqrt((2.0 * (U * (n * t))));
	else
		tmp = sqrt((2.0 * U)) * ((n * 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, -1.3e-160], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 1.06e-303], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision] * N[Power[N[(n * t), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;U \leq 1.06 \cdot 10^{-303}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -1.30000000000000002e-160

    1. Initial program 45.8%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow149.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.30000000000000002e-160 < U < 1.06000000000000001e-303

    1. Initial program 35.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. Simplified52.8%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 38.5%

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

    if 1.06000000000000001e-303 < U

    1. Initial program 48.4%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow148.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.3 \cdot 10^{-160}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;U \leq 1.06 \cdot 10^{-303}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot {\left(n \cdot t\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 40.9% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -3 \cdot 10^{-160}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;U \leq 3.8 \cdot 10^{-304}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\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 -3e-160)
   (sqrt (fabs (* (* (* 2.0 n) U) t)))
   (if (<= U 3.8e-304)
     (sqrt (* 2.0 (* U (* n 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 <= -3e-160) {
		tmp = sqrt(fabs((((2.0 * n) * U) * t)));
	} else if (U <= 3.8e-304) {
		tmp = sqrt((2.0 * (U * (n * 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 <= (-3d-160)) then
        tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
    else if (u <= 3.8d-304) then
        tmp = sqrt((2.0d0 * (u * (n * 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 <= -3e-160) {
		tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
	} else if (U <= 3.8e-304) {
		tmp = Math.sqrt((2.0 * (U * (n * 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 <= -3e-160:
		tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t)))
	elif U <= 3.8e-304:
		tmp = math.sqrt((2.0 * (U * (n * 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 <= -3e-160)
		tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t)));
	elseif (U <= 3.8e-304)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * 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 <= -3e-160)
		tmp = sqrt(abs((((2.0 * n) * U) * t)));
	elseif (U <= 3.8e-304)
		tmp = sqrt((2.0 * (U * (n * 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, -3e-160], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[U, 3.8e-304], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $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 -3 \cdot 10^{-160}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\

\mathbf{elif}\;U \leq 3.8 \cdot 10^{-304}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U < -2.99999999999999997e-160

    1. Initial program 45.8%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow149.2%

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
    11. Step-by-step derivation
      1. add-sqr-sqrt35.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.99999999999999997e-160 < U < 3.79999999999999961e-304

    1. Initial program 35.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. Simplified52.8%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 38.5%

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

    if 3.79999999999999961e-304 < U

    1. Initial program 48.4%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 31.7%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -3 \cdot 10^{-160}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{elif}\;U \leq 3.8 \cdot 10^{-304}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 43.3% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 1.05 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\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 1.05e+111)
   (sqrt (fabs (* (* (* 2.0 n) U) t)))
   (* (* 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 <= 1.05e+111) {
		tmp = sqrt(fabs((((2.0 * n) * U) * t)));
	} 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 <= 1.05d+111) then
        tmp = sqrt(abs((((2.0d0 * n) * u) * t)))
    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 <= 1.05e+111) {
		tmp = Math.sqrt(Math.abs((((2.0 * n) * U) * t)));
	} 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 <= 1.05e+111:
		tmp = math.sqrt(math.fabs((((2.0 * n) * U) * t)))
	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 <= 1.05e+111)
		tmp = sqrt(abs(Float64(Float64(Float64(2.0 * n) * U) * t)));
	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 <= 1.05e+111)
		tmp = sqrt(abs((((2.0 * n) * U) * t)));
	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, 1.05e+111], N[Sqrt[N[Abs[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $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 1.05 \cdot 10^{+111}:\\
\;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\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 2 regimes
  2. if l < 1.04999999999999997e111

    1. Initial program 50.2%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow153.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.04999999999999997e111 < l

    1. Initial program 13.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. Simplified24.6%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 55.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)} \]
    5. Step-by-step derivation
      1. *-commutative55.4%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.05 \cdot 10^{+111}:\\ \;\;\;\;\sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 38.0% accurate, 1.1× speedup?

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

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

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

    \[\leadsto \color{blue}{\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)}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. pow149.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\color{blue}{\left(\left(2 \cdot U\right) \cdot n\right) \cdot t}} \]
  11. Step-by-step derivation
    1. add-sqr-sqrt32.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \sqrt{\left|\left(\left(2 \cdot n\right) \cdot U\right) \cdot t\right|} \]
  16. Add Preprocessing

Alternative 16: 37.2% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -1.85 \cdot 10^{-159}:\\ \;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U -1.85e-159)
   (pow (* 2.0 (* t (* n U))) 0.5)
   (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_) {
	double tmp;
	if (U <= -1.85e-159) {
		tmp = pow((2.0 * (t * (n * U))), 0.5);
	} else {
		tmp = sqrt((2.0 * (U * (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.85d-159)) then
        tmp = (2.0d0 * (t * (n * u))) ** 0.5d0
    else
        tmp = sqrt((2.0d0 * (u * (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.85e-159) {
		tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
	} else {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= -1.85e-159:
		tmp = math.pow((2.0 * (t * (n * U))), 0.5)
	else:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= -1.85e-159)
		tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5;
	else
		tmp = sqrt(Float64(2.0 * Float64(U * 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.85e-159)
		tmp = (2.0 * (t * (n * U))) ^ 0.5;
	else
		tmp = sqrt((2.0 * (U * (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.85e-159], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 45.1%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 30.0%

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

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

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

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

    if -1.8499999999999999e-159 < U

    1. Initial program 45.1%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 33.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.85 \cdot 10^{-159}:\\ \;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 37.2% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;U \leq -1.02 \cdot 10^{-159}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= U -1.02e-159)
   (pow (* t (* 2.0 (* n U))) 0.5)
   (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_) {
	double tmp;
	if (U <= -1.02e-159) {
		tmp = pow((t * (2.0 * (n * U))), 0.5);
	} else {
		tmp = sqrt((2.0 * (U * (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.02d-159)) then
        tmp = (t * (2.0d0 * (n * u))) ** 0.5d0
    else
        tmp = sqrt((2.0d0 * (u * (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.02e-159) {
		tmp = Math.pow((t * (2.0 * (n * U))), 0.5);
	} else {
		tmp = Math.sqrt((2.0 * (U * (n * t))));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if U <= -1.02e-159:
		tmp = math.pow((t * (2.0 * (n * U))), 0.5)
	else:
		tmp = math.sqrt((2.0 * (U * (n * t))))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (U <= -1.02e-159)
		tmp = Float64(t * Float64(2.0 * Float64(n * U))) ^ 0.5;
	else
		tmp = sqrt(Float64(2.0 * Float64(U * 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.02e-159)
		tmp = (t * (2.0 * (n * U))) ^ 0.5;
	else
		tmp = sqrt((2.0 * (U * (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.02e-159], N[Power[N[(t * N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 45.1%

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

      \[\leadsto \color{blue}{\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)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. pow148.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.02e-159 < U

    1. Initial program 45.1%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 33.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -1.02 \cdot 10^{-159}:\\ \;\;\;\;{\left(t \cdot \left(2 \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 18: 36.1% 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 45.1%

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

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot \left(U \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)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 32.3%

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

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

Reproduce

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