Toniolo and Linder, Equation (13)

Percentage Accurate: 49.7% → 65.4%
Time: 27.0s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 49.7% accurate, 1.0× speedup?

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

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

Alternative 1: 65.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000003e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 65.2% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000003e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000003e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification57.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 2 \cdot 10^{-155}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)}\\ \mathbf{elif}\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 61.5% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


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

    1. Initial program 8.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.00000000000000003e-155 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 61.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_2 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\

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


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

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

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

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

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

    1. Initial program 61.8%

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 55.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := {\left(\frac{l\_m}{Om}\right)}^{2}\\
\mathbf{if}\;Om \leq -4 \cdot 10^{-150} \lor \neg \left(Om \leq 5 \cdot 10^{+19}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(n \cdot \left(t\_1 \cdot \left(U* - U\right)\right) - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -4.00000000000000003e-150 or 5e19 < Om

    1. Initial program 43.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{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U - U*\right)\right)\right)\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000003e-150 < Om < 5e19

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 53.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.8 \cdot 10^{-134} \lor \neg \left(n \leq 2.85 \cdot 10^{-126}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.79999999999999995e-134 or 2.8499999999999999e-126 < n

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.79999999999999995e-134 < n < 2.8499999999999999e-126

    1. Initial program 24.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. Simplified28.8%

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

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

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

Alternative 8: 51.8% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -3.9999999999999997e-40 or 7.8000000000000004e-104 < n

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999997e-40 < n < 7.8000000000000004e-104

    1. Initial program 34.4%

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

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

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

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

Alternative 9: 43.2% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -4.9 \cdot 10^{+203} \lor \neg \left(n \leq 3.7 \cdot 10^{+176}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -4.8999999999999997e203 or 3.6999999999999998e176 < n

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.8999999999999997e203 < n < 3.6999999999999998e176

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

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

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

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

Alternative 10: 44.7% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -6.8 \cdot 10^{+202} \lor \neg \left(n \leq 7 \cdot 10^{+176}\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(n \cdot \left({\left(\frac{l\_m}{Om}\right)}^{2} \cdot U*\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -6.8e202 or 7.00000000000000005e176 < n

    1. Initial program 48.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8e202 < n < 7.00000000000000005e176

    1. Initial program 42.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. Simplified47.3%

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

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

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

Alternative 11: 43.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;Om \leq -5.6 \cdot 10^{-215} \lor \neg \left(Om \leq 1.25 \cdot 10^{-160}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -5.59999999999999972e-215 or 1.24999999999999999e-160 < Om

    1. Initial program 42.5%

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

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

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

    if -5.59999999999999972e-215 < Om < 1.24999999999999999e-160

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

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

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

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

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

Alternative 12: 40.7% accurate, 1.1× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.6999999999999999e43 < l

    1. Initial program 24.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. Simplified37.3%

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

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

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

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

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

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

Alternative 13: 37.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.55 \cdot 10^{+172}:\\
\;\;\;\;{\left({\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{1.5}\right)}^{0.3333333333333333}\\

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


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

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

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

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

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

    if -1.54999999999999994e172 < n

    1. Initial program 43.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. Simplified50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 37.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < 6.80000000000000002e123

    1. Initial program 40.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. Simplified48.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.80000000000000002e123 < U*

    1. Initial program 60.2%

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \cdot \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. pow1/229.1%

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}}} \]
      5. metadata-eval29.1%

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

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

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

        \[\leadsto \sqrt{{\left({\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}\right)}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      9. *-commutative32.5%

        \[\leadsto \sqrt{{\left({\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)\right)}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      10. metadata-eval32.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U* \leq 6.8 \cdot 10^{+123}:\\ \;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot \left(U \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 38.4% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 43.9%

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

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

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

    if 2.1999999999999999e-234 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 38.4% accurate, 1.1× speedup?

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

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

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


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

    1. Initial program 43.9%

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

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

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

    if 1.89999999999999992e-234 < l

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

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

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

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

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

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \cdot \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
      4. pow1/228.1%

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}}} \]
      5. metadata-eval28.1%

        \[\leadsto \sqrt{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}}} \]
      6. pow-prod-down21.9%

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

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

        \[\leadsto \sqrt{{\left({\left(2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}\right)}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      9. *-commutative20.3%

        \[\leadsto \sqrt{{\left({\left(2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)\right)}^{2}\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      10. metadata-eval20.3%

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

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

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

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

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

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

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

Alternative 17: 37.7% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 43.9%

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

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

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

    if 2.1999999999999999e-234 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 37.7% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 43.9%

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

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

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

    if 2.25000000000000005e-234 < l

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

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

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

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

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

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

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

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

Alternative 19: 36.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

Alternative 20: 35.4% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)} \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(2.0 * n) * Float64(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[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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

Alternative 21: 36.1% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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