Toniolo and Linder, Equation (13)

Percentage Accurate: 49.6% → 68.9%
Time: 17.0s
Alternatives: 15
Speedup: 1.8×

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 15 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.6% 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: 68.9% accurate, 0.3× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} t_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)}\\ \mathbf{if}\;t_1 \leq 2 \cdot 10^{-145}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{elif}\;t_1 \leq 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l l) Om)))
            (* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
   (if (<= t_1 2e-145)
     (sqrt
      (*
       (* 2.0 n)
       (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
     (if (<= t_1 1e+154)
       t_1
       (*
        (sqrt 2.0)
        (* l (sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 2e-145) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (t_1 <= 1e+154) {
		tmp = t_1;
	} else {
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: t_1
    real(8) :: tmp
    t_1 = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) + ((n * ((l / om) ** 2.0d0)) * (u_42 - u)))))
    if (t_1 <= 2d-145) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else if (t_1 <= 1d+154) then
        tmp = t_1
    else
        tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (n / (om / u_42))))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * Math.pow((l / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 2e-145) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (t_1 <= 1e+154) {
		tmp = t_1;
	} else {
		tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	t_1 = math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * math.pow((l / Om), 2.0)) * (U_42_ - U)))))
	tmp = 0
	if t_1 <= 2e-145:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	elif t_1 <= 1e+154:
		tmp = t_1
	else:
		tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	t_1 = 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_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 2e-145)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	elseif (t_1 <= 1e+154)
		tmp = t_1;
	else
		tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_)))))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * ((l / Om) ^ 2.0)) * (U_42_ - U)))));
	tmp = 0.0;
	if (t_1 <= 2e-145)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	elseif (t_1 <= 1e+154)
		tmp = t_1;
	else
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 2e-145], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 1e+154], t$95$1, N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
t_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)}\\
\mathbf{if}\;t_1 \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\

\mathbf{elif}\;t_1 \leq 10^{+154}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999983e-145

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

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

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

    if 1.99999999999999983e-145 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.00000000000000004e154

    1. Initial program 97.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)} \]

    if 1.00000000000000004e154 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 63.0% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{-52}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+154}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.7e-52)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (if (<= l 7.5e+154)
     (sqrt
      (*
       (* 2.0 n)
       (* U (+ t (* (/ l Om) (fma l -2.0 (* (/ l Om) (* n (- U* U)))))))))
     (* (* l (sqrt 2.0)) (sqrt (/ (* n (* U (- (/ (* n U*) Om) 2.0))) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.7e-52) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else if (l <= 7.5e+154) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l / Om) * fma(l, -2.0, ((l / Om) * (n * (U_42_ - U)))))))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
	}
	return tmp;
}
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.7e-52)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	elseif (l <= 7.5e+154)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(Float64(l / Om) * Float64(n * Float64(U_42_ - U)))))))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 2.0))) / Om)));
	end
	return tmp
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.7e-52], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[l, 7.5e+154], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(N[(l / Om), $MachinePrecision] * N[(n * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{-52}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\

\mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+154}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\

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


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

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

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

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

    if 1.70000000000000009e-52 < l < 7.5000000000000004e154

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

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

    if 7.5000000000000004e154 < l

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{-52}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+154}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{\ell}{Om} \cdot \left(n \cdot \left(U* - U\right)\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\ \end{array} \]

Alternative 3: 62.1% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 5 \cdot 10^{+153}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n}{\frac{Om}{U \cdot \left(-2 + \frac{n}{\frac{Om}{U*}}\right)}}}\right)\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 5e+153)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (* (sqrt 2.0) (* l (sqrt (/ n (/ Om (* U (+ -2.0 (/ n (/ Om U*)))))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 5e+153) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 5d+153) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else
        tmp = sqrt(2.0d0) * (l * sqrt((n / (om / (u * ((-2.0d0) + (n / (om / u_42))))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 5e+153) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = Math.sqrt(2.0) * (l * Math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 5e+153:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	else:
		tmp = math.sqrt(2.0) * (l * math.sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 5e+153)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	else
		tmp = Float64(sqrt(2.0) * Float64(l * sqrt(Float64(n / Float64(Om / Float64(U * Float64(-2.0 + Float64(n / Float64(Om / U_42_)))))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 5e+153)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	else
		tmp = sqrt(2.0) * (l * sqrt((n / (Om / (U * (-2.0 + (n / (Om / U_42_))))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5e+153], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[2.0], $MachinePrecision] * N[(l * N[Sqrt[N[(n / N[(Om / N[(U * N[(-2.0 + N[(n / N[(Om / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\

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


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

    1. Initial program 54.4%

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

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

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

    if 5.00000000000000018e153 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 62.1% accurate, 1.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.7 \cdot 10^{+153}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.7e+153)
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))
   (* (* l (sqrt 2.0)) (sqrt (/ (* n (* U (- (/ (* n U*) Om) 2.0))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.7e+153) {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 1.7d+153) then
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    else
        tmp = (l * sqrt(2.0d0)) * sqrt(((n * (u * (((n * u_42) / om) - 2.0d0))) / om))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.7e+153) {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	} else {
		tmp = (l * Math.sqrt(2.0)) * Math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.7e+153:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	else:
		tmp = (l * math.sqrt(2.0)) * math.sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.7e+153)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	else
		tmp = Float64(Float64(l * sqrt(2.0)) * sqrt(Float64(Float64(n * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 2.0))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.7e+153)
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	else
		tmp = (l * sqrt(2.0)) * sqrt(((n * (U * (((n * U_42_) / Om) - 2.0))) / Om));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.7e+153], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(N[(n * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.7 \cdot 10^{+153}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\

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


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

    1. Initial program 54.4%

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

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

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

    if 1.6999999999999999e153 < l

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

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

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

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

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

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

Alternative 5: 58.1% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -1.7 \cdot 10^{+144} \lor \neg \left(Om \leq 4.2 \cdot 10^{+96}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{n \cdot \left(\ell \cdot \left(U - U*\right)\right)}{Om} - \ell \cdot -2\right)}{Om} \cdot 2}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= Om -1.7e+144) (not (<= Om 4.2e+96)))
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt
    (-
     (* 2.0 (* n (* U t)))
     (*
      (/ (* (* n (* U l)) (- (/ (* n (* l (- U U*))) Om) (* l -2.0))) Om)
      2.0)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -1.7e+144) || !(Om <= 4.2e+96)) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if ((om <= (-1.7d+144)) .or. (.not. (om <= 4.2d+96))) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt(((2.0d0 * (n * (u * t))) - ((((n * (u * l)) * (((n * (l * (u - u_42))) / om) - (l * (-2.0d0)))) / om) * 2.0d0)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -1.7e+144) || !(Om <= 4.2e+96)) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (Om <= -1.7e+144) or not (Om <= 4.2e+96):
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((Om <= -1.7e+144) || !(Om <= 4.2e+96))
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) - Float64(Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(Float64(n * Float64(l * Float64(U - U_42_))) / Om) - Float64(l * -2.0))) / Om) * 2.0)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((Om <= -1.7e+144) || ~((Om <= 4.2e+96)))
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt(((2.0 * (n * (U * t))) - ((((n * (U * l)) * (((n * (l * (U - U_42_))) / Om) - (l * -2.0))) / Om) * 2.0)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -1.7e+144], N[Not[LessEqual[Om, 4.2e+96]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * N[(l * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] - N[(l * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -1.7 \cdot 10^{+144} \lor \neg \left(Om \leq 4.2 \cdot 10^{+96}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -1.7e144 or 4.2000000000000002e96 < Om

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

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

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

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

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

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

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

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

    if -1.7e144 < Om < 4.2000000000000002e96

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -1.7 \cdot 10^{+144} \lor \neg \left(Om \leq 4.2 \cdot 10^{+96}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) - \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{n \cdot \left(\ell \cdot \left(U - U*\right)\right)}{Om} - \ell \cdot -2\right)}{Om} \cdot 2}\\ \end{array} \]

Alternative 6: 58.1% accurate, 1.7× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -7 \cdot 10^{+143} \lor \neg \left(Om \leq 1.8 \cdot 10^{+98}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= Om -7e+143) (not (<= Om 1.8e+98)))
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt
    (+
     (* 2.0 (* n (* U t)))
     (* 2.0 (/ (* (* n (* U l)) (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -7e+143) || !(Om <= 1.8e+98)) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if ((om <= (-7d+143)) .or. (.not. (om <= 1.8d+98))) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt(((2.0d0 * (n * (u * t))) + (2.0d0 * (((n * (u * l)) * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -7e+143) || !(Om <= 1.8e+98)) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (Om <= -7e+143) or not (Om <= 1.8e+98):
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((Om <= -7e+143) || !(Om <= 1.8e+98))
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * Float64(U * t))) + Float64(2.0 * Float64(Float64(Float64(n * Float64(U * l)) * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((Om <= -7e+143) || ~((Om <= 1.8e+98)))
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt(((2.0 * (n * (U * t))) + (2.0 * (((n * (U * l)) * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -7e+143], N[Not[LessEqual[Om, 1.8e+98]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(N[(N[(n * N[(U * l), $MachinePrecision]), $MachinePrecision] * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -7 \cdot 10^{+143} \lor \neg \left(Om \leq 1.8 \cdot 10^{+98}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -7.00000000000000017e143 or 1.7999999999999999e98 < Om

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

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

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

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

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

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

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

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

    if -7.00000000000000017e143 < Om < 1.7999999999999999e98

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -7 \cdot 10^{+143} \lor \neg \left(Om \leq 1.8 \cdot 10^{+98}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + 2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}}\\ \end{array} \]

Alternative 7: 57.4% accurate, 1.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -3.6 \cdot 10^{+188} \lor \neg \left(Om \leq 1.32 \cdot 10^{+82}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= Om -3.6e+188) (not (<= Om 1.32e+82)))
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt
    (*
     (* 2.0 n)
     (* U (+ t (/ (* l (+ (* l -2.0) (/ (* n (* l U*)) Om))) Om)))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -3.6e+188) || !(Om <= 1.32e+82)) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if ((om <= (-3.6d+188)) .or. (.not. (om <= 1.32d+82))) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt(((2.0d0 * n) * (u * (t + ((l * ((l * (-2.0d0)) + ((n * (l * u_42)) / om))) / om)))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -3.6e+188) || !(Om <= 1.32e+82)) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (Om <= -3.6e+188) or not (Om <= 1.32e+82):
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((Om <= -3.6e+188) || !(Om <= 1.32e+82))
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t + Float64(Float64(l * Float64(Float64(l * -2.0) + Float64(Float64(n * Float64(l * U_42_)) / Om))) / Om)))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((Om <= -3.6e+188) || ~((Om <= 1.32e+82)))
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt(((2.0 * n) * (U * (t + ((l * ((l * -2.0) + ((n * (l * U_42_)) / Om))) / Om)))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -3.6e+188], N[Not[LessEqual[Om, 1.32e+82]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t + N[(N[(l * N[(N[(l * -2.0), $MachinePrecision] + N[(N[(n * N[(l * U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -3.6 \cdot 10^{+188} \lor \neg \left(Om \leq 1.32 \cdot 10^{+82}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -3.60000000000000021e188 or 1.32e82 < Om

    1. Initial program 53.8%

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

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

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

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

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

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

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

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

    if -3.60000000000000021e188 < Om < 1.32e82

    1. Initial program 48.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -3.6 \cdot 10^{+188} \lor \neg \left(Om \leq 1.32 \cdot 10^{+82}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \frac{\ell \cdot \left(\ell \cdot -2 + \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om}\right)\right)}\\ \end{array} \]

Alternative 8: 51.3% accurate, 1.8× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;Om \leq -2.5 \cdot 10^{-102} \lor \neg \left(Om \leq 1.15 \cdot 10^{-56}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= Om -2.5e-102) (not (<= Om 1.15e-56)))
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt (* 2.0 (/ (* n (* l (* l (* U (- (/ (* n U*) Om) 2.0))))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -2.5e-102) || !(Om <= 1.15e-56)) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt((2.0 * ((n * (l * (l * (U * (((n * U_42_) / Om) - 2.0))))) / Om)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if ((om <= (-2.5d-102)) .or. (.not. (om <= 1.15d-56))) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt((2.0d0 * ((n * (l * (l * (u * (((n * u_42) / om) - 2.0d0))))) / om)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((Om <= -2.5e-102) || !(Om <= 1.15e-56)) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt((2.0 * ((n * (l * (l * (U * (((n * U_42_) / Om) - 2.0))))) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (Om <= -2.5e-102) or not (Om <= 1.15e-56):
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt((2.0 * ((n * (l * (l * (U * (((n * U_42_) / Om) - 2.0))))) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((Om <= -2.5e-102) || !(Om <= 1.15e-56))
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(l * Float64(U * Float64(Float64(Float64(n * U_42_) / Om) - 2.0))))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((Om <= -2.5e-102) || ~((Om <= 1.15e-56)))
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt((2.0 * ((n * (l * (l * (U * (((n * U_42_) / Om) - 2.0))))) / Om)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[Om, -2.5e-102], N[Not[LessEqual[Om, 1.15e-56]], $MachinePrecision]], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(l * N[(U * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;Om \leq -2.5 \cdot 10^{-102} \lor \neg \left(Om \leq 1.15 \cdot 10^{-56}\right):\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if Om < -2.50000000000000013e-102 or 1.15000000000000001e-56 < Om

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

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

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

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

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

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

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

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

    if -2.50000000000000013e-102 < Om < 1.15000000000000001e-56

    1. Initial program 34.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;Om \leq -2.5 \cdot 10^{-102} \lor \neg \left(Om \leq 1.15 \cdot 10^{-56}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot U*}{Om} - 2\right)\right)\right)\right)}{Om}}\\ \end{array} \]

Alternative 9: 48.3% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 5.5 \cdot 10^{+205}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot n}{\frac{Om}{U*} \cdot \frac{\frac{Om}{U}}{\ell \cdot \ell}}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 5.5e+205)
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt (* 2.0 (/ (* n n) (* (/ Om U*) (/ (/ Om U) (* l l))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 5.5e+205) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l))))));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 5.5d+205) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt((2.0d0 * ((n * n) / ((om / u_42) * ((om / u) / (l * l))))))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 5.5e+205) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l))))));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 5.5e+205:
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l))))))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 5.5e+205)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * n) / Float64(Float64(Om / U_42_) * Float64(Float64(Om / U) / Float64(l * l))))));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 5.5e+205)
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt((2.0 * ((n * n) / ((Om / U_42_) * ((Om / U) / (l * l))))));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 5.5e+205], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * n), $MachinePrecision] / N[(N[(Om / U$42$), $MachinePrecision] * N[(N[(Om / U), $MachinePrecision] / N[(l * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 5.5 \cdot 10^{+205}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \frac{n \cdot n}{\frac{Om}{U*} \cdot \frac{\frac{Om}{U}}{\ell \cdot \ell}}}\\


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

    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. Simplified58.3%

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

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

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

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

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

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

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

    if 5.50000000000000004e205 < l

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \sqrt{2 \cdot \frac{n \cdot n}{\color{blue}{\frac{Om}{{\ell}^{2} \cdot U} \cdot \frac{Om}{U*}}}} \]
      6. *-commutative24.3%

        \[\leadsto \sqrt{2 \cdot \frac{n \cdot n}{\frac{Om}{\color{blue}{U \cdot {\ell}^{2}}} \cdot \frac{Om}{U*}}} \]
      7. associate-/r*24.3%

        \[\leadsto \sqrt{2 \cdot \frac{n \cdot n}{\color{blue}{\frac{\frac{Om}{U}}{{\ell}^{2}}} \cdot \frac{Om}{U*}}} \]
      8. unpow224.3%

        \[\leadsto \sqrt{2 \cdot \frac{n \cdot n}{\frac{\frac{Om}{U}}{\color{blue}{\ell \cdot \ell}} \cdot \frac{Om}{U*}}} \]
    8. Simplified24.3%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \frac{n \cdot n}{\frac{\frac{Om}{U}}{\ell \cdot \ell} \cdot \frac{Om}{U*}}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification51.2%

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

Alternative 10: 48.8% accurate, 1.9× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 8 \cdot 10^{+205}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot U*\right)\right)}{Om}\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 8e+205)
   (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om))))))))
   (sqrt (* 2.0 (/ (* n (* l (/ (* n (* l (* U U*))) Om))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 8e+205) {
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 8d+205) then
        tmp = sqrt((2.0d0 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
    else
        tmp = sqrt((2.0d0 * ((n * (l * ((n * (l * (u * u_42))) / om))) / om)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 8e+205) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	} else {
		tmp = Math.sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 8e+205:
		tmp = math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
	else:
		tmp = math.sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 8e+205)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(Float64(n * Float64(l * Float64(U * U_42_))) / Om))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 8e+205)
		tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
	else
		tmp = sqrt((2.0 * ((n * (l * ((n * (l * (U * U_42_))) / Om))) / Om)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 8e+205], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(N[(n * N[(l * N[(U * U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 8 \cdot 10^{+205}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

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


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

    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. Simplified58.3%

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

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

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

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

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

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

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

    if 8.00000000000000013e205 < l

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

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

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

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

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

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

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

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

Alternative 11: 41.6% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;\ell \leq 1.5 \cdot 10^{+108}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\ell \cdot \left(-2 \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= l 1.5e+108)
   (sqrt (* U (* (* 2.0 n) t)))
   (sqrt (* 2.0 (/ (* n (* l (* -2.0 (* U l)))) Om)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.5e+108) {
		tmp = sqrt((U * ((2.0 * n) * t)));
	} else {
		tmp = sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (l <= 1.5d+108) then
        tmp = sqrt((u * ((2.0d0 * n) * t)))
    else
        tmp = sqrt((2.0d0 * ((n * (l * ((-2.0d0) * (u * l)))) / om)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (l <= 1.5e+108) {
		tmp = Math.sqrt((U * ((2.0 * n) * t)));
	} else {
		tmp = Math.sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if l <= 1.5e+108:
		tmp = math.sqrt((U * ((2.0 * n) * t)))
	else:
		tmp = math.sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (l <= 1.5e+108)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * t)));
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(l * Float64(-2.0 * Float64(U * l)))) / Om)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (l <= 1.5e+108)
		tmp = sqrt((U * ((2.0 * n) * t)));
	else
		tmp = sqrt((2.0 * ((n * (l * (-2.0 * (U * l)))) / Om)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[l, 1.5e+108], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(2.0 * N[(N[(n * N[(l * N[(-2.0 * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1.5 \cdot 10^{+108}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}\\

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


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

    1. Initial program 54.8%

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

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

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

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

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

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

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

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

    if 1.49999999999999992e108 < l

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

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

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

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

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

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

Alternative 12: 48.1% accurate, 2.0× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (sqrt (* 2.0 (* U (* n (+ t (* -2.0 (* l (/ l Om)))))))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
}
NOTE: l should be positive before calling this function
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 * (u * (n * (t + ((-2.0d0) * (l * (l / om))))))))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(-2.0 * Float64(l * Float64(l / Om))))))))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * (t + (-2.0 * (l * (l / Om))))))));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(-2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + -2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

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

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

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

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

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

Alternative 13: 35.1% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \begin{array}{l} \mathbf{if}\;n \leq -5.5 \cdot 10^{-159}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \end{array} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n -5.5e-159)
   (sqrt (* (* (* 2.0 n) U) t))
   (sqrt (* (* 2.0 n) (* U t)))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -5.5e-159) {
		tmp = sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = sqrt(((2.0 * n) * (U * t)));
	}
	return tmp;
}
NOTE: l should be positive before calling this function
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
    real(8) :: tmp
    if (n <= (-5.5d-159)) then
        tmp = sqrt((((2.0d0 * n) * u) * t))
    else
        tmp = sqrt(((2.0d0 * n) * (u * t)))
    end if
    code = tmp
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= -5.5e-159) {
		tmp = Math.sqrt((((2.0 * n) * U) * t));
	} else {
		tmp = Math.sqrt(((2.0 * n) * (U * t)));
	}
	return tmp;
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= -5.5e-159:
		tmp = math.sqrt((((2.0 * n) * U) * t))
	else:
		tmp = math.sqrt(((2.0 * n) * (U * t)))
	return tmp
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= -5.5e-159)
		tmp = sqrt(Float64(Float64(Float64(2.0 * n) * U) * t));
	else
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * t)));
	end
	return tmp
end
l = abs(l)
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= -5.5e-159)
		tmp = sqrt((((2.0 * n) * U) * t));
	else
		tmp = sqrt(((2.0 * n) * (U * t)));
	end
	tmp_2 = tmp;
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, -5.5e-159], N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * t), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}
l = |l|\\
\\
\begin{array}{l}
\mathbf{if}\;n \leq -5.5 \cdot 10^{-159}:\\
\;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\

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


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

    1. Initial program 58.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. Step-by-step derivation
      1. associate-/l*59.3%

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

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

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

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

    if -5.5000000000000003e-159 < n

    1. Initial program 46.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq -5.5 \cdot 10^{-159}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot t}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \end{array} \]

Alternative 14: 34.6% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* 2.0 n) (* U t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt(((2.0 * n) * (U * t)));
}
NOTE: l should be positive before calling this function
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)))
end function
l = Math.abs(l);
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)));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((2.0 * n) * (U * t)))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(2.0 * n) * Float64(U * t)))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((2.0 * n) * (U * t)));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

Alternative 15: 35.7% accurate, 2.1× speedup?

\[\begin{array}{l} l = |l|\\ \\ \sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)} \end{array} \]
NOTE: l should be positive before calling this function
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* U (* (* 2.0 n) t))))
l = abs(l);
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((U * ((2.0 * n) * t)));
}
NOTE: l should be positive before calling this function
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((u * ((2.0d0 * n) * t)))
end function
l = Math.abs(l);
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((U * ((2.0 * n) * t)));
}
l = abs(l)
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((U * ((2.0 * n) * t)))
l = abs(l)
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(U * Float64(Float64(2.0 * n) * t)))
end
l = abs(l)
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((U * ((2.0 * n) * t)));
end
NOTE: l should be positive before calling this function
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
l = |l|\\
\\
\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot t\right)}
\end{array}
Derivation
  1. Initial program 50.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. Simplified56.5%

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

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

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

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

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

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

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

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

Reproduce

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