Toniolo and Linder, Equation (13)

Percentage Accurate: 49.7% → 64.9%
Time: 26.8s
Alternatives: 22
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 22 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: 64.9% accurate, 0.2× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ t_2 := \sqrt{\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)}\\ t_3 := \frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\\ \mathbf{if}\;t\_2 \leq 2 \cdot 10^{-155}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t + \left(t\_1 - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \left(0.5 \cdot \left(\sqrt{\frac{n \cdot U}{t\_3}} \cdot \frac{t \cdot \sqrt{2}}{{l\_m}^{2}}\right) + \sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot t\_3\right)}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))
        (t_2
         (sqrt (* (* (* 2.0 n) U) (+ (- t (* 2.0 (/ (* l_m l_m) Om))) t_1))))
        (t_3 (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.0 Om)))))
   (if (<= t_2 2e-155)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (+ t (- t_1 (* 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)))))))
       (*
        l_m
        (+
         (* 0.5 (* (sqrt (/ (* n U) t_3)) (/ (* t (sqrt 2.0)) (pow l_m 2.0))))
         (* (sqrt 2.0) (sqrt (* U (* n t_3))))))))))
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 t_3 = ((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.0 / Om));
	double tmp;
	if (t_2 <= 2e-155) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (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 = l_m * ((0.5 * (sqrt(((n * U) / t_3)) * ((t * sqrt(2.0)) / pow(l_m, 2.0)))) + (sqrt(2.0) * sqrt((U * (n * t_3)))));
	}
	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 t_3 = ((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om));
	double tmp;
	if (t_2 <= 2e-155) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * (t + (t_1 - (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 = l_m * ((0.5 * (Math.sqrt(((n * U) / t_3)) * ((t * Math.sqrt(2.0)) / Math.pow(l_m, 2.0)))) + (Math.sqrt(2.0) * Math.sqrt((U * (n * t_3)))));
	}
	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)))
	t_3 = ((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.0 / Om))
	tmp = 0
	if t_2 <= 2e-155:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * (t + (t_1 - (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 = l_m * ((0.5 * (math.sqrt(((n * U) / t_3)) * ((t * math.sqrt(2.0)) / math.pow(l_m, 2.0)))) + (math.sqrt(2.0) * math.sqrt((U * (n * t_3)))))
	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)))
	t_3 = Float64(Float64(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.0 / Om)))
	tmp = 0.0
	if (t_2 <= 2e-155)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t + Float64(t_1 - 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(l_m * Float64(Float64(0.5 * Float64(sqrt(Float64(Float64(n * U) / t_3)) * Float64(Float64(t * sqrt(2.0)) / (l_m ^ 2.0)))) + Float64(sqrt(2.0) * sqrt(Float64(U * Float64(n * t_3))))));
	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)));
	t_3 = ((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.0 / Om));
	tmp = 0.0;
	if (t_2 <= 2e-155)
		tmp = sqrt((2.0 * n)) * sqrt((U * (t + (t_1 - (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 = l_m * ((0.5 * (sqrt(((n * U) / t_3)) * ((t * sqrt(2.0)) / (l_m ^ 2.0)))) + (sqrt(2.0) * sqrt((U * (n * t_3)))));
	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]}, Block[{t$95$3 = N[(N[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $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[(t$95$1 - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $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[(l$95$m * N[(N[(0.5 * N[(N[Sqrt[N[(N[(n * U), $MachinePrecision] / t$95$3), $MachinePrecision]], $MachinePrecision] * N[(N[(t * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Sqrt[2.0], $MachinePrecision] * N[Sqrt[N[(U * N[(n * t$95$3), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \left(0.5 \cdot \left(\sqrt{\frac{n \cdot U}{t\_3}} \cdot \frac{t \cdot \sqrt{2}}{{l\_m}^{2}}\right) + \sqrt{2} \cdot \sqrt{U \cdot \left(n \cdot t\_3\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. 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)}} \]
    8. Step-by-step derivation
      1. fma-undefine34.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 65.4% 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 + \left(t\_1 - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \left(t\_1 - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{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 (- t_1 (* 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 (+ (/ (* n U*) (pow Om 2.0)) (* 2.0 (/ -1.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 + (t_1 - (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 * (((n * U_42_) / pow(Om, 2.0)) + (2.0 * (-1.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 + (t_1 - (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 * (((n * U_42_) / Math.pow(Om, 2.0)) + (2.0 * (-1.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 + (t_1 - (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 * (((n * U_42_) / math.pow(Om, 2.0)) + (2.0 * (-1.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(t_1 - 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(Float64(n * U_42_) / (Om ^ 2.0)) + Float64(2.0 * Float64(-1.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 + (t_1 - (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 * (((n * U_42_) / (Om ^ 2.0)) + (2.0 * (-1.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[(t$95$1 - N[(2.0 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $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[(N[(n * U$42$), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(-1.0 / Om), $MachinePrecision]), $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 + \left(t\_1 - 2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}\\

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

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{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)}} \]
    8. Step-by-step derivation
      1. fma-undefine34.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(-\frac{\mathsf{fma}\left(-2, {\ell}^{2}, U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}{Om}\right)}\right)\right)} \]
    10. 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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.1%

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

Alternative 3: 65.3% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{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. Taylor expanded in U around 0 14.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\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*\right)\right)\right)\right)}} \cdot {\left(2 \cdot n\right)}^{0.5} \]
      5. associate-*r/31.3%

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

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

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

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

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

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

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

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

    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. Taylor expanded in U around 0 0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(-\frac{\mathsf{fma}\left(-2, {\ell}^{2}, U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}{Om}\right)}\right)\right)} \]
    10. 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)} \]
  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(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot U*\right) \cdot \left(-n\right)\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(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 65.2% accurate, 0.3× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{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)}} \]
    8. 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)}} \]
    9. Step-by-step derivation
      1. unpow231.3%

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\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. Taylor expanded in U around 0 0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(-\frac{\mathsf{fma}\left(-2, {\ell}^{2}, U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}{Om}\right)}\right)\right)} \]
    10. 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)} \]
  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 \left(\ell \cdot \frac{\ell}{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(\frac{n \cdot U*}{{Om}^{2}} + 2 \cdot \frac{-1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 64.4% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\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 - t\_1\right)}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 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)}} \]
    8. 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)}} \]
    9. Step-by-step derivation
      1. unpow231.3%

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\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. Taylor expanded in U around 0 0.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \color{blue}{\left(-\frac{\mathsf{fma}\left(-2, {\ell}^{2}, U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)}{Om}\right)}\right)\right)} \]
    10. 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)} \]
    11. Step-by-step derivation
      1. *-commutative37.6%

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

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

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

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

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

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

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

Alternative 6: 62.9% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\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 - t\_1\right)}\\

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(\frac{{l\_m}^{2} \cdot \left(\frac{U \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} - 2 \cdot U\right)}{Om} + U \cdot t\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)}} \]
    8. 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)}} \]
    9. Step-by-step derivation
      1. unpow231.3%

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\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. Taylor expanded in Om around -inf 18.7%

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

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

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

Alternative 7: 62.1% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_1 := 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\\
t_2 := \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\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 - t\_1\right)}\\

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

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


\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)}} \]
    8. 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)}} \]
    9. Step-by-step derivation
      1. unpow231.3%

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

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

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

      \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t - 2 \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \ell\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. sqrt-prod10.2%

        \[\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-undefine10.2%

        \[\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*8.2%

        \[\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. +-commutative8.2%

        \[\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. *-commutative8.2%

        \[\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-define8.2%

        \[\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/0.2%

        \[\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. pow20.2%

        \[\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-rr0.2%

      \[\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. *-commutative0.2%

        \[\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/0.2%

        \[\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. Simplified0.2%

      \[\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)}} \]
    8. Taylor expanded in n around 0 3.0%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\left(U \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right) \cdot \left(2 \cdot n\right)\right)}^{0.5}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification56.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 \left(\ell \cdot \frac{\ell}{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}:\\ \;\;\;\;{\left(\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)\right)}^{0.5}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.8% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 7.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. Simplified25.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. Taylor expanded in U around 0 12.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.999999999999994e-310 < (*.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 < (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification58.4%

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

Alternative 9: 52.7% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 40.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. Simplified43.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. sqrt-prod0.0%

        \[\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-undefine0.0%

        \[\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*0.0%

        \[\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. +-commutative0.0%

        \[\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. *-commutative0.0%

        \[\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-define0.0%

        \[\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/0.0%

        \[\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. pow20.0%

        \[\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-rr0.0%

      \[\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. *-commutative0.0%

        \[\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/0.0%

        \[\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. Simplified0.0%

      \[\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)}} \]
    8. Taylor expanded in n around 0 0.0%

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < n < 5.7999999999999997e104

    1. Initial program 40.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. Simplified48.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. sqrt-prod57.8%

        \[\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-undefine57.8%

        \[\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*59.0%

        \[\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. +-commutative59.0%

        \[\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. *-commutative59.0%

        \[\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-define59.0%

        \[\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/51.3%

        \[\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. pow251.3%

        \[\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-rr51.3%

      \[\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. *-commutative51.3%

        \[\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/51.3%

        \[\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. Simplified51.3%

      \[\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)}} \]
    8. Taylor expanded in n around 0 45.1%

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

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

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

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

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

    if 5.7999999999999997e104 < n

    1. Initial program 58.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. Simplified69.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 43.7%

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

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

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

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

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

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

Alternative 10: 53.2% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

    if -1.6000000000000001e-134 < n < -1.000000000000002e-309

    1. Initial program 20.5%

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
    2. Simplified27.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 n around 0 36.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 -1.000000000000002e-309 < n

    1. Initial program 46.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. Simplified55.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. sqrt-prod64.0%

        \[\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-undefine64.0%

        \[\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*64.0%

        \[\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. +-commutative64.0%

        \[\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. *-commutative64.0%

        \[\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-define64.0%

        \[\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/57.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. pow257.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-rr57.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. *-commutative57.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/57.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. Simplified57.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)}} \]
    8. Taylor expanded in n around 0 45.6%

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

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

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

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

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

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

Alternative 11: 52.6% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -4.999999999999985e-310

    1. Initial program 40.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. Simplified43.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. sqrt-prod0.0%

        \[\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-undefine0.0%

        \[\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*0.0%

        \[\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. +-commutative0.0%

        \[\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. *-commutative0.0%

        \[\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-define0.0%

        \[\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/0.0%

        \[\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. pow20.0%

        \[\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-rr0.0%

      \[\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. *-commutative0.0%

        \[\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/0.0%

        \[\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. Simplified0.0%

      \[\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)}} \]
    8. Taylor expanded in n around 0 0.0%

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < n

    1. Initial program 46.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. Simplified55.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. sqrt-prod64.5%

        \[\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-undefine64.5%

        \[\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*64.5%

        \[\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. +-commutative64.5%

        \[\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. *-commutative64.5%

        \[\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-define64.5%

        \[\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/57.9%

        \[\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. pow257.9%

        \[\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-rr57.9%

      \[\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. *-commutative57.9%

        \[\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/57.9%

        \[\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. Simplified57.9%

      \[\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)}} \]
    8. Taylor expanded in n around 0 46.0%

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

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

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

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

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

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

Alternative 12: 50.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.000000000000002e-309

    1. Initial program 40.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. Simplified43.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 n around 0 39.9%

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

    if -1.000000000000002e-309 < n

    1. Initial program 46.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. Simplified55.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. sqrt-prod64.0%

        \[\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-undefine64.0%

        \[\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*64.0%

        \[\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. +-commutative64.0%

        \[\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. *-commutative64.0%

        \[\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-define64.0%

        \[\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/57.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. pow257.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-rr57.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. *-commutative57.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/57.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. Simplified57.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)}} \]
    8. Taylor expanded in n around 0 45.6%

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

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

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

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

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

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

Alternative 13: 44.4% accurate, 1.0× speedup?

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

    1. Initial program 41.5%

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

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

        \[\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-undefine27.6%

        \[\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*27.7%

        \[\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. +-commutative27.7%

        \[\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. *-commutative27.7%

        \[\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-define27.7%

        \[\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/24.8%

        \[\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. pow224.8%

        \[\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-rr24.8%

      \[\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. *-commutative24.8%

        \[\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/24.8%

        \[\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. Simplified24.8%

      \[\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)}} \]
    8. Taylor expanded in n around 0 21.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.65000000000000005e183 < n

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\sqrt{\color{blue}{\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)}}} \]
      3. rem-sqrt-square34.1%

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

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

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

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

Alternative 14: 44.4% accurate, 1.0× speedup?

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

    1. Initial program 41.5%

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

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

      \[\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.40000000000000014e181 < n

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\sqrt{\color{blue}{\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)}}} \]
      3. rem-sqrt-square34.1%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq 5.4 \cdot 10^{+181}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\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.0% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.6 \cdot 10^{-26}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right|}\\ \mathbf{elif}\;Om \leq -5.5 \cdot 10^{-198}:\\ \;\;\;\;\left(l\_m \cdot \frac{n}{Om}\right) \cdot \sqrt{U \cdot \left(2 \cdot U*\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|\left(2 \cdot U\right) \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 (<= Om -1.6e-26)
   (sqrt (fabs (* 2.0 (* t (* n U)))))
   (if (<= Om -5.5e-198)
     (* (* l_m (/ n Om)) (sqrt (* U (* 2.0 U*))))
     (sqrt (fabs (* (* 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 (Om <= -1.6e-26) {
		tmp = sqrt(fabs((2.0 * (t * (n * U)))));
	} else if (Om <= -5.5e-198) {
		tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
	} else {
		tmp = sqrt(fabs(((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 (om <= (-1.6d-26)) then
        tmp = sqrt(abs((2.0d0 * (t * (n * u)))))
    else if (om <= (-5.5d-198)) then
        tmp = (l_m * (n / om)) * sqrt((u * (2.0d0 * u_42)))
    else
        tmp = sqrt(abs(((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 (Om <= -1.6e-26) {
		tmp = Math.sqrt(Math.abs((2.0 * (t * (n * U)))));
	} else if (Om <= -5.5e-198) {
		tmp = (l_m * (n / Om)) * Math.sqrt((U * (2.0 * U_42_)));
	} else {
		tmp = Math.sqrt(Math.abs(((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 Om <= -1.6e-26:
		tmp = math.sqrt(math.fabs((2.0 * (t * (n * U)))))
	elif Om <= -5.5e-198:
		tmp = (l_m * (n / Om)) * math.sqrt((U * (2.0 * U_42_)))
	else:
		tmp = math.sqrt(math.fabs(((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 (Om <= -1.6e-26)
		tmp = sqrt(abs(Float64(2.0 * Float64(t * Float64(n * U)))));
	elseif (Om <= -5.5e-198)
		tmp = Float64(Float64(l_m * Float64(n / Om)) * sqrt(Float64(U * Float64(2.0 * U_42_))));
	else
		tmp = sqrt(abs(Float64(Float64(2.0 * 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 (Om <= -1.6e-26)
		tmp = sqrt(abs((2.0 * (t * (n * U)))));
	elseif (Om <= -5.5e-198)
		tmp = (l_m * (n / Om)) * sqrt((U * (2.0 * U_42_)));
	else
		tmp = sqrt(abs(((2.0 * U) * (n * t))));
	end
	tmp_2 = tmp;
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := If[LessEqual[Om, -1.6e-26], N[Sqrt[N[Abs[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], If[LessEqual[Om, -5.5e-198], N[(N[(l$95$m * N[(n / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * N[(2.0 * U$42$), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Sqrt[N[Abs[N[(N[(2.0 * U), $MachinePrecision] * N[(n * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

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

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


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

    1. Initial program 49.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. Simplified61.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 43.7%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{\sqrt{\color{blue}{\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)}}} \]
      3. rem-sqrt-square44.5%

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

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

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

    if -1.6000000000000001e-26 < Om < -5.5000000000000001e-198

    1. Initial program 39.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.5000000000000001e-198 < Om

    1. Initial program 41.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. Simplified46.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 26.3%

      \[\leadsto \sqrt{\left(2 \cdot n\right) \cdot \color{blue}{\left(U \cdot t\right)}} \]
    5. Step-by-step derivation
      1. add-sqr-sqrt26.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/226.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/228.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-down24.0%

        \[\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.0%

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

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

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

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

        \[\leadsto \sqrt{\sqrt{{\left(\color{blue}{\left(2 \cdot \left(n \cdot U\right)\right)} \cdot t\right)}^{2}}} \]
      4. unpow221.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)}}} \]
      5. rem-sqrt-square28.7%

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

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

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

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

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

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

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

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

Alternative 16: 40.3% accurate, 1.1× speedup?

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

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

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


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

    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. pow1/241.5%

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

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

    if 4.1e43 < 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. Simplified34.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 Om around inf 19.8%

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

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

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

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

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

Alternative 17: 40.4% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 3.79999999999999975e-308

    1. Initial program 40.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. Simplified43.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 t around inf 26.4%

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

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

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

        \[\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.6%

        \[\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.6%

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

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

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

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

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

        \[\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)}}} \]
      5. rem-sqrt-square27.5%

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

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

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

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

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

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

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

    if 3.79999999999999975e-308 < n

    1. Initial program 46.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. Simplified55.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. sqrt-prod64.5%

        \[\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-undefine64.5%

        \[\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*64.5%

        \[\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. +-commutative64.5%

        \[\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. *-commutative64.5%

        \[\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-define64.5%

        \[\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/57.9%

        \[\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. pow257.9%

        \[\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-rr57.9%

      \[\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. *-commutative57.9%

        \[\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/57.9%

        \[\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. Simplified57.9%

      \[\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)}} \]
    8. Taylor expanded in t around inf 40.1%

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

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

Alternative 18: 39.0% accurate, 1.9× speedup?

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

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

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


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

    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. pow1/241.5%

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

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

    if 5.49999999999999989e43 < 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 U around 0 23.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.1% accurate, 2.0× speedup?

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

\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 U* < 6.7999999999999998e39

    1. Initial program 40.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. Simplified48.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 t around inf 32.5%

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

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

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

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

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

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

    if 6.7999999999999998e39 < U*

    1. Initial program 52.6%

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

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

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

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

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

      \[\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 simplification34.2%

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

Alternative 20: 38.2% accurate, 2.1× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ {\left(2 \cdot \left(U \cdot \left(n \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 (* U (* n t))) 0.5))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return pow((2.0 * (U * (n * 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 * (u * (n * 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 * (U * (n * t))), 0.5);
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.pow((2.0 * (U * (n * t))), 0.5)
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	return Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = (2.0 * (U * (n * 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[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}
l_m = \left|\ell\right|

\\
{\left(2 \cdot \left(U \cdot \left(n \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.1%

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

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

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

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

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

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

Alternative 21: 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 22: 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. 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.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*))))))