Toniolo and Linder, Equation (13)

Percentage Accurate: 49.3% → 64.8%
Time: 30.2s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 49.3% accurate, 1.0× speedup?

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

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

Alternative 1: 64.8% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

    1. Initial program 68.6%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 62.0% accurate, 0.3× speedup?

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

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

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

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


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

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

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

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

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

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

    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. Simplified12.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 9.7%

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

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

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

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

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

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

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 4: 65.2% accurate, 0.4× speedup?

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

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

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

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


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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

    1. Initial program 68.6%

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

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

    1. Initial program 0.0%

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

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

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

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

Alternative 5: 64.1% accurate, 0.4× speedup?

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

Alternative 6: 52.5% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.28000000000000001e57

    1. Initial program 43.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.28000000000000001e57 < t < 7.10000000000000019e208

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

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

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

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

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

    if 7.10000000000000019e208 < t

    1. Initial program 49.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 44.5% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.7999999999999999e-259 or 7.4000000000000002e-50 < t < 1.1e195

    1. Initial program 48.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. Simplified54.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 n around 0 47.5%

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

    if 1.7999999999999999e-259 < t < 7.4000000000000002e-50

    1. Initial program 48.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.1e195 < t

    1. Initial program 53.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. Simplified57.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. Step-by-step derivation
      1. associate-*r*61.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 46.4% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -8.50000000000000043e100

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.50000000000000043e100 < t < 9.9999999999999997e-49

    1. Initial program 45.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. Simplified45.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. Step-by-step derivation
      1. pow145.9%

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

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

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

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

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

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

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

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

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

    if 9.9999999999999997e-49 < t < 7.19999999999999999e194

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

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

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

    if 7.19999999999999999e194 < t

    1. Initial program 53.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. Simplified57.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. Step-by-step derivation
      1. associate-*r*61.2%

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 40.7% accurate, 1.0× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 2.3 \cdot 10^{+197}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.50000000000000009e-180 or 8.20000000000000003e-47 < t < 2.3000000000000001e197

    1. Initial program 49.5%

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

      \[\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 47.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000009e-180 < t < 8.7999999999999998e-271

    1. Initial program 39.2%

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

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

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

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

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

    if 8.7999999999999998e-271 < t < 8.20000000000000003e-47

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000001e197 < t

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{-180}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{elif}\;t \leq 8.8 \cdot 10^{-271}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\ \mathbf{elif}\;t \leq 8.2 \cdot 10^{-47}:\\ \;\;\;\;\sqrt{t} \cdot \sqrt{\left(2 \cdot n\right) \cdot U}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+197}:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t} \cdot \sqrt{2 \cdot \left(n \cdot U\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 40.8% accurate, 1.0× speedup?

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

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

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

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

\mathbf{elif}\;t \leq 10^{+197}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.45999999999999994e-184 or 3.9999999999999999e-47 < t < 9.9999999999999995e196

    1. Initial program 49.5%

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

      \[\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 47.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.45999999999999994e-184 < t < 1.75000000000000015e-266

    1. Initial program 39.2%

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

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

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

    if 1.75000000000000015e-266 < t < 3.9999999999999999e-47

    1. Initial program 49.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999995e196 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 53.6% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

    if 1.5e-34 < l

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

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

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

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

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

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

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

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

Alternative 12: 53.0% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 53.0%

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999978e-20 < l

    1. Initial program 35.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. Simplified46.3%

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

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

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

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

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

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

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

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

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

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

Alternative 13: 41.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.999999999999985e-310 or 1.8999999999999999e-49 < t < 9.2000000000000005e195

    1. Initial program 49.1%

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

      \[\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 41.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.999999999999985e-310 < t < 1.8999999999999999e-49 or 9.2000000000000005e195 < t

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 41.0% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;t \leq 3.2 \cdot 10^{+195}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < 1.4000000000000002e-308 or 7.50000000000000042e-48 < t < 3.19999999999999982e195

    1. Initial program 49.1%

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

      \[\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 41.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.4000000000000002e-308 < t < 7.50000000000000042e-48

    1. Initial program 43.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.19999999999999982e195 < t

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 47.8% accurate, 1.0× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om}}{Om}\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 (/ (* U* (/ (* n (pow l_m 2.0)) Om)) Om))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	return sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * pow(l_m, 2.0)) / Om)) / 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 + ((u_42 * ((n * (l_m ** 2.0d0)) / om)) / 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 + ((U_42_ * ((n * Math.pow(l_m, 2.0)) / Om)) / Om)))));
}
l_m = math.fabs(l)
def code(n, U, t, l_m, Om, U_42_):
	return math.sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * math.pow(l_m, 2.0)) / Om)) / 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(Float64(U_42_ * Float64(Float64(n * (l_m ^ 2.0)) / Om)) / Om)))))
end
l_m = abs(l);
function tmp = code(n, U, t, l_m, Om, U_42_)
	tmp = sqrt(((2.0 * n) * (U * (t + ((U_42_ * ((n * (l_m ^ 2.0)) / Om)) / 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[(N[(U$42$ * N[(N[(n * N[Power[l$95$m, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] / Om), $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 + \frac{U* \cdot \frac{n \cdot {l\_m}^{2}}{Om}}{Om}\right)\right)}
\end{array}
Derivation
  1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 38.3% accurate, 2.0× speedup?

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

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

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


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

    1. Initial program 51.0%

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

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

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

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

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

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

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

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

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

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

    if 1.5800000000000001e-193 < l

    1. Initial program 44.7%

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

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

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

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

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

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

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

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

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

Alternative 17: 37.9% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(U \cdot n\right) \cdot t\right)\right)}^{0.5}} \]
  9. Final simplification38.8%

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

Alternative 18: 36.0% accurate, 2.1× speedup?

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

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

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

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

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

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

Alternative 19: 36.0% accurate, 2.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

Reproduce

?
herbie shell --seed 2024095 
(FPCore (n U t l Om U*)
  :name "Toniolo and Linder, Equation (13)"
  :precision binary64
  (sqrt (* (* (* 2.0 n) U) (- (- t (* 2.0 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2.0)) (- U U*))))))