?

Average Error: 54.15% → 41.11%
Time: 40.7s
Precision: binary64
Cost: 48968

?

\[\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 := {\left(\frac{\ell}{Om}\right)}^{2}\\ t_2 := \sqrt{\left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot t_1\right) \cdot \left(U - U*\right) + \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)}\\ \mathbf{if}\;t_2 \leq 2 \cdot 10^{-159}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, n \cdot \left(t_1 \cdot \left(U - U*\right)\right)\right)\right)}\\ \mathbf{elif}\;t_2 \leq 2 \cdot 10^{+150}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{n \cdot \left(\ell \cdot \sqrt{U \cdot U*}\right)}{Om} \cdot \sqrt{2}\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*))))))
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (pow (/ l Om) 2.0))
        (t_2
         (sqrt
          (*
           (* U (* n -2.0))
           (+ (* (* n t_1) (- U U*)) (- (* 2.0 (/ (* l l) Om)) t))))))
   (if (<= t_2 2e-159)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma 2.0 (/ l (/ Om l)) (* n (* t_1 (- U U*))))))))
     (if (<= t_2 2e+150)
       t_2
       (fabs (* (/ (* n (* l (sqrt (* U U*)))) Om) (sqrt 2.0)))))))
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 = pow((l / Om), 2.0);
	double t_2 = sqrt(((U * (n * -2.0)) * (((n * t_1) * (U - U_42_)) + ((2.0 * ((l * l) / Om)) - t))));
	double tmp;
	if (t_2 <= 2e-159) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l / (Om / l)), (n * (t_1 * (U - U_42_)))))));
	} else if (t_2 <= 2e+150) {
		tmp = t_2;
	} else {
		tmp = fabs((((n * (l * sqrt((U * U_42_)))) / Om) * sqrt(2.0)));
	}
	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(l / Om) ^ 2.0
	t_2 = sqrt(Float64(Float64(U * Float64(n * -2.0)) * Float64(Float64(Float64(n * t_1) * Float64(U - U_42_)) + Float64(Float64(2.0 * Float64(Float64(l * l) / Om)) - t))))
	tmp = 0.0
	if (t_2 <= 2e-159)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * Float64(t - fma(2.0, Float64(l / Float64(Om / l)), Float64(n * Float64(t_1 * Float64(U - U_42_))))))));
	elseif (t_2 <= 2e+150)
		tmp = t_2;
	else
		tmp = abs(Float64(Float64(Float64(n * Float64(l * sqrt(Float64(U * U_42_)))) / Om) * sqrt(2.0)));
	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[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(N[(U * N[(n * -2.0), $MachinePrecision]), $MachinePrecision] * N[(N[(N[(n * t$95$1), $MachinePrecision] * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] + N[(N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 2e-159], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * N[(t - N[(2.0 * N[(l / N[(Om / l), $MachinePrecision]), $MachinePrecision] + N[(n * N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+150], t$95$2, N[Abs[N[(N[(N[(n * N[(l * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\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 := {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot t_1\right) \cdot \left(U - U*\right) + \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)}\\
\mathbf{if}\;t_2 \leq 2 \cdot 10^{-159}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{\ell}{\frac{Om}{\ell}}, n \cdot \left(t_1 \cdot \left(U - U*\right)\right)\right)\right)}\\

\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+150}:\\
\;\;\;\;t_2\\

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


\end{array}

Error?

Derivation?

  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999998e-159

    1. Initial program 88.84

      \[\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. Simplified63.59

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

      [Start]88.84

      \[ \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)} \]

      associate-*l* [=>]61.76

      \[ \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}} \]

      associate--l- [=>]61.76

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

      sub-neg [=>]61.76

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

      sub-neg [<=]61.76

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

      cancel-sign-sub [<=]61.76

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

      cancel-sign-sub [=>]61.76

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

      associate-/l* [=>]61.76

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

      associate-*l* [=>]63.59

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

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

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

      [Start]60.27

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

      associate-/l* [=>]59.94

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

      associate-*r* [=>]61.46

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

      *-commutative [=>]61.46

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

      *-commutative [=>]61.46

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

    if 1.99999999999999998e-159 < (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))) < 1.99999999999999996e150

    1. Initial program 1.99

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

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

    1. Initial program 98.63

      \[\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. Simplified84.83

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

      [Start]98.63

      \[ \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)} \]

      associate-*l* [=>]96.34

      \[ \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot \left(U \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)\right)}} \]

      associate--l- [=>]96.34

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

      sub-neg [=>]96.34

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

      sub-neg [<=]96.34

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

      cancel-sign-sub [<=]96.34

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

      cancel-sign-sub [=>]96.34

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

      associate-/l* [=>]85.39

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

      associate-*l* [=>]84.83

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

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

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

      [Start]98.31

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

      unpow2 [=>]98.31

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

      unpow2 [=>]98.31

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

      unpow2 [=>]98.31

      \[ \sqrt{2 \cdot \frac{\left(n \cdot n\right) \cdot \left(\left(\ell \cdot \ell\right) \cdot \left(U \cdot U*\right)\right)}{\color{blue}{Om \cdot Om}}} \]
    5. Applied egg-rr76.5

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

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

Alternatives

Alternative 1
Error41.2%
Cost36168
\[\begin{array}{l} t_1 := \left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right) + \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)\\ \mathbf{if}\;t_1 \leq 0:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \left(\frac{n}{Om} \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{n \cdot \left(\ell \cdot \sqrt{U \cdot U*}\right)}{Om} \cdot \sqrt{2}\right|\\ \end{array} \]
Alternative 2
Error40.93%
Cost36168
\[\begin{array}{l} t_1 := \left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right) + \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)\\ \mathbf{if}\;t_1 \leq 5 \cdot 10^{-318}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \ell \cdot \frac{\ell}{Om}, \ell \cdot \frac{n}{\frac{Om}{\frac{\ell}{Om} \cdot \left(U - U*\right)}}\right)\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+300}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;\left|\frac{n \cdot \left(\ell \cdot \sqrt{U \cdot U*}\right)}{Om} \cdot \sqrt{2}\right|\\ \end{array} \]
Alternative 3
Error46.39%
Cost14992
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}} \cdot -2\\ \mathbf{if}\;\ell \leq -4.5 \cdot 10^{+78}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \left(\frac{1}{Om} \cdot -2 - \frac{n}{Om} \cdot \frac{U - U*}{Om}\right)\right)} \cdot \left(\ell \cdot \left(-\sqrt{2}\right)\right)\\ \mathbf{elif}\;\ell \leq -4.2 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + t_1\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.75 \cdot 10^{-228}:\\ \;\;\;\;\sqrt{\left|t \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 6 \cdot 10^{+183}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(t + \left(t_1 + n \cdot \left({\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right)\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \end{array} \]
Alternative 4
Error44.96%
Cost14860
\[\begin{array}{l} \mathbf{if}\;\ell \leq -6.5 \cdot 10^{+83}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \left(\frac{1}{Om} \cdot -2 - \frac{n}{Om} \cdot \frac{U - U*}{Om}\right)\right)} \cdot \left(\ell \cdot \left(-\sqrt{2}\right)\right)\\ \mathbf{elif}\;\ell \leq -1.25 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + \frac{\ell}{\frac{Om}{\ell}} \cdot -2\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 1.15 \cdot 10^{+72}:\\ \;\;\;\;\sqrt{\left(U \cdot \left(n \cdot -2\right)\right) \cdot \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right) + \left(2 \cdot \frac{\ell \cdot \ell}{Om} - t\right)\right)}\\ \mathbf{elif}\;\ell \leq 5.6 \cdot 10^{+148}:\\ \;\;\;\;\sqrt{\mathsf{fma}\left(2, n \cdot \left(U \cdot t\right), -4 \cdot \left(\frac{n}{Om} \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \end{array} \]
Alternative 5
Error48.59%
Cost14672
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}}\\ \mathbf{if}\;\ell \leq -3.2 \cdot 10^{+178}:\\ \;\;\;\;\left(\ell \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{U \cdot \frac{-2}{\frac{Om}{n}}}\\ \mathbf{elif}\;\ell \leq -6.6 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + t_1 \cdot -2\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 10^{-226}:\\ \;\;\;\;\sqrt{\left|t \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 7.8 \cdot 10^{+183}:\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_1 - n \cdot \left(t_1 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \end{array} \]
Alternative 6
Error47.36%
Cost14672
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}}\\ \mathbf{if}\;\ell \leq -2.4 \cdot 10^{+76}:\\ \;\;\;\;\left(\ell \cdot \left(-\sqrt{2}\right)\right) \cdot \sqrt{\left(n \cdot U\right) \cdot \left(\frac{n}{\frac{Om \cdot Om}{U* - U}} + \frac{-2}{Om}\right)}\\ \mathbf{elif}\;\ell \leq -6.5 \cdot 10^{-164}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + t_1 \cdot -2\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.5 \cdot 10^{-226}:\\ \;\;\;\;\sqrt{\left|t \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 2.1 \cdot 10^{+184}:\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_1 - n \cdot \left(t_1 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \end{array} \]
Alternative 7
Error47.1%
Cost14672
\[\begin{array}{l} t_1 := \ell \cdot \sqrt{2}\\ t_2 := \frac{\ell}{\frac{Om}{\ell}}\\ t_3 := \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \mathbf{if}\;\ell \leq -4.2 \cdot 10^{+75}:\\ \;\;\;\;t_1 \cdot \left(-t_3\right)\\ \mathbf{elif}\;\ell \leq -1.26 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + t_2 \cdot -2\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 5.5 \cdot 10^{-227}:\\ \;\;\;\;\sqrt{\left|t \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 7.5 \cdot 10^{+182}:\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_2 - n \cdot \left(t_2 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1 \cdot t_3\\ \end{array} \]
Alternative 8
Error46.4%
Cost14672
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}}\\ \mathbf{if}\;\ell \leq -1.1 \cdot 10^{+74}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \left(\frac{1}{Om} \cdot -2 - \frac{n}{Om} \cdot \frac{U - U*}{Om}\right)\right)} \cdot \left(\ell \cdot \left(-\sqrt{2}\right)\right)\\ \mathbf{elif}\;\ell \leq -2.25 \cdot 10^{-163}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + t_1 \cdot -2\right)\right)\right)\right)}\\ \mathbf{elif}\;\ell \leq 9 \cdot 10^{-228}:\\ \;\;\;\;\sqrt{\left|t \cdot \left(U \cdot \left(n \cdot -2\right)\right)\right|}\\ \mathbf{elif}\;\ell \leq 3.7 \cdot 10^{+183}:\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_1 - n \cdot \left(t_1 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\ell \cdot \sqrt{2}\right) \cdot \sqrt{\left(\frac{-2}{Om} - \left(U - U*\right) \cdot \frac{n}{Om \cdot Om}\right) \cdot \left(n \cdot U\right)}\\ \end{array} \]
Alternative 9
Error47.17%
Cost13644
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}}\\ t_2 := \sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_1 - n \cdot \left(t_1 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{if}\;n \leq -1.9 \cdot 10^{-87}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;n \leq 2.75 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{elif}\;n \leq 9.5 \cdot 10^{+205}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot t\right)} \cdot \sqrt{n}\\ \end{array} \]
Alternative 10
Error52.09%
Cost8656
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\frac{n}{Om} \cdot \frac{\ell \cdot \left(\ell \cdot U*\right)}{Om} + \frac{\ell}{\frac{Om}{\ell}} \cdot -2\right)\right)\right)\right)}\\ \mathbf{if}\;\ell \leq -5 \cdot 10^{+72}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot \left(\ell \cdot \left(U \cdot \ell\right)\right)\right) \cdot \left(\frac{n}{Om} \cdot \frac{U* - U}{Om} + \frac{-2}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq -1.7 \cdot 10^{-163}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 4.1 \cdot 10^{-225}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{\ell \cdot -2}{\frac{Om}{\ell}}\right)}\\ \mathbf{elif}\;\ell \leq 6.2 \cdot 10^{+22}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \end{array} \]
Alternative 11
Error47.95%
Cost8521
\[\begin{array}{l} t_1 := \frac{\ell}{\frac{Om}{\ell}}\\ \mathbf{if}\;n \leq -6 \cdot 10^{-90} \lor \neg \left(n \leq 1.15 \cdot 10^{-49}\right):\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot t_1 - n \cdot \left(t_1 \cdot \frac{U* - U}{Om}\right)\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \end{array} \]
Alternative 12
Error48.07%
Cost8457
\[\begin{array}{l} \mathbf{if}\;n \leq -2.55 \cdot 10^{-42} \lor \neg \left(n \leq 1.18 \cdot 10^{-48}\right):\\ \;\;\;\;\sqrt{\left(n \cdot -2\right) \cdot \left(U \cdot \left(\left(2 \cdot \frac{\ell}{\frac{Om}{\ell}} + n \cdot \frac{\ell}{\frac{Om \cdot \frac{-Om}{\ell}}{U*}}\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \end{array} \]
Alternative 13
Error62.71%
Cost7629
\[\begin{array}{l} \mathbf{if}\;U \leq -3.5 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;U \leq 1.3 \cdot 10^{-108} \lor \neg \left(U \leq 2.5 \cdot 10^{-96}\right):\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(\left(\ell \cdot \left(n \cdot \ell\right)\right) \cdot \frac{-2}{Om}\right)\right)}\\ \end{array} \]
Alternative 14
Error52.4%
Cost7624
\[\begin{array}{l} \mathbf{if}\;n \leq -2 \cdot 10^{+193}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;n \leq 1.8 \cdot 10^{+41}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
Alternative 15
Error51.81%
Cost7624
\[\begin{array}{l} \mathbf{if}\;n \leq -5 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 2.15 \cdot 10^{+42}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
Alternative 16
Error50.84%
Cost7624
\[\begin{array}{l} \mathbf{if}\;n \leq -5 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t - \ell \cdot \left(2 \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{elif}\;n \leq 5.3 \cdot 10^{+42}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \ell \cdot \frac{\ell \cdot -2}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{\ell \cdot -2}{\frac{Om}{\ell}}\right)}\\ \end{array} \]
Alternative 17
Error61.23%
Cost7112
\[\begin{array}{l} \mathbf{if}\;n \leq -2 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \mathbf{elif}\;n \leq 5 \cdot 10^{+112}:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
Alternative 18
Error62.54%
Cost6980
\[\begin{array}{l} \mathbf{if}\;U \leq -3 \cdot 10^{-172}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)}\\ \end{array} \]
Alternative 19
Error63.35%
Cost6848
\[\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right)\right)} \]

Error

Reproduce?

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