Toniolo and Linder, Equation (13)

Percentage Accurate: 49.3% → 64.3%
Time: 26.0s
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.3% 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.3% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{U \cdot \frac{\left(U* - U\right) \cdot {n}^{2}}{Om} - 2 \cdot \left(n \cdot U\right)}{Om}} \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*))))) < 4.99999999999999972e-158

    1. Initial program 12.3%

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

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

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

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

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

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

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

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

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

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

    if 4.99999999999999972e-158 < (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 68.9%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 59.6% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t\_2 \cdot U*\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*))))) < 4.99999999999999972e-158

    1. Initial program 12.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}} \]
    8. Applied egg-rr36.3%

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

    if 4.99999999999999972e-158 < (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 68.9%

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.0% accurate, 0.4× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 64.6% accurate, 0.4× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 64.6% accurate, 0.4× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 63.2% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\frac{U \cdot \frac{\left(U* - U\right) \cdot {n}^{2}}{Om} - 2 \cdot \left(n \cdot U\right)}{Om}} \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*)))) < 3.9999999989e-315

    1. Initial program 10.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}} \]
    8. Applied egg-rr32.0%

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

    if 3.9999999989e-315 < (*.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 68.9%

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 63.6% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 10.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}} \]
    8. Applied egg-rr32.0%

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

    if 3.9999999989e-315 < (*.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 68.9%

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

Alternative 8: 62.6% accurate, 0.4× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(U* \cdot \frac{n}{{Om}^{2}} - \frac{2}{Om}\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*)))) < 3.9999999989e-315

    1. Initial program 10.3%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}} \]
    8. Applied egg-rr32.0%

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

    if 3.9999999989e-315 < (*.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 68.9%

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

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

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

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

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

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

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

    if +inf.0 < (*.f64 (*.f64 (*.f64 #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. Simplified5.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 53.1% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.80000000000000036e151 < l

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 40.9% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
t_1 := \sqrt{\left|U \cdot \left(\left(2 \cdot n\right) \cdot t\right)\right|}\\
\mathbf{if}\;t \leq -1.1 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.6 \cdot 10^{-48} \lor \neg \left(t \leq 2.3 \cdot 10^{+197}\right):\\
\;\;\;\;\sqrt{n \cdot \left(2 \cdot U\right)} \cdot \sqrt{t}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1000000000000001e-194 or 3.6000000000000002e-48 < t < 2.3000000000000001e197

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.1000000000000001e-194 < t < 3.30000000000000018e-270

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

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

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

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

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

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

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

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

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

    if 3.30000000000000018e-270 < t < 3.6000000000000002e-48 or 2.3000000000000001e197 < t

    1. Initial program 52.1%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{-194}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(\left(2 \cdot n\right) \cdot t\right)\right|}\\ \mathbf{elif}\;t \leq 3.3 \cdot 10^{-270}:\\ \;\;\;\;\ell \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-48} \lor \neg \left(t \leq 2.3 \cdot 10^{+197}\right):\\ \;\;\;\;\sqrt{n \cdot \left(2 \cdot U\right)} \cdot \sqrt{t}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(\left(2 \cdot n\right) \cdot t\right)\right|}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 43.5% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;l\_m \leq 6.5 \cdot 10^{+182} \lor \neg \left(l\_m \leq 4.4 \cdot 10^{+209}\right):\\
\;\;\;\;\left(l\_m \cdot \sqrt{2}\right) \cdot \sqrt{\frac{-2 \cdot \left(n \cdot U\right)}{Om}}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.27999999999999997e104 < l < 6.4999999999999998e182 or 4.3999999999999997e209 < l

    1. Initial program 21.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. Simplified32.0%

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

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

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

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

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

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

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

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

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

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

    if 6.4999999999999998e182 < l < 4.3999999999999997e209

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 49.0% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 51.3%

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

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

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

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

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

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

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

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

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

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

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

    if 8.9999999999999993e-161 < l < 5.5000000000000003e153

    1. Initial program 60.7%

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

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

    if 5.5000000000000003e153 < l

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 41.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-310} \lor \neg \left(t \leq 2.05 \cdot 10^{-47}\right) \land t \leq 2 \cdot 10^{+197}:\\
\;\;\;\;\sqrt{\left|U \cdot \left(\left(2 \cdot n\right) \cdot t\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.999999999999985e-310 or 2.05000000000000001e-47 < t < 1.9999999999999999e197

    1. Initial program 49.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.999999999999985e-310 < t < 2.05000000000000001e-47 or 1.9999999999999999e197 < t

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-310} \lor \neg \left(t \leq 2.05 \cdot 10^{-47}\right) \land t \leq 2 \cdot 10^{+197}:\\ \;\;\;\;\sqrt{\left|U \cdot \left(\left(2 \cdot n\right) \cdot t\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(2 \cdot U\right)} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 47.5% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

    if 1.39999999999999991e140 < l

    1. Initial program 15.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. Simplified34.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 40.4% accurate, 1.0× speedup?

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

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

\mathbf{elif}\;n \leq 1.2 \cdot 10^{-164}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\

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


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

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.40000000000000018e-300 < n < 1.19999999999999992e-164

    1. Initial program 56.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. Simplified58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{t \cdot U}} \]
      7. *-commutative64.8%

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\color{blue}{U \cdot t}} \]
    8. Applied egg-rr64.8%

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

    if 1.19999999999999992e-164 < n

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 40.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 45.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.2e-300 < n < 4.9499999999999997e-163

    1. Initial program 56.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. Simplified58.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9499999999999997e-163 < n

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 43.8% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.70000000000000016e105 < l

    1. Initial program 19.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. Simplified36.3%

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 38.6% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 38.3% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 51.0%

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

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

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

    if 6.5000000000000004e-193 < l

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

Alternative 20: 37.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 21: 36.0% accurate, 2.1× speedup?

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

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

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

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

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

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

Alternative 22: 36.4% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

Reproduce

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