Toniolo and Linder, Equation (13)

Percentage Accurate: 50.5% → 64.0%
Time: 30.1s
Alternatives: 19
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 19 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.5% 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.0% accurate, 0.2× 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[3]{{\left(U \cdot \left(n \cdot \mathsf{fma}\left(n \cdot {Om}^{-2}, U* - U, \frac{-2}{Om}\right)\right)\right)}^{0.75}}\\ t_3 := \left(2 \cdot n\right) \cdot U\\ t_4 := t_3 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\ \mathbf{if}\;t_4 \leq 0:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot t} \cdot \sqrt{U}\right) - \frac{{l_m}^{2} \cdot \sqrt{2}}{Om} \cdot \sqrt{\frac{n \cdot U}{t}}\\ \mathbf{elif}\;t_4 \leq \infty:\\ \;\;\;\;\sqrt{t_3 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \left(t_2 \cdot t_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
         (cbrt
          (pow
           (* U (* n (fma (* n (pow Om -2.0)) (- U* U) (/ -2.0 Om))))
           0.75)))
        (t_3 (* (* 2.0 n) U))
        (t_4 (* t_3 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
   (if (<= t_4 0.0)
     (-
      (* (sqrt 2.0) (* (sqrt (* n t)) (sqrt U)))
      (* (/ (* (pow l_m 2.0) (sqrt 2.0)) Om) (sqrt (/ (* n U) t))))
     (if (<= t_4 INFINITY)
       (sqrt (* t_3 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
       (* (* l_m (sqrt 2.0)) (* t_2 t_2))))))
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 = cbrt(pow((U * (n * fma((n * pow(Om, -2.0)), (U_42_ - U), (-2.0 / Om)))), 0.75));
	double t_3 = (2.0 * n) * U;
	double t_4 = t_3 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_4 <= 0.0) {
		tmp = (sqrt(2.0) * (sqrt((n * t)) * sqrt(U))) - (((pow(l_m, 2.0) * sqrt(2.0)) / Om) * sqrt(((n * U) / t)));
	} else if (t_4 <= ((double) INFINITY)) {
		tmp = sqrt((t_3 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = (l_m * sqrt(2.0)) * (t_2 * t_2);
	}
	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 = cbrt((Float64(U * Float64(n * fma(Float64(n * (Om ^ -2.0)), Float64(U_42_ - U), Float64(-2.0 / Om)))) ^ 0.75))
	t_3 = Float64(Float64(2.0 * n) * U)
	t_4 = Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))
	tmp = 0.0
	if (t_4 <= 0.0)
		tmp = Float64(Float64(sqrt(2.0) * Float64(sqrt(Float64(n * t)) * sqrt(U))) - Float64(Float64(Float64((l_m ^ 2.0) * sqrt(2.0)) / Om) * sqrt(Float64(Float64(n * U) / t))));
	elseif (t_4 <= Inf)
		tmp = sqrt(Float64(t_3 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)));
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * Float64(t_2 * t_2));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Power[N[Power[N[(U * N[(n * N[(N[(n * N[Power[Om, -2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision] + N[(-2.0 / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.75], $MachinePrecision], 1/3], $MachinePrecision]}, Block[{t$95$3 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 * 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$4, 0.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], N[Sqrt[N[(t$95$3 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$2 * t$95$2), $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[3]{{\left(U \cdot \left(n \cdot \mathsf{fma}\left(n \cdot {Om}^{-2}, U* - U, \frac{-2}{Om}\right)\right)\right)}^{0.75}}\\
t_3 := \left(2 \cdot n\right) \cdot U\\
t_4 := t_3 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_4 \leq 0:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot t} \cdot \sqrt{U}\right) - \frac{{l_m}^{2} \cdot \sqrt{2}}{Om} \cdot \sqrt{\frac{n \cdot U}{t}}\\

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

\mathbf{else}:\\
\;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \left(t_2 \cdot t_2\right)\\


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

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

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

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

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

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

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

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

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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/74.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left({\ell}^{2} \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)}\right)} \]
    7. Taylor expanded in l around 0 31.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)} \]
    8. Step-by-step derivation
      1. *-commutative31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \left(\ell \cdot \sqrt{2}\right) \cdot \left(\color{blue}{\sqrt[3]{{\left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right)}^{0.75}}} \cdot {\left({\left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {Om}^{-2} \cdot \left(U* - U\right), \frac{-2}{Om}\right)\right)}^{0.75}\right)}^{0.3333333333333333}\right) \]
      2. unpow1/322.0%

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

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

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

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

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

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

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

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

Alternative 2: 64.1% 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 := \left(2 \cdot n\right) \cdot U\\ t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot t} \cdot \sqrt{U}\right) - \frac{{l_m}^{2} \cdot \sqrt{2}}{Om} \cdot \sqrt{\frac{n \cdot U}{t}}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)}\\ \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_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
   (if (<= t_3 0.0)
     (-
      (* (sqrt 2.0) (* (sqrt (* n t)) (sqrt U)))
      (* (/ (* (pow l_m 2.0) (sqrt 2.0)) Om) (sqrt (/ (* n U) t))))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
       (*
        (* l_m (sqrt 2.0))
        (sqrt
         (*
          U
          (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.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;
	double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = (sqrt(2.0) * (sqrt((n * t)) * sqrt(U))) - (((pow(l_m, 2.0) * sqrt(2.0)) / Om) * sqrt(((n * U) / t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.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;
	double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = (Math.sqrt(2.0) * (Math.sqrt((n * t)) * Math.sqrt(U))) - (((Math.pow(l_m, 2.0) * Math.sqrt(2.0)) / Om) * Math.sqrt(((n * U) / t)));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)
	tmp = 0
	if t_3 <= 0.0:
		tmp = (math.sqrt(2.0) * (math.sqrt((n * t)) * math.sqrt(U))) - (((math.pow(l_m, 2.0) * math.sqrt(2.0)) / Om) * math.sqrt(((n * U) / t)))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.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(2.0 * n) * U)
	t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(Float64(sqrt(2.0) * Float64(sqrt(Float64(n * t)) * sqrt(U))) - Float64(Float64(Float64((l_m ^ 2.0) * sqrt(2.0)) / Om) * sqrt(Float64(Float64(n * U) / t))));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)));
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = (sqrt(2.0) * (sqrt((n * t)) * sqrt(U))) - ((((l_m ^ 2.0) * sqrt(2.0)) / Om) * sqrt(((n * U) / t)));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[(N[(N[Sqrt[2.0], $MachinePrecision] * N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[U], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(N[(n * U), $MachinePrecision] / t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $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]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{2} \cdot \left(\sqrt{n \cdot t} \cdot \sqrt{U}\right) - \frac{{l_m}^{2} \cdot \sqrt{2}}{Om} \cdot \sqrt{\frac{n \cdot U}{t}}\\

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

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


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

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

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

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

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

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

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

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

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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/74.1%

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 31.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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.2%

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

Alternative 3: 61.7% 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 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \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 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_2 (* (* 2.0 n) U))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1)))))
   (if (<= t_3 0.0)
     (* (sqrt (* n t)) (sqrt (* 2.0 U)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
       (pow (* -4.0 (/ (* U (* n (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 = (n * pow((l_m / Om), 2.0)) * (U_42_ - U);
	double t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = pow((-4.0 * ((U * (n * pow(l_m, 2.0))) / Om)), 0.5);
	}
	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;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((n * t)) * Math.sqrt((2.0 * U));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = Math.pow((-4.0 * ((U * (n * 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 = (n * math.pow((l_m / Om), 2.0)) * (U_42_ - U)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((n * t)) * math.sqrt((2.0 * U))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))
	else:
		tmp = math.pow((-4.0 * ((U * (n * 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(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1)))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)));
	else
		tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * (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 = (n * ((l_m / Om) ^ 2.0)) * (U_42_ - U);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	else
		tmp = (-4.0 * ((U * (n * (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[(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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * 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 := \left(n \cdot {\left(\frac{l_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)}\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\

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

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


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

    1. Initial program 13.9%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/74.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\color{blue}{\left(-4 \cdot \frac{U \cdot \left({\ell}^{2} \cdot n\right)}{Om}\right)}}^{0.5} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification64.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 0:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \cdot {\ell}^{2}\right)}{Om}\right)}^{0.5}\\ \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(2 \cdot n\right) \cdot U\\ t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\ \mathbf{if}\;t_3 \leq 0:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \mathbf{elif}\;t_3 \leq \infty:\\ \;\;\;\;\sqrt{t_2 \cdot \left(\left(t - 2 \cdot \left(l_m \cdot \frac{l_m}{Om}\right)\right) + t_1\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)}\\ \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_3 (* t_2 (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
   (if (<= t_3 0.0)
     (* (sqrt (* n t)) (sqrt (* 2.0 U)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (+ (- t (* 2.0 (* l_m (/ l_m Om)))) t_1)))
       (*
        (* l_m (sqrt 2.0))
        (sqrt
         (*
          U
          (* n (+ (/ (* n (- U* U)) (pow Om 2.0)) (* 2.0 (/ -1.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;
	double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * (U_42_ - U)) / pow(Om, 2.0)) + (2.0 * (-1.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;
	double t_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((n * t)) * Math.sqrt((2.0 * U));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	} else {
		tmp = (l_m * Math.sqrt(2.0)) * Math.sqrt((U * (n * (((n * (U_42_ - U)) / Math.pow(Om, 2.0)) + (2.0 * (-1.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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1)
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((n * t)) * math.sqrt((2.0 * U))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)))
	else:
		tmp = (l_m * math.sqrt(2.0)) * math.sqrt((U * (n * (((n * (U_42_ - U)) / math.pow(Om, 2.0)) + (2.0 * (-1.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(2.0 * n) * U)
	t_3 = Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + t_1))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(l_m * Float64(l_m / Om)))) + t_1)));
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(U * Float64(n * Float64(Float64(Float64(n * Float64(U_42_ - U)) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.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_3 = t_2 * ((t - (2.0 * ((l_m * l_m) / Om))) + t_1);
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * ((t - (2.0 * (l_m * (l_m / Om)))) + t_1)));
	else
		tmp = (l_m * sqrt(2.0)) * sqrt((U * (n * (((n * (U_42_ - U)) / (Om ^ 2.0)) + (2.0 * (-1.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[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 * 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$3, 0.0], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $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]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $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(2 \cdot n\right) \cdot U\\
t_3 := t_2 \cdot \left(\left(t - 2 \cdot \frac{l_m \cdot l_m}{Om}\right) + t_1\right)\\
\mathbf{if}\;t_3 \leq 0:\\
\;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/74.1%

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around inf 31.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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.2%

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

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 69.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/74.1%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

      \[\leadsto \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \color{blue}{\left({\ell}^{2} \cdot \left(\frac{n}{\frac{{Om}^{2}}{U* - U}} - \frac{2}{Om}\right)\right)}\right)} \]
    7. Taylor expanded in l around 0 31.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)} \]
    8. Step-by-step derivation
      1. *-commutative31.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 56.6% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;l_m \leq 1.1 \cdot 10^{+105}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - \frac{2 \cdot \left(l_m \cdot l_m\right)}{Om}\right) + n \cdot \left({\left(\frac{l_m}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)}\\ \mathbf{elif}\;l_m \leq 1.12 \cdot 10^{+226}:\\ \;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(l_m \cdot \frac{l_m}{Om}, -2, t\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{-2}{Om} \cdot \left(n \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 1.1e+105)
   (sqrt
    (*
     (* 2.0 n)
     (*
      U
      (+
       (- t (/ (* 2.0 (* l_m l_m)) Om))
       (* n (* (pow (/ l_m Om) 2.0) (- U* U)))))))
   (if (<= l_m 1.12e+226)
     (pow (* (* 2.0 (* n U)) (fma (* l_m (/ l_m Om)) -2.0 t)) 0.5)
     (* (* l_m (sqrt 2.0)) (sqrt (* (/ -2.0 Om) (* n U)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double tmp;
	if (l_m <= 1.1e+105) {
		tmp = sqrt(((2.0 * n) * (U * ((t - ((2.0 * (l_m * l_m)) / Om)) + (n * (pow((l_m / Om), 2.0) * (U_42_ - U)))))));
	} else if (l_m <= 1.12e+226) {
		tmp = pow(((2.0 * (n * U)) * fma((l_m * (l_m / Om)), -2.0, t)), 0.5);
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt(((-2.0 / Om) * (n * U)));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	tmp = 0.0
	if (l_m <= 1.1e+105)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(Float64(t - Float64(Float64(2.0 * Float64(l_m * l_m)) / Om)) + Float64(n * Float64((Float64(l_m / Om) ^ 2.0) * Float64(U_42_ - U)))))));
	elseif (l_m <= 1.12e+226)
		tmp = Float64(Float64(2.0 * Float64(n * U)) * fma(Float64(l_m * Float64(l_m / Om)), -2.0, t)) ^ 0.5;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(-2.0 / Om) * Float64(n * U))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[l$95$m, 1.1e+105], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(N[(t - N[(N[(2.0 * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l$95$m, 1.12e+226], N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(-2.0 / Om), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l_m \leq 1.12 \cdot 10^{+226}:\\
\;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(l_m \cdot \frac{l_m}{Om}, -2, t\right)\right)}^{0.5}\\

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


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

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

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

    if 1.10000000000000003e105 < l < 1.12e226

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.12e226 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 52.6% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(l_m \cdot \frac{l_m}{Om}, -2, t\right)\right)}^{0.5}\\ \mathbf{if}\;l_m \leq 8 \cdot 10^{+121}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;l_m \leq 2.7 \cdot 10^{+152}:\\ \;\;\;\;{\left(\left(n \cdot {l_m}^{2}\right) \cdot \left(-4 \cdot \frac{U}{Om}\right)\right)}^{0.5}\\ \mathbf{elif}\;l_m \leq 1.02 \cdot 10^{+225}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(l_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{-2}{Om} \cdot \left(n \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 (pow (* (* 2.0 (* n U)) (fma (* l_m (/ l_m Om)) -2.0 t)) 0.5)))
   (if (<= l_m 8e+121)
     t_1
     (if (<= l_m 2.7e+152)
       (pow (* (* n (pow l_m 2.0)) (* -4.0 (/ U Om))) 0.5)
       (if (<= l_m 1.02e+225)
         t_1
         (* (* l_m (sqrt 2.0)) (sqrt (* (/ -2.0 Om) (* n U)))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = pow(((2.0 * (n * U)) * fma((l_m * (l_m / Om)), -2.0, t)), 0.5);
	double tmp;
	if (l_m <= 8e+121) {
		tmp = t_1;
	} else if (l_m <= 2.7e+152) {
		tmp = pow(((n * pow(l_m, 2.0)) * (-4.0 * (U / Om))), 0.5);
	} else if (l_m <= 1.02e+225) {
		tmp = t_1;
	} else {
		tmp = (l_m * sqrt(2.0)) * sqrt(((-2.0 / Om) * (n * U)));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(Float64(2.0 * Float64(n * U)) * fma(Float64(l_m * Float64(l_m / Om)), -2.0, t)) ^ 0.5
	tmp = 0.0
	if (l_m <= 8e+121)
		tmp = t_1;
	elseif (l_m <= 2.7e+152)
		tmp = Float64(Float64(n * (l_m ^ 2.0)) * Float64(-4.0 * Float64(U / Om))) ^ 0.5;
	elseif (l_m <= 1.02e+225)
		tmp = t_1;
	else
		tmp = Float64(Float64(l_m * sqrt(2.0)) * sqrt(Float64(Float64(-2.0 / Om) * Float64(n * U))));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * -2.0 + t), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]}, If[LessEqual[l$95$m, 8e+121], t$95$1, If[LessEqual[l$95$m, 2.7e+152], N[Power[N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] * N[(-4.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[l$95$m, 1.02e+225], t$95$1, N[(N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(-2.0 / Om), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;l_m \leq 2.7 \cdot 10^{+152}:\\
\;\;\;\;{\left(\left(n \cdot {l_m}^{2}\right) \cdot \left(-4 \cdot \frac{U}{Om}\right)\right)}^{0.5}\\

\mathbf{elif}\;l_m \leq 1.02 \cdot 10^{+225}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 8.0000000000000003e121 or 2.70000000000000015e152 < l < 1.0200000000000001e225

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.0000000000000003e121 < l < 2.70000000000000015e152

    1. Initial program 43.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. Simplified43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0200000000000001e225 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 8 \cdot 10^{+121}:\\ \;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 2.7 \cdot 10^{+152}:\\ \;\;\;\;{\left(\left(n \cdot {\ell}^{2}\right) \cdot \left(-4 \cdot \frac{U}{Om}\right)\right)}^{0.5}\\ \mathbf{elif}\;\ell \leq 1.02 \cdot 10^{+225}:\\ \;\;\;\;{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{-2}{Om} \cdot \left(n \cdot U\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 49.3% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;l_m \leq 8.5 \cdot 10^{+208}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < 9.49999999999999949e121 or 6.00000000000000037e153 < l < 8.4999999999999992e208

    1. Initial program 53.2%

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

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

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

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

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

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

    if 9.49999999999999949e121 < l < 6.00000000000000037e153

    1. Initial program 43.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. Simplified43.6%

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

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

      \[\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. associate-/l*64.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.4999999999999992e208 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 46.7% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -4.8 \cdot 10^{-84} \lor \neg \left(Om \leq 3.7 \cdot 10^{-76}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(l_m \cdot \frac{l_m}{Om}\right) \cdot -2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(-4 \cdot \frac{U \cdot \left(n \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
 (if (or (<= Om -4.8e-84) (not (<= Om 3.7e-76)))
   (sqrt (* 2.0 (* (* n U) (+ t (* (* l_m (/ l_m Om)) -2.0)))))
   (pow (* -4.0 (/ (* U (* n (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 tmp;
	if ((Om <= -4.8e-84) || !(Om <= 3.7e-76)) {
		tmp = sqrt((2.0 * ((n * U) * (t + ((l_m * (l_m / Om)) * -2.0)))));
	} else {
		tmp = pow((-4.0 * ((U * (n * 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) :: tmp
    if ((om <= (-4.8d-84)) .or. (.not. (om <= 3.7d-76))) then
        tmp = sqrt((2.0d0 * ((n * u) * (t + ((l_m * (l_m / om)) * (-2.0d0))))))
    else
        tmp = ((-4.0d0) * ((u * (n * (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 tmp;
	if ((Om <= -4.8e-84) || !(Om <= 3.7e-76)) {
		tmp = Math.sqrt((2.0 * ((n * U) * (t + ((l_m * (l_m / Om)) * -2.0)))));
	} else {
		tmp = Math.pow((-4.0 * ((U * (n * 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_):
	tmp = 0
	if (Om <= -4.8e-84) or not (Om <= 3.7e-76):
		tmp = math.sqrt((2.0 * ((n * U) * (t + ((l_m * (l_m / Om)) * -2.0)))))
	else:
		tmp = math.pow((-4.0 * ((U * (n * 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_)
	tmp = 0.0
	if ((Om <= -4.8e-84) || !(Om <= 3.7e-76))
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * U) * Float64(t + Float64(Float64(l_m * Float64(l_m / Om)) * -2.0)))));
	else
		tmp = Float64(-4.0 * Float64(Float64(U * Float64(n * (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_)
	tmp = 0.0;
	if ((Om <= -4.8e-84) || ~((Om <= 3.7e-76)))
		tmp = sqrt((2.0 * ((n * U) * (t + ((l_m * (l_m / Om)) * -2.0)))));
	else
		tmp = (-4.0 * ((U * (n * (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$_] := If[Or[LessEqual[Om, -4.8e-84], N[Not[LessEqual[Om, 3.7e-76]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(N[(n * U), $MachinePrecision] * N[(t + N[(N[(l$95$m * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(-4.0 * N[(N[(U * N[(n * 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}
\mathbf{if}\;Om \leq -4.8 \cdot 10^{-84} \lor \neg \left(Om \leq 3.7 \cdot 10^{-76}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(l_m \cdot \frac{l_m}{Om}\right) \cdot -2\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -4.80000000000000035e-84 or 3.70000000000000011e-76 < Om

    1. Initial program 56.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. Simplified61.2%

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

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

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

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

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

    if -4.80000000000000035e-84 < Om < 3.70000000000000011e-76

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 47.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.5 \cdot 10^{-84} \lor \neg \left(Om \leq 9 \cdot 10^{-74}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \left(l_m \cdot \frac{l_m}{Om}\right) \cdot -2\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -2.5000000000000001e-84 or 8.9999999999999998e-74 < Om

    1. Initial program 56.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. Simplified61.2%

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

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

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

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

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

    if -2.5000000000000001e-84 < Om < 8.9999999999999998e-74

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 48.6% accurate, 1.1× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.09999999999999996e60

    1. Initial program 50.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. Simplified54.8%

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

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

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

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

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

    if 5.09999999999999996e60 < t

    1. Initial program 44.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/45.1%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 49.2% accurate, 1.9× speedup?

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

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

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


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

    1. Initial program 52.7%

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

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

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

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

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

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

    if 1.05e209 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{{2}^{0.5}} \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\right)\right)} - 1 \]
      5. pow1/249.5%

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

        \[\leadsto e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)\right)}^{0.5}}\right)} - 1 \]
      7. associate-/r/44.9%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot {\left(2 \cdot \left(-2 \cdot \left(\frac{U}{Om} \cdot n\right)\right)\right)}^{0.5}\right)\right)} \]
      2. expm1-log1p47.5%

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

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

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

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

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

        \[\leadsto \ell \cdot \sqrt{\color{blue}{\frac{-4 \cdot U}{Om}} \cdot n} \]
    16. Simplified37.0%

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

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

Alternative 13: 44.2% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 54.5%

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

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

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

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

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

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

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

    if 5.3999999999999999e82 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto e^{\mathsf{log1p}\left(\ell \cdot \left(\color{blue}{{2}^{0.5}} \cdot \sqrt{-2 \cdot \frac{U}{\frac{Om}{n}}}\right)\right)} - 1 \]
      5. pow1/238.1%

        \[\leadsto e^{\mathsf{log1p}\left(\ell \cdot \left({2}^{0.5} \cdot \color{blue}{{\left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)}^{0.5}}\right)\right)} - 1 \]
      6. pow-prod-down38.1%

        \[\leadsto e^{\mathsf{log1p}\left(\ell \cdot \color{blue}{{\left(2 \cdot \left(-2 \cdot \frac{U}{\frac{Om}{n}}\right)\right)}^{0.5}}\right)} - 1 \]
      7. associate-/r/35.1%

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

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

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot {\left(2 \cdot \left(-2 \cdot \left(\frac{U}{Om} \cdot n\right)\right)\right)}^{0.5}\right)\right)} \]
      2. expm1-log1p41.4%

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

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

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

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

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

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

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

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

Alternative 14: 38.3% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 53.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. Simplified53.8%

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

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

    if 3.39999999999999992e-116 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 38.4% accurate, 2.0× speedup?

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

\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 < 1.54999999999999999e77

    1. Initial program 54.5%

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

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

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

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

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

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

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

    if 1.54999999999999999e77 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 38.4% accurate, 2.0× speedup?

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

\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.2000000000000004e77

    1. Initial program 54.5%

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

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

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

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

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

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

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

    if 5.2000000000000004e77 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 36.5% accurate, 2.1× speedup?

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

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 49.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{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 31.4%

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

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

Alternative 18: 36.0% 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 49.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{2 \cdot \left(\left(n \cdot U\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot \frac{\ell}{Om}, -2, t\right)\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 33.3%

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

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

Alternative 19: 36.0% accurate, 2.1× speedup?

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

\\
\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}
\end{array}
Derivation
  1. Initial program 49.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. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/53.1%

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

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

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

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

Reproduce

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