Toniolo and Linder, Equation (13)

Percentage Accurate: 50.2% → 64.5%
Time: 28.0s
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: 50.2% accurate, 1.0× speedup?

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

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

Alternative 1: 64.5% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l\_m \cdot \frac{l\_m}{Om}\\ t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\ t_4 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, n \cdot \left(t\_2 \cdot \left(-U*\right)\right)\right)\right)\right)}\\ t_5 := \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\_5 \leq 10^{-252}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_5 \leq 10^{+295}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\ \mathbf{elif}\;t\_5 \leq \infty:\\ \;\;\;\;t\_4\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* l_m (/ l_m Om)))
        (t_2 (pow (/ l_m Om) 2.0))
        (t_3 (* (* n t_2) (- U* U)))
        (t_4
         (sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* n (* t_2 (- U*)))))))))
        (t_5 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
   (if (<= t_5 1e-252)
     t_4
     (if (<= t_5 1e+295)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
       (if (<= t_5 INFINITY)
         t_4
         (*
          (sqrt (* U (* n (- (/ (* n (- U* U)) (pow Om 2.0)) (/ 2.0 Om)))))
          (* l_m (sqrt 2.0))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = l_m * (l_m / Om);
	double t_2 = pow((l_m / Om), 2.0);
	double t_3 = (n * t_2) * (U_42_ - U);
	double t_4 = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, (n * (t_2 * -U_42_)))))));
	double t_5 = ((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_3);
	double tmp;
	if (t_5 <= 1e-252) {
		tmp = t_4;
	} else if (t_5 <= 1e+295) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
	} else if (t_5 <= ((double) INFINITY)) {
		tmp = t_4;
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) - (2.0 / Om))))) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	t_2 = Float64(l_m / Om) ^ 2.0
	t_3 = Float64(Float64(n * t_2) * Float64(U_42_ - U))
	t_4 = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(n * Float64(t_2 * Float64(-U_42_))))))))
	t_5 = 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_5 <= 1e-252)
		tmp = t_4;
	elseif (t_5 <= 1e+295)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1)))));
	elseif (t_5 <= Inf)
		tmp = t_4;
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) - Float64(2.0 / Om))))) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(n * N[(t$95$2 * (-U$42$)), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$5 = 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$5, 1e-252], t$95$4, If[LessEqual[t$95$5, 1e+295], 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], If[LessEqual[t$95$5, Infinity], t$95$4, N[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \cdot \left(U* - U\right)\\
t_4 := \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, n \cdot \left(t\_2 \cdot \left(-U*\right)\right)\right)\right)\right)}\\
t_5 := \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\_5 \leq 10^{-252}:\\
\;\;\;\;t\_4\\

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

\mathbf{elif}\;t\_5 \leq \infty:\\
\;\;\;\;t\_4\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.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.99999999999999943e-253 or 9.9999999999999998e294 < (*.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*)))) < +inf.0

    1. Initial program 27.0%

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

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

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

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

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

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

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

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

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

    if 9.99999999999999943e-253 < (*.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.9999999999999998e294

    1. Initial program 97.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. Simplified97.2%

      \[\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 +inf.0 < (*.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 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified7.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. Step-by-step derivation
      1. add-sqr-sqrt0.4%

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(n, \color{blue}{{\left(\frac{\ell}{Om} \cdot \sqrt{U* - U}\right)}^{2}}, \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)\right)} \]
    6. Taylor expanded in l around inf 28.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)} \]
    7. Step-by-step derivation
      1. associate-*r/28.8%

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

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

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

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

Alternative 2: 60.5% accurate, 0.3× 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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\ \mathbf{if}\;t\_2 \leq 10^{-126}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + -2 \cdot \frac{U \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t + \frac{\left(U \cdot {l\_m}^{2}\right) \cdot \left(n \cdot \frac{U* - U}{Om}\right)}{Om}\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_2
         (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
   (if (<= t_2 1e-126)
     (sqrt (* 2.0 (* n (+ (* U t) (* -2.0 (/ (* U (* l_m l_m)) Om))))))
     (if (<= t_2 INFINITY)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
       (sqrt
        (*
         (* 2.0 n)
         (+ (* U t) (/ (* (* U (pow l_m 2.0)) (* n (/ (- U* U) Om))) 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_2 <= 1e-126) {
		tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = sqrt(((2.0 * n) * ((U * t) + (((U * pow(l_m, 2.0)) * (n * ((U_42_ - U) / Om))) / Om))));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (n * Math.pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_2 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_2 <= 1e-126) {
		tmp = Math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * ((U * t) + (((U * Math.pow(l_m, 2.0)) * (n * ((U_42_ - U) / Om))) / 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 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)))
	tmp = 0
	if t_2 <= 1e-126:
		tmp = math.sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))))
	elif t_2 <= math.inf:
		tmp = math.sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))))
	else:
		tmp = math.sqrt(((2.0 * n) * ((U * t) + (((U * math.pow(l_m, 2.0)) * (n * ((U_42_ - U) / Om))) / 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 = sqrt(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-126)
		tmp = sqrt(Float64(2.0 * Float64(n * Float64(Float64(U * t) + Float64(-2.0 * Float64(Float64(U * Float64(l_m * l_m)) / Om))))));
	elseif (t_2 <= Inf)
		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 = sqrt(Float64(Float64(2.0 * n) * Float64(Float64(U * t) + Float64(Float64(Float64(U * (l_m ^ 2.0)) * Float64(n * Float64(Float64(U_42_ - U) / Om))) / 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 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	tmp = 0.0;
	if (t_2 <= 1e-126)
		tmp = sqrt((2.0 * (n * ((U * t) + (-2.0 * ((U * (l_m * l_m)) / Om))))));
	elseif (t_2 <= Inf)
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	else
		tmp = sqrt(((2.0 * n) * ((U * t) + (((U * (l_m ^ 2.0)) * (n * ((U_42_ - U) / Om))) / 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[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 1e-126], N[Sqrt[N[(2.0 * N[(n * N[(N[(U * t), $MachinePrecision] + N[(-2.0 * N[(N[(U * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], 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[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(N[(U * t), $MachinePrecision] + N[(N[(N[(U * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $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 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_2 \leq 10^{-126}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t + -2 \cdot \frac{U \cdot \left(l\_m \cdot l\_m\right)}{Om}\right)\right)}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\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}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t + \frac{\left(U \cdot {l\_m}^{2}\right) \cdot \left(n \cdot \frac{U* - U}{Om}\right)}{Om}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.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.9999999999999995e-127

    1. Initial program 26.0%

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

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

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

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

    if 9.9999999999999995e-127 < (sqrt.f64 (*.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*))))) < +inf.0

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

      \[\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 +inf.0 < (sqrt.f64 (*.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 0.0%

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

      \[\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 Om around -inf 17.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 64.3% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := l\_m \cdot \frac{l\_m}{Om}\\ t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\ t_3 := \left(n \cdot t\_2\right) \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^{-252}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, n \cdot \left(U \cdot t\_2\right)\right)\right)\right)}\\ \mathbf{elif}\;t\_4 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_3 - 2 \cdot t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* l_m (/ l_m Om)))
        (t_2 (pow (/ l_m Om) 2.0))
        (t_3 (* (* n t_2) (- U* U)))
        (t_4 (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_3))))
   (if (<= t_4 1e-252)
     (sqrt (* (* 2.0 n) (* U (- t (fma 2.0 t_1 (* n (* U t_2)))))))
     (if (<= t_4 INFINITY)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_3 (* 2.0 t_1)))))
       (*
        (sqrt (* U (* n (- (/ (* n (- U* U)) (pow Om 2.0)) (/ 2.0 Om)))))
        (* l_m (sqrt 2.0)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = l_m * (l_m / Om);
	double t_2 = pow((l_m / Om), 2.0);
	double t_3 = (n * 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-252) {
		tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, t_1, (n * (U * t_2)))))));
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_3 - (2.0 * t_1)))));
	} else {
		tmp = sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) - (2.0 / Om))))) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(l_m * Float64(l_m / Om))
	t_2 = Float64(l_m / Om) ^ 2.0
	t_3 = Float64(Float64(n * 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-252)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, t_1, Float64(n * Float64(U * t_2)))))));
	elseif (t_4 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(t_3 - Float64(2.0 * t_1)))));
	else
		tmp = Float64(sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) - Float64(2.0 / Om))))) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$3 = N[(N[(n * t$95$2), $MachinePrecision] * 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-252], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * t$95$1 + N[(n * N[(U * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$4, Infinity], 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[(N[Sqrt[N[(U * N[(n * N[(N[(N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] - N[(2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

\\
\begin{array}{l}
t_1 := l\_m \cdot \frac{l\_m}{Om}\\
t_2 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
t_3 := \left(n \cdot t\_2\right) \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^{-252}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, t\_1, n \cdot \left(U \cdot t\_2\right)\right)\right)\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.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.99999999999999943e-253

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

      \[\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 U around inf 41.7%

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

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

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

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

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

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

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

    if 9.99999999999999943e-253 < (*.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*)))) < +inf.0

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

      \[\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 +inf.0 < (*.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 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified7.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. Step-by-step derivation
      1. add-sqr-sqrt0.4%

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(n, \color{blue}{{\left(\frac{\ell}{Om} \cdot \sqrt{U* - U}\right)}^{2}}, \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)\right)} \]
    6. Taylor expanded in l around inf 28.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)} \]
    7. Step-by-step derivation
      1. associate-*r/28.8%

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

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

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

    \[\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^{-252}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(U \cdot {\left(\frac{\ell}{Om}\right)}^{2}\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 \infty:\\ \;\;\;\;\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}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

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

\\
\begin{array}{l}
t_1 := \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 0:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\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}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.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*)))) < 0.0

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.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*)))) < +inf.0

    1. Initial program 66.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. Simplified69.3%

      \[\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 +inf.0 < (*.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 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified7.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. Step-by-step derivation
      1. add-sqr-sqrt0.4%

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \mathsf{fma}\left(n, \color{blue}{{\left(\frac{\ell}{Om} \cdot \sqrt{U* - U}\right)}^{2}}, \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)\right)} \]
    6. Taylor expanded in l around inf 28.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)} \]
    7. Step-by-step derivation
      1. associate-*r/28.8%

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

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

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

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

Alternative 5: 63.7% accurate, 0.4× 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 0:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\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}:\\ \;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(n \cdot \frac{U* - 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 0.0)
     (sqrt (fabs (* 2.0 (* n (* U t)))))
     (if (<= t_2 INFINITY)
       (sqrt (* (* 2.0 (* n U)) (+ t (- t_1 (* 2.0 (* l_m (/ l_m Om)))))))
       (*
        (* l_m (sqrt 2.0))
        (sqrt (* U (* n (- (* n (/ (- U* 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 <= 0.0) {
		tmp = sqrt(fabs((2.0 * (n * (U * t)))));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((n * ((U_42_ - U) / pow(Om, 2.0))) - (2.0 / Om)))));
	}
	return tmp;
}
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = (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 <= 0.0) {
		tmp = Math.sqrt(Math.abs((2.0 * (n * (U * t)))));
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		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)) * Math.sqrt((U * (n * ((n * ((U_42_ - U) / 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 <= 0.0:
		tmp = math.sqrt(math.fabs((2.0 * (n * (U * t)))))
	elif t_2 <= math.inf:
		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)) * math.sqrt((U * (n * ((n * ((U_42_ - U) / 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 <= 0.0)
		tmp = sqrt(abs(Float64(2.0 * Float64(n * Float64(U * t)))));
	elseif (t_2 <= Inf)
		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(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(n * Float64(Float64(U_42_ - U) / (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 <= 0.0)
		tmp = sqrt(abs((2.0 * (n * (U * t)))));
	elseif (t_2 <= Inf)
		tmp = sqrt(((2.0 * (n * U)) * (t + (t_1 - (2.0 * (l_m * (l_m / Om)))))));
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * ((n * ((U_42_ - U) / (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, 0.0], N[Sqrt[N[Abs[N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], 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[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(n * N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $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 0:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(n \cdot \left(U \cdot t\right)\right)\right|}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\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}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(n \cdot \frac{U* - 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*)))) < 0.0

    1. Initial program 13.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (*.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*)))) < +inf.0

    1. Initial program 66.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. Simplified69.3%

      \[\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 +inf.0 < (*.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 0.0%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified7.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 28.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. associate-/l*26.9%

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

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

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

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

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

Alternative 6: 53.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if Om < -3.40000000000000017e-52

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

      \[\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
    4. Step-by-step derivation
      1. associate-*r*59.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.40000000000000017e-52 < Om < 1.6499999999999999e95

    1. Initial program 41.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. Simplified46.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. Taylor expanded in Om around -inf 50.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.6499999999999999e95 < Om

    1. Initial program 46.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. Simplified55.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 n around 0 47.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.2% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if n < -0.0027000000000000001

    1. Initial program 48.3%

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

      \[\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 Om around -inf 36.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -0.0027000000000000001 < n < 1.6999999999999999e-81

    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. Simplified57.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 n around 0 52.2%

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

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

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

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

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

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

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

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

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

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

    if 1.6999999999999999e-81 < n

    1. Initial program 41.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. Simplified47.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. Taylor expanded in Om around -inf 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 53.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -2.65 \cdot 10^{-5} \lor \neg \left(n \leq 1.3 \cdot 10^{-78}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \left({l\_m}^{2} \cdot \frac{n}{Om}\right)}{Om}\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -2.65e-5 or 1.3000000000000001e-78 < n

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

      \[\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 Om around -inf 38.0%

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65e-5 < n < 1.3000000000000001e-78

    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. Simplified57.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 n around 0 52.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 51.5% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.7 \cdot 10^{+62} \lor \neg \left(Om \leq 4 \cdot 10^{+84}\right):\\
\;\;\;\;\sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot \left(t - \frac{l\_m}{Om} \cdot \left(2 \cdot l\_m\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.70000000000000007e62 or 4.00000000000000023e84 < Om

    1. Initial program 47.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. Simplified55.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 n around 0 47.4%

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

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

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

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

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

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

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

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

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

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

    if -1.70000000000000007e62 < Om < 4.00000000000000023e84

    1. Initial program 46.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. Simplified51.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. Taylor expanded in Om around -inf 52.6%

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

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

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

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

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

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

Alternative 10: 47.9% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 52.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. Simplified58.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 50.6%

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

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

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

    if 3.89999999999999989e-17 < l < 8.3999999999999996e136

    1. Initial program 44.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. Simplified48.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. Taylor expanded in Om around -inf 49.0%

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

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

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

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

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

    if 8.3999999999999996e136 < l

    1. Initial program 21.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. Simplified29.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 17.1%

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

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

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

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

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

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

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

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

Alternative 11: 45.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 52.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. Simplified58.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 50.6%

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

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

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

    if 5.99999999999999966e-18 < l < 6.0999999999999998e153

    1. Initial program 47.2%

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

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

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

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

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

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

    if 6.0999999999999998e153 < l

    1. Initial program 14.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 46.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.85000000000000002e76

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

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

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

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

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

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

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

    if -2.85000000000000002e76 < t < 6.10000000000000014e203

    1. Initial program 46.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. Simplified55.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. Taylor expanded in Om around -inf 48.4%

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

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

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

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

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

    if 6.10000000000000014e203 < t

    1. Initial program 34.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. Simplified43.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 0 47.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 45.8% accurate, 1.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{+76} \lor \neg \left(t \leq 4.5 \cdot 10^{+184}\right):\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.99999999999999991e76 or 4.50000000000000036e184 < t

    1. Initial program 44.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. Simplified46.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 0 54.5%

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

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

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

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

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

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

    if -4.99999999999999991e76 < t < 4.50000000000000036e184

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

      \[\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 Om around -inf 47.6%

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

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

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

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

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

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

Alternative 14: 43.4% accurate, 1.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.75e227

    1. Initial program 54.4%

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

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

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

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

    if -1.75e227 < t < 2.09999999999999986e188

    1. Initial program 49.0%

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

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

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

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

    if 2.09999999999999986e188 < t

    1. Initial program 31.7%

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

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

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

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

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

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

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

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

Alternative 15: 37.3% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 50.3%

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

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

    if 5.80000000000000041e-156 < l

    1. Initial program 41.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. Simplified45.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 25.1%

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

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

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

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

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

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

Alternative 16: 35.7% accurate, 2.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l\_m \leq 8.6 \cdot 10^{-156}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (if (<= l_m 8.6e-156)
   (sqrt (* (* 2.0 n) (* U t)))
   (sqrt (* (* n t) (* 2.0 U)))))
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 <= 8.6e-156) {
		tmp = sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = sqrt(((n * t) * (2.0 * U)));
	}
	return tmp;
}
l_m = abs(l)
real(8) function code(n, u, t, l_m, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l_m
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: tmp
    if (l_m <= 8.6d-156) then
        tmp = sqrt(((2.0d0 * n) * (u * t)))
    else
        tmp = sqrt(((n * t) * (2.0d0 * u)))
    end if
    code = tmp
end function
l_m = Math.abs(l);
public static double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 8.6e-156) {
		tmp = Math.sqrt(((2.0 * n) * (U * t)));
	} else {
		tmp = Math.sqrt(((n * t) * (2.0 * U)));
	}
	return tmp;
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	tmp = 0
	if l_m <= 8.6e-156:
		tmp = math.sqrt(((2.0 * n) * (U * t)))
	else:
		tmp = math.sqrt(((n * t) * (2.0 * U)))
	return tmp
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 8.6e-156)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t)));
	else
		tmp = sqrt(Float64(Float64(n * t) * Float64(2.0 * U)));
	end
	return tmp
end
l_m = abs(l);
function tmp_2 = code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0;
	if (l_m <= 8.6e-156)
		tmp = sqrt(((2.0 * n) * (U * t)));
	else
		tmp = sqrt(((n * t) * (2.0 * U)));
	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, 8.6e-156], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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


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

    1. Initial program 50.3%

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

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

    if 8.59999999999999954e-156 < l

    1. Initial program 41.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. Simplified45.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 25.1%

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

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

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

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

Alternative 17: 35.7% accurate, 2.1× speedup?

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

\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Derivation
  1. Initial program 47.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. 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 l around 0 39.7%

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

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

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

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

Alternative 18: 35.8% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(t \cdot \left(n \cdot U\right)\right)}
\end{array}
Derivation
  1. Initial program 47.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. 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. Taylor expanded in Om around -inf 44.5%

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

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

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

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

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

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

    \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(U \cdot \left(t + \left(-\frac{\mathsf{fma}\left(-1, U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right), 2 \cdot {\ell}^{2}\right)}{Om}\right)\right)\right)}} \]
  8. Taylor expanded in t around inf 39.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.5%

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

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

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

Reproduce

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