Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 69.9%
Time: 23.2s
Alternatives: 12
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 12 alternatives:

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

Initial Program: 50.1% 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: 69.9% accurate, 0.4× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.0000000000000003e302 < (*.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 20.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. Simplified23.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 62.4% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left|\left(2 \cdot n\right) \cdot t\_1\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*))))) < 0.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.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*))))) < +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. Simplified71.0%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 65.1% accurate, 0.4× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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*)))) < 4.0000000000000003e302

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

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

    if 4.0000000000000003e302 < (*.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 20.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. Simplified23.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.8% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 62.7% accurate, 0.5× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

Alternative 6: 51.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;n \leq -1.2 \cdot 10^{-37} \lor \neg \left(n \leq 1.1 \cdot 10^{-81}\right):\\
\;\;\;\;{\left(\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(t + -2 \cdot \frac{{l\_m}^{2}}{Om}\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < -1.19999999999999995e-37 or 1.1e-81 < n

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

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

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

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

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

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

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

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

    if -1.19999999999999995e-37 < n < 1.1e-81

    1. Initial program 43.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. Simplified51.2%

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

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

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

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

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

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

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

Alternative 7: 48.3% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

    if 2.4e177 < l

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

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

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

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

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

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

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

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

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

Alternative 8: 47.5% accurate, 2.0× speedup?

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

\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - 2 \cdot \left(l\_m \cdot \frac{l\_m}{Om}\right)\right)\right)}
\end{array}
Derivation
  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. Simplified53.6%

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

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

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

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

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

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

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

Alternative 9: 37.5% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 4.9999999999999998e-235

    1. Initial program 46.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999998e-235 < Om

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

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

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

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

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

Alternative 10: 36.4% accurate, 2.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < 1.64999999999999993e-232

    1. Initial program 46.4%

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

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

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

    if 1.64999999999999993e-232 < Om

    1. Initial program 54.5%

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

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

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

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

Alternative 11: 36.0% accurate, 2.1× speedup?

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

\\
\sqrt{t \cdot \left(n \cdot \left(2 \cdot U\right)\right)}
\end{array}
Derivation
  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. Simplified52.3%

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

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

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

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

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

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

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

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

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

Alternative 12: 36.6% accurate, 2.1× speedup?

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

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

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

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

Reproduce

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