Average Error: 34.5 → 27.5
Time: 30.6s
Precision: binary64
Cost: 21204
\[\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)} \]
\[\begin{array}{l} t_1 := \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)}\\ t_2 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ \mathbf{if}\;n \leq 3.8 \cdot 10^{-298}:\\ \;\;\;\;\sqrt{t_2 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\ \mathbf{elif}\;n \leq 2.22 \cdot 10^{-249}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;n \leq 1.1 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{t_2 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 2 \cdot 10^{-125}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;n \leq 4 \cdot 10^{+48}:\\ \;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(n, U \cdot t, \frac{n}{\frac{\frac{Om}{U \cdot \ell}}{\ell \cdot -2 - \frac{n}{Om} \cdot \left(U \cdot \ell\right)}}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \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*))))))
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (*
          (sqrt (* n 2.0))
          (sqrt (* U (+ t (* (/ l Om) (fma l -2.0 (/ n (/ (/ Om l) U*)))))))))
        (t_2 (* (* n U) (* 2.0 t))))
   (if (<= n 3.8e-298)
     (sqrt
      (+
       t_2
       (*
        (* (/ l Om) (* U (* n -2.0)))
        (+ (* n (* (/ l Om) (- U U*))) (* 2.0 l)))))
     (if (<= n 2.22e-249)
       t_1
       (if (<= n 1.1e-172)
         (sqrt
          (+
           t_2
           (*
            (* (/ l Om) (* U (* n 2.0)))
            (* l (+ -2.0 (* (- U* U) (/ n Om)))))))
         (if (<= n 2e-125)
           t_1
           (if (<= n 4e+48)
             (sqrt
              (*
               2.0
               (fma
                n
                (* U t)
                (/ n (/ (/ Om (* U l)) (- (* l -2.0) (* (/ n Om) (* U l))))))))
             t_1)))))))
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_)))));
}
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((n * 2.0)) * sqrt((U * (t + ((l / Om) * fma(l, -2.0, (n / ((Om / l) / U_42_)))))));
	double t_2 = (n * U) * (2.0 * t);
	double tmp;
	if (n <= 3.8e-298) {
		tmp = sqrt((t_2 + (((l / Om) * (U * (n * -2.0))) * ((n * ((l / Om) * (U - U_42_))) + (2.0 * l)))));
	} else if (n <= 2.22e-249) {
		tmp = t_1;
	} else if (n <= 1.1e-172) {
		tmp = sqrt((t_2 + (((l / Om) * (U * (n * 2.0))) * (l * (-2.0 + ((U_42_ - U) * (n / Om)))))));
	} else if (n <= 2e-125) {
		tmp = t_1;
	} else if (n <= 4e+48) {
		tmp = sqrt((2.0 * fma(n, (U * t), (n / ((Om / (U * l)) / ((l * -2.0) - ((n / Om) * (U * l))))))));
	} else {
		tmp = t_1;
	}
	return tmp;
}
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 code(n, U, t, l, Om, U_42_)
	t_1 = Float64(sqrt(Float64(n * 2.0)) * sqrt(Float64(U * Float64(t + Float64(Float64(l / Om) * fma(l, -2.0, Float64(n / Float64(Float64(Om / l) / U_42_))))))))
	t_2 = Float64(Float64(n * U) * Float64(2.0 * t))
	tmp = 0.0
	if (n <= 3.8e-298)
		tmp = sqrt(Float64(t_2 + Float64(Float64(Float64(l / Om) * Float64(U * Float64(n * -2.0))) * Float64(Float64(n * Float64(Float64(l / Om) * Float64(U - U_42_))) + Float64(2.0 * l)))));
	elseif (n <= 2.22e-249)
		tmp = t_1;
	elseif (n <= 1.1e-172)
		tmp = sqrt(Float64(t_2 + Float64(Float64(Float64(l / Om) * Float64(U * Float64(n * 2.0))) * Float64(l * Float64(-2.0 + Float64(Float64(U_42_ - U) * Float64(n / Om)))))));
	elseif (n <= 2e-125)
		tmp = t_1;
	elseif (n <= 4e+48)
		tmp = sqrt(Float64(2.0 * fma(n, Float64(U * t), Float64(n / Float64(Float64(Om / Float64(U * l)) / Float64(Float64(l * -2.0) - Float64(Float64(n / Om) * Float64(U * l))))))));
	else
		tmp = t_1;
	end
	return tmp
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]
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[Sqrt[N[(n * 2.0), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t + N[(N[(l / Om), $MachinePrecision] * N[(l * -2.0 + N[(n / N[(N[(Om / l), $MachinePrecision] / U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(n * U), $MachinePrecision] * N[(2.0 * t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[n, 3.8e-298], N[Sqrt[N[(t$95$2 + N[(N[(N[(l / Om), $MachinePrecision] * N[(U * N[(n * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(n * N[(N[(l / Om), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 2.22e-249], t$95$1, If[LessEqual[n, 1.1e-172], N[Sqrt[N[(t$95$2 + N[(N[(N[(l / Om), $MachinePrecision] * N[(U * N[(n * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(l * N[(-2.0 + N[(N[(U$42$ - U), $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[n, 2e-125], t$95$1, If[LessEqual[n, 4e+48], N[Sqrt[N[(2.0 * N[(n * N[(U * t), $MachinePrecision] + N[(n / N[(N[(Om / N[(U * l), $MachinePrecision]), $MachinePrecision] / N[(N[(l * -2.0), $MachinePrecision] - N[(N[(n / Om), $MachinePrecision] * N[(U * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], t$95$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)}
\begin{array}{l}
t_1 := \sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)}\\
t_2 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\
\mathbf{if}\;n \leq 3.8 \cdot 10^{-298}:\\
\;\;\;\;\sqrt{t_2 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\

\mathbf{elif}\;n \leq 2.22 \cdot 10^{-249}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;n \leq 2 \cdot 10^{-125}:\\
\;\;\;\;t_1\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}

Error

Derivation

  1. Split input into 4 regimes
  2. if n < 3.8e-298

    1. Initial program 34.6

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

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

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

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

    if 3.8e-298 < n < 2.22000000000000011e-249 or 1.10000000000000004e-172 < n < 2.00000000000000002e-125 or 4.00000000000000018e48 < n

    1. Initial program 36.6

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

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

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

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

    if 2.22000000000000011e-249 < n < 1.10000000000000004e-172

    1. Initial program 37.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. Simplified34.1

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

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

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

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

    if 2.00000000000000002e-125 < n < 4.00000000000000018e48

    1. Initial program 28.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. Simplified24.6

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq 3.8 \cdot 10^{-298}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\ \mathbf{elif}\;n \leq 2.22 \cdot 10^{-249}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)}\\ \mathbf{elif}\;n \leq 1.1 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 2 \cdot 10^{-125}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)}\\ \mathbf{elif}\;n \leq 4 \cdot 10^{+48}:\\ \;\;\;\;\sqrt{2 \cdot \mathsf{fma}\left(n, U \cdot t, \frac{n}{\frac{\frac{Om}{U \cdot \ell}}{\ell \cdot -2 - \frac{n}{Om} \cdot \left(U \cdot \ell\right)}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, \frac{n}{\frac{\frac{Om}{\ell}}{U*}}\right)\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error25.2
Cost32652
\[\begin{array}{l} t_1 := U \cdot \left(n \cdot 2\right)\\ t_2 := t_1 \cdot \left(\left(t + -2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(U* - U\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)\\ \mathbf{if}\;t_2 \leq 2 \cdot 10^{-314}:\\ \;\;\;\;\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot -2\right) \cdot \left(\left(\frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U - U*\right)\right) + \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right) - t\right)}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot t_1\right) \cdot \left(\ell \cdot \left(-2 - \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right) \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \end{array} \]
Alternative 2
Error25.2
Cost32652
\[\begin{array}{l} t_1 := U \cdot \left(n \cdot 2\right)\\ t_2 := t_1 \cdot \left(\left(t + -2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(U* - U\right) \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)\\ \mathbf{if}\;t_2 \leq 2 \cdot 10^{-314}:\\ \;\;\;\;\sqrt{2} \cdot \left(\sqrt{n} \cdot \sqrt{U \cdot t}\right)\\ \mathbf{elif}\;t_2 \leq 5 \cdot 10^{+299}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot -2\right) \cdot \left(\left(\frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U - U*\right)\right) + \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right) - t\right)}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot t_1\right) \cdot \left(\ell \cdot \left(-2 - \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right) \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \end{array} \]
Alternative 3
Error28.4
Cost8912
\[\begin{array}{l} t_1 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ t_2 := \sqrt{t_1 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ t_3 := \sqrt{t_1 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\ \mathbf{if}\;n \leq -5 \cdot 10^{-81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;n \leq 1.1 \cdot 10^{-172}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 6.6 \cdot 10^{-117}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + -2 \cdot \frac{n \cdot \left(\ell \cdot \left(U \cdot \left(\frac{n \cdot \left(U \cdot \ell\right)}{Om} + 2 \cdot \ell\right)\right)\right)}{Om}}\\ \mathbf{elif}\;n \leq 10^{-22}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 4
Error28.7
Cost8912
\[\begin{array}{l} t_1 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ t_2 := \sqrt{t_1 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\ \mathbf{if}\;n \leq -8.5 \cdot 10^{-230}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 1.6 \cdot 10^{-276}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} + 2 \cdot \ell\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 2.2 \cdot 10^{-234}:\\ \;\;\;\;\sqrt{t_1 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{elif}\;n \leq 6.5 \cdot 10^{-123}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right) + -2 \cdot \frac{\left(n \cdot \left(U \cdot \ell\right)\right) \cdot \left(\frac{n \cdot \left(\ell \cdot \left(U - U*\right)\right)}{Om} + 2 \cdot \ell\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 5
Error30.3
Cost8652
\[\begin{array}{l} t_1 := \sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ \mathbf{if}\;Om \leq -8.2 \cdot 10^{+246}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} + 2 \cdot \ell\right)\right)\right)\right)}\\ \mathbf{elif}\;Om \leq -1 \cdot 10^{+44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;Om \leq 10^{-268}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot -2\right) \cdot \left(\left(\frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U - U*\right)\right) + \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right) - t\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 6
Error29.5
Cost8652
\[\begin{array}{l} t_1 := \frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\ t_2 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ \mathbf{if}\;Om \leq -3.6 \cdot 10^{+211}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \mathbf{elif}\;Om \leq 10^{-140}:\\ \;\;\;\;\sqrt{t_2 + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right) \cdot \left(n \cdot \left(\frac{\ell}{Om} \cdot \left(U - U*\right)\right) + 2 \cdot \ell\right)}\\ \mathbf{elif}\;Om \leq 10^{+30}:\\ \;\;\;\;\sqrt{t_2 + t_1 \cdot \left(\ell \cdot \left(-2 - \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t_2 + t_1 \cdot \left(\ell \cdot \left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right)\right)}\\ \end{array} \]
Alternative 7
Error30.0
Cost8520
\[\begin{array}{l} t_1 := \sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) + \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\right) \cdot \left(\ell \cdot -2 + n \cdot \frac{\ell}{\frac{Om}{U*}}\right)}\\ \mathbf{if}\;n \leq -8.5 \cdot 10^{-230}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;n \leq 2.1 \cdot 10^{-138}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - \frac{\ell}{Om} \cdot \left(\frac{n}{\frac{Om}{U \cdot \ell}} + 2 \cdot \ell\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error28.9
Cost8520
\[\begin{array}{l} t_1 := \frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\ t_2 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ t_3 := \sqrt{t_2 + t_1 \cdot \left(\ell \cdot -2 + n \cdot \frac{\ell}{\frac{Om}{U*}}\right)}\\ \mathbf{if}\;n \leq -5 \cdot 10^{-81}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;n \leq 10^{+40}:\\ \;\;\;\;\sqrt{t_2 + t_1 \cdot \left(\ell \cdot \left(-2 - \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \]
Alternative 9
Error29.0
Cost8520
\[\begin{array}{l} t_1 := \frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot 2\right)\right)\\ t_2 := \left(n \cdot U\right) \cdot \left(2 \cdot t\right)\\ \mathbf{if}\;n \leq -5 \cdot 10^{-81}:\\ \;\;\;\;\sqrt{t_2 + t_1 \cdot \left(\ell \cdot -2 + n \cdot \frac{\ell}{\frac{Om}{U*}}\right)}\\ \mathbf{elif}\;n \leq 10^{+45}:\\ \;\;\;\;\sqrt{t_2 + t_1 \cdot \left(\ell \cdot \left(-2 - \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot -2\right) \cdot \left(\left(\frac{\ell}{Om} \cdot \left(\left(n \cdot \frac{\ell}{Om}\right) \cdot \left(U - U*\right)\right) + \frac{\ell}{Om} \cdot \left(2 \cdot \ell\right)\right) - t\right)}\\ \end{array} \]
Alternative 10
Error33.2
Cost8272
\[\begin{array}{l} t_1 := n \cdot \frac{U \cdot \ell}{Om}\\ \mathbf{if}\;\ell \leq -6 \cdot 10^{+22}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) - \left(\ell \cdot -2\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq -3.3 \cdot 10^{-219}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot 2\right) \cdot \left(t + \frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om}\right)}\\ \mathbf{elif}\;\ell \leq 6.6 \cdot 10^{+39}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.1 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right) \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \left(t_1 \cdot \left(t_1 + 2 \cdot \ell\right)\right)}\\ \end{array} \]
Alternative 11
Error33.7
Cost8140
\[\begin{array}{l} t_1 := \sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) - \left(\ell \cdot -2\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right)}\\ \mathbf{if}\;Om \leq -1.05 \cdot 10^{+117}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \mathbf{elif}\;Om \leq 2.5 \cdot 10^{-198}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;Om \leq 1.55 \cdot 10^{-121}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n \cdot \left(\left(U \cdot \ell\right) \cdot \left(2 \cdot \ell - \frac{n}{Om} \cdot \left(\ell \cdot U*\right)\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 12
Error31.1
Cost8140
\[\begin{array}{l} t_1 := n \cdot \frac{U \cdot \ell}{Om}\\ \mathbf{if}\;\ell \leq -2.25 \cdot 10^{+18}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot t\right) - \left(\ell \cdot -2\right) \cdot \left(\frac{\ell}{Om} \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.65 \cdot 10^{+22}:\\ \;\;\;\;\sqrt{-2 \cdot \left(n \cdot \left(U \cdot \left(\frac{\ell \cdot \left(2 \cdot \ell - \frac{n \cdot \left(\ell \cdot U*\right)}{Om}\right)}{Om} - t\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.1 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{2 \cdot \frac{n \cdot \left(\left(-2 + \left(U* - U\right) \cdot \frac{n}{Om}\right) \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \left(t_1 \cdot \left(t_1 + 2 \cdot \ell\right)\right)}\\ \end{array} \]
Alternative 13
Error34.2
Cost7888
\[\begin{array}{l} t_1 := \frac{Om}{\ell \cdot \ell}\\ t_2 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ t_3 := \left(n \cdot U\right) \cdot 2\\ \mathbf{if}\;\ell \leq -1.4 \cdot 10^{+29}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\ell \leq -6.4 \cdot 10^{-115}:\\ \;\;\;\;\sqrt{t_3 \cdot \left(t + \frac{U* \cdot \frac{n}{Om}}{t_1}\right)}\\ \mathbf{elif}\;\ell \leq -1.15 \cdot 10^{-208}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;\sqrt{t_3 \cdot \left(t + \frac{-2}{t_1}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 14
Error33.3
Cost7880
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \mathbf{if}\;\ell \leq -6 \cdot 10^{+46}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 9.4 \cdot 10^{-55}:\\ \;\;\;\;\sqrt{\left(\left(n \cdot U\right) \cdot 2\right) \cdot \left(t + \frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error33.7
Cost7876
\[\begin{array}{l} t_1 := n \cdot \frac{U \cdot \ell}{Om}\\ \mathbf{if}\;\ell \leq -6.4 \cdot 10^{+158}:\\ \;\;\;\;\sqrt{-2 \cdot \left(t_1 \cdot \left(t_1 + 2 \cdot \ell\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{-49}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot \left(t + \frac{-2 \cdot \left(\ell \cdot \ell\right)}{Om}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \end{array} \]
Alternative 16
Error40.4
Cost7496
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{if}\;U \leq -8.5 \cdot 10^{-250}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 1.35 \cdot 10^{-247}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n \cdot \left(2 \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)}{Om}}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 17
Error34.5
Cost7492
\[\begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+143}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right)\right)\right)}\\ \end{array} \]
Alternative 18
Error40.0
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq -4.5 \cdot 10^{+143}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U \cdot 2\right)\right)}\\ \end{array} \]
Alternative 19
Error39.9
Cost6980
\[\begin{array}{l} \mathbf{if}\;t \leq 1.05 \cdot 10^{-193}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U \cdot 2\right)\right)}\\ \end{array} \]
Alternative 20
Error39.9
Cost6848
\[\sqrt{n \cdot \left(t \cdot \left(U \cdot 2\right)\right)} \]

Error

Reproduce

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