Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 64.7%
Time: 23.1s
Alternatives: 20
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 20 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.5% accurate, 1.0× speedup?

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

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

Alternative 1: 64.7% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 4.99999999999999965e-304

    1. Initial program 46.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. Simplified57.4%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr62.4%

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

    if 4.99999999999999965e-304 < U

    1. Initial program 50.2%

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutativeN/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right) \cdot 2} \]
      2. associate-*r*N/A

        \[\leadsto \sqrt{\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot n\right) \cdot U\right) \cdot 2} \]
      3. associate-*l*N/A

        \[\leadsto \sqrt{\left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot n\right) \cdot \left(U \cdot 2\right)} \]
      4. sqrt-prodN/A

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

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

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

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

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

Alternative 2: 64.0% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 4.99999999999999965e-304

    1. Initial program 46.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. Simplified57.4%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr62.4%

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

    if 4.99999999999999965e-304 < U

    1. Initial program 50.2%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6457.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified57.2%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(\frac{\ell \cdot n}{Om} \cdot U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell \cdot n}{Om}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \frac{n}{Om}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{n}{Om} \cdot \ell\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      5. associate-/r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{n}{\frac{Om}{\ell}}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(n, \left(\frac{Om}{\ell}\right)\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      7. /-lowering-/.f6458.7%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(n, \mathsf{/.f64}\left(Om, \ell\right)\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    8. Applied egg-rr58.7%

      \[\leadsto \sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\color{blue}{\frac{n}{\frac{Om}{\ell}} \cdot U*} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)} \]
    9. Step-by-step derivation
      1. pow1/2N/A

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

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right) \cdot 2\right)}^{\frac{1}{2}} \]
      3. associate-*r*N/A

        \[\leadsto {\left(\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot n\right) \cdot U\right) \cdot 2\right)}^{\frac{1}{2}} \]
      4. associate-*l*N/A

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot n\right) \cdot \left(U \cdot 2\right)\right)}^{\frac{1}{2}} \]
      5. *-commutativeN/A

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot n\right) \cdot \left(2 \cdot U\right)\right)}^{\frac{1}{2}} \]
      6. unpow-prod-downN/A

        \[\leadsto {\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot n\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\left(t + \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{\ell}} \cdot U* + \ell \cdot -2\right)\right) \cdot n\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(2 \cdot U\right)}^{\frac{1}{2}}\right)}\right) \]
    10. Applied egg-rr72.6%

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

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

Alternative 3: 63.1% accurate, 1.0× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U < 4.99999999999999965e-304

    1. Initial program 46.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. Simplified57.4%

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr62.4%

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

    if 4.99999999999999965e-304 < U

    1. Initial program 50.2%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6457.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified57.2%

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

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

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right) \cdot 2\right)}^{\frac{1}{2}} \]
      3. associate-*r*N/A

        \[\leadsto {\left(\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot n\right) \cdot U\right) \cdot 2\right)}^{\frac{1}{2}} \]
      4. associate-*l*N/A

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot n\right) \cdot \left(U \cdot 2\right)\right)}^{\frac{1}{2}} \]
      5. *-commutativeN/A

        \[\leadsto {\left(\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot n\right) \cdot \left(2 \cdot U\right)\right)}^{\frac{1}{2}} \]
      6. unpow-prod-downN/A

        \[\leadsto {\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot n\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({\left(\left(t + \frac{\ell}{Om} \cdot \left(U* \cdot \frac{\ell \cdot n}{Om} + \ell \cdot -2\right)\right) \cdot n\right)}^{\frac{1}{2}}\right), \color{blue}{\left({\left(2 \cdot U\right)}^{\frac{1}{2}}\right)}\right) \]
    8. Applied egg-rr72.0%

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

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

Alternative 4: 61.1% accurate, 1.0× speedup?

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

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

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr64.3%

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

    if 2.34999999999999996e232 < l

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6449.6%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified49.6%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6457.1%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified57.1%

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

      \[\leadsto \color{blue}{\sqrt{\frac{U \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)}{Om}} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    11. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{\frac{U \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)}{Om}}\right), \color{blue}{\left(\ell \cdot \sqrt{2}\right)}\right) \]
      2. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\left(\frac{U \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)}{Om}\right)\right), \left(\color{blue}{\ell} \cdot \sqrt{2}\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(U \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(U \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(U \cdot n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      7. sub-negN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \left(\frac{U* \cdot n}{Om} + \left(\mathsf{neg}\left(2\right)\right)\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      8. metadata-evalN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \left(\frac{U* \cdot n}{Om} + -2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      9. +-lowering-+.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \mathsf{+.f64}\left(\left(\frac{U* \cdot n}{Om}\right), -2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(U* \cdot n\right), Om\right), -2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, n\right), Om\right), -2\right)\right), Om\right)\right), \left(\ell \cdot \sqrt{2}\right)\right) \]
      12. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, n\right), Om\right), -2\right)\right), Om\right)\right), \mathsf{*.f64}\left(\ell, \color{blue}{\left(\sqrt{2}\right)}\right)\right) \]
      13. sqrt-lowering-sqrt.f6474.5%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, n\right), Om\right), -2\right)\right), Om\right)\right), \mathsf{*.f64}\left(\ell, \mathsf{sqrt.f64}\left(2\right)\right)\right) \]
    12. Simplified74.5%

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

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

Alternative 5: 60.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.59999999999999995e225

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

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

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

    if 1.59999999999999995e225 < t

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot t\right)\right)\right) \]
      4. *-lowering-*.f6434.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, t\right)\right)\right) \]
    6. Simplified34.9%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(t \cdot n\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot U\right) \cdot t\right) \cdot n\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot U\right) \cdot t\right), n\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), t\right), n\right)\right) \]
      5. *-lowering-*.f6429.6%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), t\right), n\right)\right) \]
    8. Applied egg-rr29.6%

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

        \[\leadsto \sqrt{\left(t \cdot \left(2 \cdot U\right)\right) \cdot n} \]
      2. associate-*l*N/A

        \[\leadsto \sqrt{t \cdot \left(\left(2 \cdot U\right) \cdot n\right)} \]
      3. sqrt-prodN/A

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

        \[\leadsto {t}^{\frac{1}{2}} \cdot \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot n}} \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\left({t}^{\frac{1}{2}}\right), \color{blue}{\left(\sqrt{\left(2 \cdot U\right) \cdot n}\right)}\right) \]
      6. pow1/2N/A

        \[\leadsto \mathsf{*.f64}\left(\left(\sqrt{t}\right), \left(\sqrt{\color{blue}{\left(2 \cdot U\right) \cdot n}}\right)\right) \]
      7. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(t\right), \left(\sqrt{\color{blue}{\left(2 \cdot U\right) \cdot n}}\right)\right) \]
      8. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(t\right), \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot n\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(t\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), n\right)\right)\right) \]
      10. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(t\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(U \cdot 2\right), n\right)\right)\right) \]
      11. *-lowering-*.f6469.0%

        \[\leadsto \mathsf{*.f64}\left(\mathsf{sqrt.f64}\left(t\right), \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), n\right)\right)\right) \]
    10. Applied egg-rr69.0%

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

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

Alternative 6: 57.6% accurate, 1.7× speedup?

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

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

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

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr63.5%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot \left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{\frac{Om}{\ell}} + t\right)\right), n\right), U\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{\frac{Om}{\ell}} \cdot 2 + t \cdot 2\right), n\right), U\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \ell\right) \cdot 2 + t \cdot 2\right), n\right), U\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \left(\ell \cdot 2\right) + t \cdot 2\right), n\right), U\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \left(\ell \cdot 2\right) + 2 \cdot t\right), n\right), U\right)\right) \]
      6. fma-defineN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{fma}\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om}, \ell \cdot 2, 2 \cdot t\right)\right), n\right), U\right)\right) \]
      7. fma-lowering-fma.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{fma.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om}\right), \left(\ell \cdot 2\right), \left(2 \cdot t\right)\right), n\right), U\right)\right) \]
    7. Applied egg-rr61.9%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot t + 2 \cdot \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)}, n\right), U\right)\right) \]
    9. Step-by-step derivation
      1. distribute-lft-outN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot \left(t + \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right), n\right), U\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t + \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right), n\right), U\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \left(\frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right)\right), n\right), U\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      11. *-lowering-*.f6458.4%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
    10. Simplified58.4%

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

    if 2.25e-11 < l < 1e173

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(U \cdot n\right)\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot U\right) \cdot n\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot U\right), n\right)\right) \]
    5. Applied egg-rr73.2%

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

    if 1e173 < l

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6443.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified43.3%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6441.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified41.5%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(U \cdot \ell\right) \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(U \cdot \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      13. *-lowering-*.f6462.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
    12. Simplified62.9%

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

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

Alternative 7: 57.2% accurate, 1.8× speedup?

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

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

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr64.8%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot \left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{\frac{Om}{\ell}} + t\right)\right), n\right), U\right)\right) \]
      2. distribute-rgt-inN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{\frac{Om}{\ell}} \cdot 2 + t \cdot 2\right), n\right), U\right)\right) \]
      3. associate-/r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \ell\right) \cdot 2 + t \cdot 2\right), n\right), U\right)\right) \]
      4. associate-*l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \left(\ell \cdot 2\right) + t \cdot 2\right), n\right), U\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om} \cdot \left(\ell \cdot 2\right) + 2 \cdot t\right), n\right), U\right)\right) \]
      6. fma-defineN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\mathsf{fma}\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om}, \ell \cdot 2, 2 \cdot t\right)\right), n\right), U\right)\right) \]
      7. fma-lowering-fma.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{fma.f64}\left(\left(\frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{Om}\right), \left(\ell \cdot 2\right), \left(2 \cdot t\right)\right), n\right), U\right)\right) \]
    7. Applied egg-rr63.4%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot t + 2 \cdot \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)}, n\right), U\right)\right) \]
    9. Step-by-step derivation
      1. distribute-lft-outN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot \left(t + \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right), n\right), U\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \left(t + \frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right), n\right), U\right)\right) \]
      3. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \left(\frac{\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right)\right), n\right), U\right)\right) \]
      4. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\left(\ell \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      6. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      8. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
      11. *-lowering-*.f6460.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, \mathsf{+.f64}\left(t, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right), Om\right)\right)\right), n\right), U\right)\right) \]
    10. Simplified60.3%

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

    if 2.2e104 < l

    1. Initial program 11.4%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6447.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified47.8%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6443.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified43.5%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(U \cdot \ell\right) \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(U \cdot \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      13. *-lowering-*.f6461.0%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
    12. Simplified61.0%

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

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

Alternative 8: 59.4% accurate, 1.8× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6458.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified58.2%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(\frac{\ell \cdot n}{Om} \cdot U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{\ell \cdot n}{Om}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \frac{n}{Om}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{n}{Om} \cdot \ell\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      5. associate-/r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\left(\frac{n}{\frac{Om}{\ell}}\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(n, \left(\frac{Om}{\ell}\right)\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      7. /-lowering-/.f6459.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(n, \mathsf{/.f64}\left(Om, \ell\right)\right), U*\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    8. Applied egg-rr59.8%

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

    if 1.3499999999999999e219 < l

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6447.4%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified47.4%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6449.1%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified49.1%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(U \cdot \ell\right) \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(U \cdot \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      13. *-lowering-*.f6468.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
    12. Simplified68.2%

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

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

Alternative 9: 58.4% accurate, 1.8× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6458.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified58.9%

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

    if 9.99999999999999966e89 < l

    1. Initial program 15.8%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6448.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified48.2%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6449.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified49.2%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(U \cdot \ell\right) \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(U \cdot \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      13. *-lowering-*.f6464.7%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
    12. Simplified64.7%

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

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

Alternative 10: 48.8% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 53.2%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6451.1%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified51.1%

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

    if 5.5e71 < l

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6452.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified52.2%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6450.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified50.8%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(\left(U \cdot \ell\right) \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\left(U \cdot \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(U* \cdot \frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
      13. *-lowering-*.f6463.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{*.f64}\left(U, \ell\right), \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right)\right)\right)\right)\right), Om\right)\right) \]
    12. Simplified63.9%

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

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

Alternative 11: 47.9% accurate, 1.8× speedup?

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

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

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


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

    1. Initial program 53.4%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6451.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified51.3%

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

    if 1.24999999999999993e65 < l

    1. Initial program 24.5%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6451.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified51.2%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6449.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified49.9%

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\left(2 \cdot U\right) \cdot \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)}{Om}\right)\right) \]
      2. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \frac{\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(\frac{\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right)\right) \]
      4. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(U \cdot 2\right), \left(\frac{\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \left(\frac{\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)}{Om}\right)\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(\ell \cdot -2 + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right), Om\right)\right)\right) \]
      10. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(\ell \cdot -2\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, -2\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right), Om\right)\right)\right) \]
      12. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, -2\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right), Om\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, -2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right), Om\right)\right)\right) \]
      14. *-lowering-*.f6447.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U, 2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(\ell, -2\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right), Om\right)\right)\right) \]
    11. Applied egg-rr47.8%

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

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

Alternative 12: 59.8% accurate, 1.8× speedup?

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

\\
\sqrt{U \cdot \left(n \cdot \left(2 \cdot \left(t + \frac{\frac{U* - U}{\frac{\frac{Om}{\ell}}{n}} + \ell \cdot -2}{\frac{Om}{\ell}}\right)\right)\right)}
\end{array}
Derivation
  1. Initial program 48.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. Simplified57.3%

    \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
  3. Add Preprocessing
  4. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
    2. associate-*r*N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
  5. Applied egg-rr63.5%

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

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

Alternative 13: 47.2% accurate, 1.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 6200000000:\\
\;\;\;\;\sqrt{U \cdot \left(2 \cdot \left(t \cdot n\right) + -4 \cdot \frac{n \cdot \left(\ell \cdot \ell\right)}{Om}\right)}\\

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


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

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr63.6%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om} + 2 \cdot \left(n \cdot t\right)\right)}, U\right)\right) \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot \left(n \cdot t\right) + -4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right), U\right)\right) \]
      2. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(2 \cdot \left(n \cdot t\right)\right), \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)\right), U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \left(n \cdot t\right)\right), \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)\right), U\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \left(-4 \cdot \frac{{\ell}^{2} \cdot n}{Om}\right)\right), U\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \mathsf{*.f64}\left(-4, \left(\frac{{\ell}^{2} \cdot n}{Om}\right)\right)\right), U\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \mathsf{*.f64}\left(-4, \mathsf{/.f64}\left(\left({\ell}^{2} \cdot n\right), Om\right)\right)\right), U\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \mathsf{*.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left({\ell}^{2}\right), n\right), Om\right)\right)\right), U\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \mathsf{*.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), n\right), Om\right)\right)\right), U\right)\right) \]
      9. *-lowering-*.f6450.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(n, t\right)\right), \mathsf{*.f64}\left(-4, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), Om\right)\right)\right), U\right)\right) \]
    8. Simplified50.5%

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

    if 6.2e9 < l

    1. Initial program 32.7%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6453.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified53.9%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6450.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified50.9%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right)\right), Om\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot U\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(\left({\ell}^{2} \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\left({\ell}^{2} \cdot n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\ell}^{2}\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} + \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right), Om\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right), Om\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\left(\frac{U* \cdot n}{Om}\right), -2\right)\right)\right), Om\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(U* \cdot n\right), Om\right), -2\right)\right)\right), Om\right)\right) \]
      15. *-lowering-*.f6444.0%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, n\right), Om\right), -2\right)\right)\right), Om\right)\right) \]
    12. Simplified44.0%

      \[\leadsto \sqrt{\color{blue}{\frac{\left(2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)}{Om}}} \]
    13. Step-by-step derivation
      1. sqrt-lowering-sqrt.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\left(2 \cdot U\right) \cdot \left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)}{Om}\right)\right) \]
      2. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right) \cdot \left(2 \cdot U\right)}{Om}\right)\right) \]
      3. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right) \cdot \frac{2 \cdot U}{Om}\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(\left(\ell \cdot \ell\right) \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      5. associate-*l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(\ell \cdot \ell\right) \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      6. associate-*l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \left(\ell \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \left(\ell \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \left(n \cdot \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      10. +-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \left(-2 + \frac{U* \cdot n}{Om}\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      11. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \left(\frac{U* \cdot n}{Om}\right)\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      12. associate-/l*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \left(U* \cdot \frac{n}{Om}\right)\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      13. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(U*, \left(\frac{n}{Om}\right)\right)\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(n, Om\right)\right)\right)\right)\right)\right), \left(\frac{2 \cdot U}{Om}\right)\right)\right) \]
      15. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(n, Om\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\left(2 \cdot U\right), Om\right)\right)\right) \]
      16. *-lowering-*.f6449.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(\ell, \mathsf{*.f64}\left(n, \mathsf{+.f64}\left(-2, \mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(n, Om\right)\right)\right)\right)\right)\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(2, U\right), Om\right)\right)\right) \]
    14. Applied egg-rr49.2%

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

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

Alternative 14: 45.5% accurate, 1.9× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6450.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified50.5%

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

    if 1.11999999999999994e194 < l

    1. Initial program 6.0%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6446.4%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified46.4%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6440.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified40.5%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\color{blue}{\left(2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)}{Om}\right)}\right) \]
    11. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right)\right), Om\right)\right) \]
      3. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(\left(2 \cdot U\right) \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left({\ell}^{2} \cdot \left(n \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right)\right), Om\right)\right) \]
      6. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(\left({\ell}^{2} \cdot n\right) \cdot \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\left({\ell}^{2} \cdot n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left({\ell}^{2}\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      9. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\ell \cdot \ell\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} - 2\right)\right)\right), Om\right)\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} + \left(\mathsf{neg}\left(2\right)\right)\right)\right)\right), Om\right)\right) \]
      12. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \left(\frac{U* \cdot n}{Om} + -2\right)\right)\right), Om\right)\right) \]
      13. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\left(\frac{U* \cdot n}{Om}\right), -2\right)\right)\right), Om\right)\right) \]
      14. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(U* \cdot n\right), Om\right), -2\right)\right)\right), Om\right)\right) \]
      15. *-lowering-*.f6432.4%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, n\right), Om\right), -2\right)\right)\right), Om\right)\right) \]
    12. Simplified32.4%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \color{blue}{\left(\frac{U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)}{Om}\right)}\right), Om\right)\right) \]
    14. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\left(U* \cdot \left({\ell}^{2} \cdot {n}^{2}\right)\right), Om\right)\right), Om\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\left(\left(U* \cdot {\ell}^{2}\right) \cdot {n}^{2}\right), Om\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(U* \cdot {\ell}^{2}\right), \left({n}^{2}\right)\right), Om\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U*, \left({\ell}^{2}\right)\right), \left({n}^{2}\right)\right), Om\right)\right), Om\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot \ell\right)\right), \left({n}^{2}\right)\right), Om\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left({n}^{2}\right)\right), Om\right)\right), Om\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, \ell\right)\right), \left(n \cdot n\right)\right), Om\right)\right), Om\right)\right) \]
      8. *-lowering-*.f6423.1%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, \ell\right)\right), \mathsf{*.f64}\left(n, n\right)\right), Om\right)\right), Om\right)\right) \]
    15. Simplified23.1%

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

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

Alternative 15: 45.5% accurate, 1.9× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6450.9%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified50.9%

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

    if 9.4000000000000003e172 < l

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

      \[\leadsto \color{blue}{\sqrt{2 \cdot \left(\left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right) \cdot \left(n \cdot U\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot \left(n \cdot U\right)\right)\right) \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right) \cdot U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(\left(2 \cdot \left(t + \frac{\ell}{Om} \cdot \left(\left(U* - U\right) \cdot \frac{n \cdot \ell}{Om} + \ell \cdot -2\right)\right)\right) \cdot n\right), U\right)\right) \]
    5. Applied egg-rr51.5%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\color{blue}{\left(2 \cdot \frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}\right)}, n\right), U\right)\right) \]
    7. Step-by-step derivation
      1. associate-*r/N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\left(\frac{2 \cdot \left(U* \cdot \left({\ell}^{2} \cdot n\right)\right)}{{Om}^{2}}\right), n\right), U\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U* \cdot \left({\ell}^{2} \cdot n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U* \cdot \left({\ell}^{2} \cdot n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \left({\ell}^{2} \cdot n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\left({\ell}^{2}\right), n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      6. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right)\right)\right), \left({Om}^{2}\right)\right), n\right), U\right)\right) \]
      8. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right)\right)\right), \left(Om \cdot Om\right)\right), n\right), U\right)\right) \]
      9. *-lowering-*.f6425.5%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right)\right)\right), \mathsf{*.f64}\left(Om, Om\right)\right), n\right), U\right)\right) \]
    8. Simplified25.5%

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

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

Alternative 16: 45.4% accurate, 1.9× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6450.7%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified50.7%

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

    if 7.8e181 < l

    1. Initial program 6.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. Add Preprocessing
    3. Taylor expanded in U* around inf

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \color{blue}{\left(\frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{{Om}^{2}}\right)}\right)\right) \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\left(U* \cdot \left({\ell}^{2} \cdot n\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left({\ell}^{2} \cdot n\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(n \cdot {\ell}^{2}\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(n, \left({\ell}^{2}\right)\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      5. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(n, \left(\ell \cdot \ell\right)\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(n, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left({Om}^{2}\right)\right)\right)\right) \]
      7. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(n, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \left(Om \cdot Om\right)\right)\right)\right) \]
      8. *-lowering-*.f6424.8%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, n\right), U\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(n, \mathsf{*.f64}\left(\ell, \ell\right)\right)\right), \mathsf{*.f64}\left(Om, Om\right)\right)\right)\right) \]
    5. Simplified24.8%

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

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

Alternative 17: 44.6% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 4.0999999999999998e34

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      5. metadata-evalN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t + \left(\mathsf{neg}\left(2\right)\right) \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      6. cancel-sign-sub-invN/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right) \]
      7. --lowering--.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \left(2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right) \]
      8. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \left(\frac{{\ell}^{2}}{Om}\right)\right)\right)\right)\right)\right) \]
      9. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left({\ell}^{2}\right), Om\right)\right)\right)\right)\right)\right) \]
      10. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\left(\ell \cdot \ell\right), Om\right)\right)\right)\right)\right)\right) \]
      11. *-lowering-*.f6451.3%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(2, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), Om\right)\right)\right)\right)\right)\right) \]
    6. Simplified51.3%

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

    if 4.0999999999999998e34 < t

    1. Initial program 31.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. Simplified45.2%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot t\right)\right)\right) \]
      4. *-lowering-*.f6437.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, t\right)\right)\right) \]
    6. Simplified37.2%

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

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\color{blue}{\frac{1}{2}}} \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right), \color{blue}{\frac{1}{2}}\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(t \cdot n\right)\right)\right), \frac{1}{2}\right) \]
      7. *-lowering-*.f6438.9%

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(t, n\right)\right)\right), \frac{1}{2}\right) \]
    8. Applied egg-rr38.9%

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

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

Alternative 18: 39.1% accurate, 1.9× speedup?

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

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

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


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

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot t\right)\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot t\right)\right)\right) \]
      4. *-lowering-*.f6445.0%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, t\right)\right)\right) \]
    6. Simplified45.0%

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

        \[\leadsto {\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\color{blue}{\frac{1}{2}}} \]
      2. pow-lowering-pow.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right), \color{blue}{\frac{1}{2}}\right) \]
      3. associate-*l*N/A

        \[\leadsto \mathsf{pow.f64}\left(\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      5. *-lowering-*.f64N/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
      6. *-commutativeN/A

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(t \cdot n\right)\right)\right), \frac{1}{2}\right) \]
      7. *-lowering-*.f6445.6%

        \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(t, n\right)\right)\right), \frac{1}{2}\right) \]
    8. Applied egg-rr45.6%

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

    if 1.1000000000000001e29 < l

    1. Initial program 29.6%

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

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\left(U* \cdot \frac{\ell \cdot n}{Om}\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \left(\frac{\ell \cdot n}{Om}\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\left(\ell \cdot n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
      4. *-lowering-*.f6453.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(\mathsf{+.f64}\left(t, \mathsf{*.f64}\left(\mathsf{/.f64}\left(\ell, Om\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{/.f64}\left(\mathsf{*.f64}\left(\ell, n\right), Om\right)\right), \mathsf{*.f64}\left(\ell, -2\right)\right)\right)\right), \mathsf{*.f64}\left(n, U\right)\right)\right)\right) \]
    6. Simplified53.2%

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

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

        \[\leadsto \mathsf{sqrt.f64}\left(\left(\frac{2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)}{Om}\right)\right) \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\left(2 \cdot \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      4. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\ell \cdot \left(n \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      5. associate-*r*N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(\left(\ell \cdot n\right) \cdot \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      6. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \left(-2 \cdot \ell + \frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right), Om\right)\right) \]
      8. +-lowering-+.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\left(-2 \cdot \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      9. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \left(\frac{U* \cdot \left(\ell \cdot n\right)}{Om}\right)\right)\right)\right)\right), Om\right)\right) \]
      10. /-lowering-/.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\left(U* \cdot \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      11. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \left(\ell \cdot n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
      12. *-lowering-*.f6450.2%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, n\right), \mathsf{+.f64}\left(\mathsf{*.f64}\left(-2, \ell\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(U*, \mathsf{*.f64}\left(\ell, n\right)\right), Om\right)\right)\right)\right)\right), Om\right)\right) \]
    9. Simplified50.2%

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

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\color{blue}{\left(-4 \cdot \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)\right)}, Om\right)\right) \]
    11. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \left(U \cdot \left({\ell}^{2} \cdot n\right)\right)\right), Om\right)\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(U, \left({\ell}^{2} \cdot n\right)\right)\right), Om\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left({\ell}^{2}\right), n\right)\right)\right), Om\right)\right) \]
      4. unpow2N/A

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\left(\ell \cdot \ell\right), n\right)\right)\right), Om\right)\right) \]
      5. *-lowering-*.f6422.7%

        \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(-4, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(\mathsf{*.f64}\left(\ell, \ell\right), n\right)\right)\right), Om\right)\right) \]
    12. Simplified22.7%

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

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

Alternative 19: 38.1% accurate, 2.1× speedup?

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

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

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

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

      \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot t\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot t\right)\right)\right) \]
    4. *-lowering-*.f6438.8%

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, t\right)\right)\right) \]
  6. Simplified38.8%

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

      \[\leadsto {\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)}^{\color{blue}{\frac{1}{2}}} \]
    2. pow-lowering-pow.f64N/A

      \[\leadsto \mathsf{pow.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right), \color{blue}{\frac{1}{2}}\right) \]
    3. associate-*l*N/A

      \[\leadsto \mathsf{pow.f64}\left(\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \left(U \cdot \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(n \cdot t\right)\right)\right), \frac{1}{2}\right) \]
    6. *-commutativeN/A

      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \left(t \cdot n\right)\right)\right), \frac{1}{2}\right) \]
    7. *-lowering-*.f6440.0%

      \[\leadsto \mathsf{pow.f64}\left(\mathsf{*.f64}\left(2, \mathsf{*.f64}\left(U, \mathsf{*.f64}\left(t, n\right)\right)\right), \frac{1}{2}\right) \]
  8. Applied egg-rr40.0%

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

Alternative 20: 36.1% accurate, 2.1× speedup?

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

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

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

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

      \[\leadsto \mathsf{sqrt.f64}\left(\left(\left(2 \cdot U\right) \cdot \left(n \cdot t\right)\right)\right) \]
    2. *-lowering-*.f64N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\left(2 \cdot U\right), \left(n \cdot t\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \left(n \cdot t\right)\right)\right) \]
    4. *-lowering-*.f6438.8%

      \[\leadsto \mathsf{sqrt.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(2, U\right), \mathsf{*.f64}\left(n, t\right)\right)\right) \]
  6. Simplified38.8%

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

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

Reproduce

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