Toniolo and Linder, Equation (13)

Percentage Accurate: 49.5% → 61.3%
Time: 33.9s
Alternatives: 18
Speedup: 0.5×

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 18 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: 61.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\ t_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 t\_1\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;{\left(\left({\left(U \cdot \left(-t\right)\right)}^{0.25} \cdot {\left(\frac{-1}{n}\right)}^{-0.25}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+151}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l Om) 2.0))
        (t_2
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U)))))))
   (if (<= t_2 0.0)
     (pow
      (* (* (pow (* U (- t)) 0.25) (pow (/ -1.0 n) -0.25)) (sqrt (sqrt 2.0)))
      2.0)
     (if (<= t_2 5e+151)
       t_2
       (if (<= t_2 INFINITY)
         (sqrt
          (*
           (* 2.0 n)
           (* U (- t (fma 2.0 (* l (/ l Om)) (* n (* t_1 (- U U*))))))))
         (pow (* 2.0 (* U (* -2.0 (* (pow l 2.0) (/ n Om))))) 0.5))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = pow((l / Om), 2.0);
	double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = pow(((pow((U * -t), 0.25) * pow((-1.0 / n), -0.25)) * sqrt(sqrt(2.0))), 2.0);
	} else if (t_2 <= 5e+151) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, (l * (l / Om)), (n * (t_1 * (U - U_42_))))))));
	} else {
		tmp = pow((2.0 * (U * (-2.0 * (pow(l, 2.0) * (n / Om))))), 0.5);
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l / Om) ^ 2.0
	t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64(Float64((Float64(U * Float64(-t)) ^ 0.25) * (Float64(-1.0 / n) ^ -0.25)) * sqrt(sqrt(2.0))) ^ 2.0;
	elseif (t_2 <= 5e+151)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(n * Float64(t_1 * Float64(U - U_42_))))))));
	else
		tmp = Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l ^ 2.0) * Float64(n / Om))))) ^ 0.5;
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Power[N[(N[(N[Power[N[(U * (-t)), $MachinePrecision], 0.25], $MachinePrecision] * N[Power[N[(-1.0 / n), $MachinePrecision], -0.25], $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[Sqrt[2.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$2, 5e+151], t$95$2, If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_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 t\_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;{\left(\left({\left(U \cdot \left(-t\right)\right)}^{0.25} \cdot {\left(\frac{-1}{n}\right)}^{-0.25}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}\\

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


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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\sqrt{\sqrt{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}}\right)}^{2}} \]
    7. Taylor expanded in t around 0 18.5%

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log t + \log \left(U \cdot n\right)\right)} \cdot \sqrt{\sqrt{2}}\right)}}^{2} \]
    8. Step-by-step derivation
      1. *-commutative18.5%

        \[\leadsto {\color{blue}{\left(\sqrt{\sqrt{2}} \cdot e^{0.25 \cdot \left(\log t + \log \left(U \cdot n\right)\right)}\right)}}^{2} \]
      2. exp-prod17.9%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \color{blue}{{\left(e^{0.25}\right)}^{\left(\log t + \log \left(U \cdot n\right)\right)}}\right)}^{2} \]
      3. remove-double-neg17.9%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\left(\color{blue}{\left(-\left(-\log t\right)\right)} + \log \left(U \cdot n\right)\right)}\right)}^{2} \]
      4. log-rec17.9%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\left(\left(-\color{blue}{\log \left(\frac{1}{t}\right)}\right) + \log \left(U \cdot n\right)\right)}\right)}^{2} \]
      5. mul-1-neg17.9%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\left(\color{blue}{-1 \cdot \log \left(\frac{1}{t}\right)} + \log \left(U \cdot n\right)\right)}\right)}^{2} \]
      6. +-commutative17.9%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot {\left(e^{0.25}\right)}^{\color{blue}{\left(\log \left(U \cdot n\right) + -1 \cdot \log \left(\frac{1}{t}\right)\right)}}\right)}^{2} \]
      7. exp-prod18.5%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \color{blue}{e^{0.25 \cdot \left(\log \left(U \cdot n\right) + -1 \cdot \log \left(\frac{1}{t}\right)\right)}}\right)}^{2} \]
      8. distribute-rgt-in18.5%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot e^{\color{blue}{\log \left(U \cdot n\right) \cdot 0.25 + \left(-1 \cdot \log \left(\frac{1}{t}\right)\right) \cdot 0.25}}\right)}^{2} \]
      9. exp-sum18.5%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \color{blue}{\left(e^{\log \left(U \cdot n\right) \cdot 0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{1}{t}\right)\right) \cdot 0.25}\right)}\right)}^{2} \]
      10. exp-to-pow19.2%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \left(\color{blue}{{\left(U \cdot n\right)}^{0.25}} \cdot e^{\left(-1 \cdot \log \left(\frac{1}{t}\right)\right) \cdot 0.25}\right)\right)}^{2} \]
      11. mul-1-neg19.2%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \left({\left(U \cdot n\right)}^{0.25} \cdot e^{\color{blue}{\left(-\log \left(\frac{1}{t}\right)\right)} \cdot 0.25}\right)\right)}^{2} \]
      12. log-rec19.2%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \left({\left(U \cdot n\right)}^{0.25} \cdot e^{\left(-\color{blue}{\left(-\log t\right)}\right) \cdot 0.25}\right)\right)}^{2} \]
      13. remove-double-neg19.2%

        \[\leadsto {\left(\sqrt{\sqrt{2}} \cdot \left({\left(U \cdot n\right)}^{0.25} \cdot e^{\color{blue}{\log t} \cdot 0.25}\right)\right)}^{2} \]
      14. exp-to-pow19.5%

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

      \[\leadsto {\color{blue}{\left(\sqrt{\sqrt{2}} \cdot \left({\left(U \cdot n\right)}^{0.25} \cdot {t}^{0.25}\right)\right)}}^{2} \]
    10. Taylor expanded in n around -inf 43.8%

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-1 \cdot \left(U \cdot t\right)\right) + -1 \cdot \log \left(\frac{-1}{n}\right)\right)} \cdot \sqrt{\sqrt{2}}\right)}}^{2} \]
    11. Step-by-step derivation
      1. distribute-rgt-in43.8%

        \[\leadsto {\left(e^{\color{blue}{\log \left(-1 \cdot \left(U \cdot t\right)\right) \cdot 0.25 + \left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}} \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      2. exp-sum44.8%

        \[\leadsto {\left(\color{blue}{\left(e^{\log \left(-1 \cdot \left(U \cdot t\right)\right) \cdot 0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)} \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      3. exp-to-pow45.4%

        \[\leadsto {\left(\left(\color{blue}{{\left(-1 \cdot \left(U \cdot t\right)\right)}^{0.25}} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      4. mul-1-neg45.4%

        \[\leadsto {\left(\left({\color{blue}{\left(-U \cdot t\right)}}^{0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      5. *-commutative45.4%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(\frac{-1}{n}\right) \cdot -1\right)} \cdot 0.25}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      6. associate-*l*45.4%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot e^{\color{blue}{\log \left(\frac{-1}{n}\right) \cdot \left(-1 \cdot 0.25\right)}}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      7. metadata-eval45.4%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{-0.25}}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      8. metadata-eval45.4%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{\left(0.25 \cdot -1\right)}}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      9. exp-to-pow48.0%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot \color{blue}{{\left(\frac{-1}{n}\right)}^{\left(0.25 \cdot -1\right)}}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
      10. metadata-eval48.0%

        \[\leadsto {\left(\left({\left(-U \cdot t\right)}^{0.25} \cdot {\left(\frac{-1}{n}\right)}^{\color{blue}{-0.25}}\right) \cdot \sqrt{\sqrt{2}}\right)}^{2} \]
    12. Simplified48.0%

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

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

    1. Initial program 97.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 61.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\ t_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 t\_1\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_2 \leq 0:\\ \;\;\;\;{\left({\left(\frac{-1}{n}\right)}^{-0.25} \cdot {\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25}\right)}^{2}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+151}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(-2 \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l Om) 2.0))
        (t_2
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+ (- t (* 2.0 (/ (* l l) Om))) (* (* n t_1) (- U* U)))))))
   (if (<= t_2 0.0)
     (pow (* (pow (/ -1.0 n) -0.25) (pow (* U (* t -2.0)) 0.25)) 2.0)
     (if (<= t_2 5e+151)
       t_2
       (if (<= t_2 INFINITY)
         (sqrt
          (*
           (* 2.0 n)
           (* U (- t (fma 2.0 (* l (/ l Om)) (* n (* t_1 (- U U*))))))))
         (pow (* 2.0 (* U (* -2.0 (* (pow l 2.0) (/ n Om))))) 0.5))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = pow((l / Om), 2.0);
	double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * t_1) * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = pow((pow((-1.0 / n), -0.25) * pow((U * (t * -2.0)), 0.25)), 2.0);
	} else if (t_2 <= 5e+151) {
		tmp = t_2;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * n) * (U * (t - fma(2.0, (l * (l / Om)), (n * (t_1 * (U - U_42_))))))));
	} else {
		tmp = pow((2.0 * (U * (-2.0 * (pow(l, 2.0) * (n / Om))))), 0.5);
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(l / Om) ^ 2.0
	t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(Float64(n * t_1) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_2 <= 0.0)
		tmp = Float64((Float64(-1.0 / n) ^ -0.25) * (Float64(U * Float64(t * -2.0)) ^ 0.25)) ^ 2.0;
	elseif (t_2 <= 5e+151)
		tmp = t_2;
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * n) * Float64(U * Float64(t - fma(2.0, Float64(l * Float64(l / Om)), Float64(n * Float64(t_1 * Float64(U - U_42_))))))));
	else
		tmp = Float64(2.0 * Float64(U * Float64(-2.0 * Float64((l ^ 2.0) * Float64(n / Om))))) ^ 0.5;
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * t$95$1), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 0.0], N[Power[N[(N[Power[N[(-1.0 / n), $MachinePrecision], -0.25], $MachinePrecision] * N[Power[N[(U * N[(t * -2.0), $MachinePrecision]), $MachinePrecision], 0.25], $MachinePrecision]), $MachinePrecision], 2.0], $MachinePrecision], If[LessEqual[t$95$2, 5e+151], t$95$2, If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * N[(U * N[(t - N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(U * N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_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 t\_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t\_2 \leq 0:\\
\;\;\;\;{\left({\left(\frac{-1}{n}\right)}^{-0.25} \cdot {\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25}\right)}^{2}\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+151}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, n \cdot \left(t\_1 \cdot \left(U - U*\right)\right)\right)\right)\right)}\\

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left({\left(2 \cdot \color{blue}{\left(t \cdot \left(U \cdot n\right)\right)}\right)}^{\left(\frac{0.5}{2}\right)} \cdot 1\right)}^{2} \]
      8. metadata-eval13.0%

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

      \[\leadsto {\color{blue}{\left({\left(2 \cdot \left(t \cdot \left(U \cdot n\right)\right)\right)}^{0.25} \cdot 1\right)}}^{2} \]
    9. Step-by-step derivation
      1. *-rgt-identity13.0%

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

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

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

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

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

      \[\leadsto {\color{blue}{\left({\left(\left(U \cdot 2\right) \cdot \left(n \cdot t\right)\right)}^{0.25}\right)}}^{2} \]
    11. Taylor expanded in n around -inf 44.9%

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot t\right)\right) + -1 \cdot \log \left(\frac{-1}{n}\right)\right)}\right)}}^{2} \]
    12. Step-by-step derivation
      1. distribute-rgt-in44.9%

        \[\leadsto {\left(e^{\color{blue}{\log \left(-2 \cdot \left(U \cdot t\right)\right) \cdot 0.25 + \left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}}\right)}^{2} \]
      2. exp-sum44.9%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot t\right)\right) \cdot 0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}}^{2} \]
      3. exp-to-pow45.5%

        \[\leadsto {\left(\color{blue}{{\left(-2 \cdot \left(U \cdot t\right)\right)}^{0.25}} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      4. *-commutative45.5%

        \[\leadsto {\left({\color{blue}{\left(\left(U \cdot t\right) \cdot -2\right)}}^{0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      5. associate-*l*45.5%

        \[\leadsto {\left({\color{blue}{\left(U \cdot \left(t \cdot -2\right)\right)}}^{0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      6. *-commutative45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(\frac{-1}{n}\right) \cdot -1\right)} \cdot 0.25}\right)}^{2} \]
      7. associate-*l*45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\color{blue}{\log \left(\frac{-1}{n}\right) \cdot \left(-1 \cdot 0.25\right)}}\right)}^{2} \]
      8. metadata-eval45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{-0.25}}\right)}^{2} \]
      9. metadata-eval45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{\left(0.25 \cdot -1\right)}}\right)}^{2} \]
      10. exp-to-pow47.9%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot \color{blue}{{\left(\frac{-1}{n}\right)}^{\left(0.25 \cdot -1\right)}}\right)}^{2} \]
      11. metadata-eval47.9%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot {\left(\frac{-1}{n}\right)}^{\color{blue}{-0.25}}\right)}^{2} \]
    13. Simplified47.9%

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

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

    1. Initial program 97.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 61.0% accurate, 0.3× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left({\left(2 \cdot \color{blue}{\left(t \cdot \left(U \cdot n\right)\right)}\right)}^{\left(\frac{0.5}{2}\right)} \cdot 1\right)}^{2} \]
      8. metadata-eval13.0%

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

      \[\leadsto {\color{blue}{\left({\left(2 \cdot \left(t \cdot \left(U \cdot n\right)\right)\right)}^{0.25} \cdot 1\right)}}^{2} \]
    9. Step-by-step derivation
      1. *-rgt-identity13.0%

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

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

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

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

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

      \[\leadsto {\color{blue}{\left({\left(\left(U \cdot 2\right) \cdot \left(n \cdot t\right)\right)}^{0.25}\right)}}^{2} \]
    11. Taylor expanded in n around -inf 44.9%

      \[\leadsto {\color{blue}{\left(e^{0.25 \cdot \left(\log \left(-2 \cdot \left(U \cdot t\right)\right) + -1 \cdot \log \left(\frac{-1}{n}\right)\right)}\right)}}^{2} \]
    12. Step-by-step derivation
      1. distribute-rgt-in44.9%

        \[\leadsto {\left(e^{\color{blue}{\log \left(-2 \cdot \left(U \cdot t\right)\right) \cdot 0.25 + \left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}}\right)}^{2} \]
      2. exp-sum44.9%

        \[\leadsto {\color{blue}{\left(e^{\log \left(-2 \cdot \left(U \cdot t\right)\right) \cdot 0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}}^{2} \]
      3. exp-to-pow45.5%

        \[\leadsto {\left(\color{blue}{{\left(-2 \cdot \left(U \cdot t\right)\right)}^{0.25}} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      4. *-commutative45.5%

        \[\leadsto {\left({\color{blue}{\left(\left(U \cdot t\right) \cdot -2\right)}}^{0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      5. associate-*l*45.5%

        \[\leadsto {\left({\color{blue}{\left(U \cdot \left(t \cdot -2\right)\right)}}^{0.25} \cdot e^{\left(-1 \cdot \log \left(\frac{-1}{n}\right)\right) \cdot 0.25}\right)}^{2} \]
      6. *-commutative45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\color{blue}{\left(\log \left(\frac{-1}{n}\right) \cdot -1\right)} \cdot 0.25}\right)}^{2} \]
      7. associate-*l*45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\color{blue}{\log \left(\frac{-1}{n}\right) \cdot \left(-1 \cdot 0.25\right)}}\right)}^{2} \]
      8. metadata-eval45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{-0.25}}\right)}^{2} \]
      9. metadata-eval45.5%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot e^{\log \left(\frac{-1}{n}\right) \cdot \color{blue}{\left(0.25 \cdot -1\right)}}\right)}^{2} \]
      10. exp-to-pow47.9%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot \color{blue}{{\left(\frac{-1}{n}\right)}^{\left(0.25 \cdot -1\right)}}\right)}^{2} \]
      11. metadata-eval47.9%

        \[\leadsto {\left({\left(U \cdot \left(t \cdot -2\right)\right)}^{0.25} \cdot {\left(\frac{-1}{n}\right)}^{\color{blue}{-0.25}}\right)}^{2} \]
    13. Simplified47.9%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.0% accurate, 0.5× speedup?

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

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

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

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


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

    1. Initial program 17.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. Simplified35.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 48.1% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if U* < -2.3e8

    1. Initial program 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto {\left(2 \cdot \left(U \cdot \left(n \cdot \color{blue}{\mathsf{fma}\left({\ell}^{2}, \frac{-2}{Om}, t\right)}\right)\right)\right)}^{0.5} \]
    8. Applied egg-rr51.9%

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

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

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

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

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

    if -2.3e8 < U* < 4.2000000000000002e-16

    1. Initial program 60.8%

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

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

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

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

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

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

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

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

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

    if 4.2000000000000002e-16 < U*

    1. Initial program 47.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 45.2% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if l < 1.75e-36

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

    if 1.75e-36 < l < 1.35e116

    1. Initial program 54.5%

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

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

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

    if 1.35e116 < l < 6.80000000000000027e119

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

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

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

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

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

    if 6.80000000000000027e119 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 49.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-209} \lor \neg \left(t \leq 5.6 \cdot 10^{-159}\right):\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(t \cdot \mathsf{fma}\left(-2, n \cdot \frac{\ell \cdot \frac{\ell}{t}}{Om}, n\right)\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right) - 4 \cdot \frac{U \cdot {\ell}^{2}}{Om}\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= t -1.95e-209) (not (<= t 5.6e-159)))
   (pow (* 2.0 (* U (* t (fma -2.0 (* n (/ (* l (/ l t)) Om)) n)))) 0.5)
   (sqrt (* n (- (* 2.0 (* U t)) (* 4.0 (/ (* U (pow l 2.0)) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((t <= -1.95e-209) || !(t <= 5.6e-159)) {
		tmp = pow((2.0 * (U * (t * fma(-2.0, (n * ((l * (l / t)) / Om)), n)))), 0.5);
	} else {
		tmp = sqrt((n * ((2.0 * (U * t)) - (4.0 * ((U * pow(l, 2.0)) / Om)))));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((t <= -1.95e-209) || !(t <= 5.6e-159))
		tmp = Float64(2.0 * Float64(U * Float64(t * fma(-2.0, Float64(n * Float64(Float64(l * Float64(l / t)) / Om)), n)))) ^ 0.5;
	else
		tmp = sqrt(Float64(n * Float64(Float64(2.0 * Float64(U * t)) - Float64(4.0 * Float64(Float64(U * (l ^ 2.0)) / Om)))));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[t, -1.95e-209], N[Not[LessEqual[t, 5.6e-159]], $MachinePrecision]], N[Power[N[(2.0 * N[(U * N[(t * N[(-2.0 * N[(n * N[(N[(l * N[(l / t), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[Sqrt[N[(n * N[(N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision] - N[(4.0 * N[(N[(U * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.95 \cdot 10^{-209} \lor \neg \left(t \leq 5.6 \cdot 10^{-159}\right):\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(t \cdot \mathsf{fma}\left(-2, n \cdot \frac{\ell \cdot \frac{\ell}{t}}{Om}, n\right)\right)\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.95e-209 or 5.6000000000000004e-159 < t

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.95e-209 < t < 5.6000000000000004e-159

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{-209} \lor \neg \left(t \leq 5.6 \cdot 10^{-159}\right):\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(t \cdot \mathsf{fma}\left(-2, n \cdot \frac{\ell \cdot \frac{\ell}{t}}{Om}, n\right)\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(2 \cdot \left(U \cdot t\right) - 4 \cdot \frac{U \cdot {\ell}^{2}}{Om}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 45.0% accurate, 1.0× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

    if 3.59999999999999981e-8 < l < 4.7999999999999999e131

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.7999999999999999e131 < 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. Simplified25.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 42.4% accurate, 1.0× speedup?

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

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

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

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


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

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.7000000000000001e-36 < l < 1.35e132

    1. Initial program 55.7%

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

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

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

    if 1.35e132 < 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. Simplified25.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 39.8% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.6000000000000002e-8 < l

    1. Initial program 29.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. Simplified39.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto {\left(2 \cdot \left(U \cdot \color{blue}{\left(t \cdot \left(n + -2 \cdot \frac{{\ell}^{2} \cdot n}{Om \cdot t}\right)\right)}\right)\right)}^{0.5} \]
    10. Step-by-step derivation
      1. +-commutative37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 40.3% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.2000000000000002e-8 < l

    1. Initial program 29.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. Simplified39.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 37.8% accurate, 1.0× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.9000000000000001e-5 < l

    1. Initial program 28.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. Simplified38.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 38.9% accurate, 1.1× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.5000000000000002e56 < l

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 37.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U* \leq -600000:\\ \;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\ \mathbf{else}:\\ \;\;\;\;{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= U* -600000.0)
   (sqrt (fabs (* 2.0 (* U (* n t)))))
   (pow (* 2.0 (* t (* n U))) 0.5)))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (U_42_ <= -600000.0) {
		tmp = sqrt(fabs((2.0 * (U * (n * t)))));
	} else {
		tmp = pow((2.0 * (t * (n * U))), 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_42 <= (-600000.0d0)) then
        tmp = sqrt(abs((2.0d0 * (u * (n * t)))))
    else
        tmp = (2.0d0 * (t * (n * u))) ** 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_42_ <= -600000.0) {
		tmp = Math.sqrt(Math.abs((2.0 * (U * (n * t)))));
	} else {
		tmp = Math.pow((2.0 * (t * (n * U))), 0.5);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if U_42_ <= -600000.0:
		tmp = math.sqrt(math.fabs((2.0 * (U * (n * t)))))
	else:
		tmp = math.pow((2.0 * (t * (n * U))), 0.5)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (U_42_ <= -600000.0)
		tmp = sqrt(abs(Float64(2.0 * Float64(U * Float64(n * t)))));
	else
		tmp = Float64(2.0 * Float64(t * Float64(n * U))) ^ 0.5;
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (U_42_ <= -600000.0)
		tmp = sqrt(abs((2.0 * (U * (n * t)))));
	else
		tmp = (2.0 * (t * (n * U))) ^ 0.5;
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[U$42$, -600000.0], N[Sqrt[N[Abs[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], N[Power[N[(2.0 * N[(t * N[(n * U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -600000:\\
\;\;\;\;\sqrt{\left|2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right|}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -6e5

    1. Initial program 48.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e5 < U*

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 37.4% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -11000:\\
\;\;\;\;{\left(\left(n \cdot t\right) \cdot \left(2 \cdot U\right)\right)}^{0.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -11000

    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. Simplified60.2%

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

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

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

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

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

    if -11000 < U*

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 35.7% accurate, 2.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -820000000:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -8.2e8

    1. Initial program 48.1%

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

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

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

    if -8.2e8 < U*

    1. Initial program 55.7%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 37.2% accurate, 2.1× speedup?

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

\\
{\left(2 \cdot \left(t \cdot \left(n \cdot U\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 53.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. Simplified54.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 18: 35.8% accurate, 2.1× speedup?

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

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

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

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

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

Reproduce

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