?

Average Error: 34.6 → 28.8
Time: 25.2s
Precision: binary64
Cost: 36936

?

\[\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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ \mathbf{if}\;t_1 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \left(\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(U + U\right)\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;-\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om} - \frac{\left(U - U*\right) \cdot \left(n \cdot U\right)}{{Om}^{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
         (*
          (* (* 2.0 n) U)
          (-
           (- t (* 2.0 (/ (* l l) Om)))
           (* (* n (pow (/ l Om) 2.0)) (- U U*))))))
   (if (<= t_1 0.0)
     (sqrt (* n (* (+ t (* -2.0 (/ (pow l 2.0) Om))) (+ U U))))
     (if (<= t_1 5e+302)
       (sqrt t_1)
       (-
        (*
         (* (sqrt 2.0) l)
         (sqrt
          (*
           n
           (- (* -2.0 (/ U Om)) (/ (* (- U U*) (* n U)) (pow Om 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 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * pow((l / Om), 2.0)) * (U - U_42_)));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt((n * ((t + (-2.0 * (pow(l, 2.0) / Om))) * (U + U))));
	} else if (t_1 <= 5e+302) {
		tmp = sqrt(t_1);
	} else {
		tmp = -((sqrt(2.0) * l) * sqrt((n * ((-2.0 * (U / Om)) - (((U - U_42_) * (n * U)) / pow(Om, 2.0))))));
	}
	return tmp;
}
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    code = sqrt((((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))))
end function
real(8) function code(n, u, t, l, om, u_42)
    real(8), intent (in) :: n
    real(8), intent (in) :: u
    real(8), intent (in) :: t
    real(8), intent (in) :: l
    real(8), intent (in) :: om
    real(8), intent (in) :: u_42
    real(8) :: t_1
    real(8) :: tmp
    t_1 = ((2.0d0 * n) * u) * ((t - (2.0d0 * ((l * l) / om))) - ((n * ((l / om) ** 2.0d0)) * (u - u_42)))
    if (t_1 <= 0.0d0) then
        tmp = sqrt((n * ((t + ((-2.0d0) * ((l ** 2.0d0) / om))) * (u + u))))
    else if (t_1 <= 5d+302) then
        tmp = sqrt(t_1)
    else
        tmp = -((sqrt(2.0d0) * l) * sqrt((n * (((-2.0d0) * (u / om)) - (((u - u_42) * (n * u)) / (om ** 2.0d0))))))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)))));
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * Math.pow((l / Om), 2.0)) * (U - U_42_)));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = Math.sqrt((n * ((t + (-2.0 * (Math.pow(l, 2.0) / Om))) * (U + U))));
	} else if (t_1 <= 5e+302) {
		tmp = Math.sqrt(t_1);
	} else {
		tmp = -((Math.sqrt(2.0) * l) * Math.sqrt((n * ((-2.0 * (U / Om)) - (((U - U_42_) * (n * U)) / Math.pow(Om, 2.0))))));
	}
	return tmp;
}
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_)))))
def code(n, U, t, l, Om, U_42_):
	t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * math.pow((l / Om), 2.0)) * (U - U_42_)))
	tmp = 0
	if t_1 <= 0.0:
		tmp = math.sqrt((n * ((t + (-2.0 * (math.pow(l, 2.0) / Om))) * (U + U))))
	elif t_1 <= 5e+302:
		tmp = math.sqrt(t_1)
	else:
		tmp = -((math.sqrt(2.0) * l) * math.sqrt((n * ((-2.0 * (U / Om)) - (((U - U_42_) * (n * U)) / math.pow(Om, 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(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_))))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = sqrt(Float64(n * Float64(Float64(t + Float64(-2.0 * Float64((l ^ 2.0) / Om))) * Float64(U + U))));
	elseif (t_1 <= 5e+302)
		tmp = sqrt(t_1);
	else
		tmp = Float64(-Float64(Float64(sqrt(2.0) * l) * sqrt(Float64(n * Float64(Float64(-2.0 * Float64(U / Om)) - Float64(Float64(Float64(U - U_42_) * Float64(n * U)) / (Om ^ 2.0)))))));
	end
	return tmp
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
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = ((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) - ((n * ((l / Om) ^ 2.0)) * (U - U_42_)));
	tmp = 0.0;
	if (t_1 <= 0.0)
		tmp = sqrt((n * ((t + (-2.0 * ((l ^ 2.0) / Om))) * (U + U))));
	elseif (t_1 <= 5e+302)
		tmp = sqrt(t_1);
	else
		tmp = -((sqrt(2.0) * l) * sqrt((n * ((-2.0 * (U / Om)) - (((U - U_42_) * (n * U)) / (Om ^ 2.0))))));
	end
	tmp_2 = 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[(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]}, If[LessEqual[t$95$1, 0.0], N[Sqrt[N[(n * N[(N[(t + N[(-2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(U + U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$1, 5e+302], N[Sqrt[t$95$1], $MachinePrecision], (-N[(N[(N[Sqrt[2.0], $MachinePrecision] * l), $MachinePrecision] * N[Sqrt[N[(n * N[(N[(-2.0 * N[(U / Om), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(U - U$42$), $MachinePrecision] * N[(n * U), $MachinePrecision]), $MachinePrecision] / N[Power[Om, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;\sqrt{n \cdot \left(\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(U + U\right)\right)}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t_1}\\

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


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if (*.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*)))) < 0.0

    1. Initial program 57.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. Taylor expanded in n around 0 42.4

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

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

      [Start]42.4

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]55.3

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

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

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

      [Start]55.2

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

      rational_best_oopsla_all_46_json_45_simplify-85 [=>]55.2

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]42.4

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]42.4

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

    if 0.0 < (*.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*)))) < 5e302

    1. Initial program 1.8

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

    if 5e302 < (*.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 63.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. Simplified61.5

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

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]63.6

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]62.1

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

      metadata-eval [<=]62.1

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

      metadata-eval [<=]62.1

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

      metadata-eval [<=]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-23 [<=]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [<=]62.1

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

      metadata-eval [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-52 [=>]62.1

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

      metadata-eval [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-52 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]61.5

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]61.5

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

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

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

      [Start]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-102 [=>]62.1

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]62.0

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

      rational_best_oopsla_all_46_json_45_simplify-74 [<=]62.0

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

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

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

      [Start]55.5

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

      rational_best_oopsla_all_46_json_45_simplify-74 [=>]55.5

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

      rational_best_oopsla_all_46_json_45_simplify-92 [=>]55.5

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

      rational_best_oopsla_all_46_json_45_simplify-7 [=>]54.9

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

    \[\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 0:\\ \;\;\;\;\sqrt{n \cdot \left(\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(U + U\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 5 \cdot 10^{+302}:\\ \;\;\;\;\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;-\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{n \cdot \left(-2 \cdot \frac{U}{Om} - \frac{\left(U - U*\right) \cdot \left(n \cdot U\right)}{{Om}^{2}}\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error29.2
Cost30728
\[\begin{array}{l} t_1 := \left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\\ \mathbf{if}\;t_1 \leq 0:\\ \;\;\;\;\sqrt{n \cdot \left(\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(U + U\right)\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;\sqrt{t_1}\\ \mathbf{else}:\\ \;\;\;\;-\frac{-\left(-n\right) \cdot \left(\sqrt{2} \cdot \ell\right)}{Om} \cdot \sqrt{U* \cdot U}\\ \end{array} \]
Alternative 2
Error34.4
Cost14596
\[\begin{array}{l} \mathbf{if}\;\ell \leq 4.2 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(n + n\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot \left(U - U*\right)\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
Alternative 3
Error34.9
Cost14344
\[\begin{array}{l} t_1 := \frac{{\ell}^{2}}{Om}\\ \mathbf{if}\;\ell \leq -1.15 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(t - 2 \cdot t_1\right) \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.2 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{\left(n \cdot \left(-2 \cdot t_1\right)\right) \cdot \left(U + U\right) + \left(U + U\right) \cdot \left(n \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
Alternative 4
Error35.4
Cost14092
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot U\right)\right)}\\ \mathbf{if}\;\ell \leq -9 \cdot 10^{-107}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 3.5 \cdot 10^{+20}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;\ell \leq 8.4 \cdot 10^{+153}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
Alternative 5
Error35.2
Cost14092
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(\left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right) \cdot \left(n \cdot U\right)\right)}\\ \mathbf{if}\;\ell \leq -9.5 \cdot 10^{-297}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 7.2 \cdot 10^{-144}:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(U + U\right)}\\ \mathbf{elif}\;\ell \leq 1.35 \cdot 10^{+154}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
Alternative 6
Error38.3
Cost13900
\[\begin{array}{l} \mathbf{if}\;\ell \leq -4.1 \cdot 10^{-296}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;\ell \leq 3.8 \cdot 10^{-141}:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(U + U\right)}\\ \mathbf{elif}\;\ell \leq 5.3 \cdot 10^{+157}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(\sqrt{2} \cdot \ell\right) \cdot \sqrt{-2 \cdot \frac{n \cdot U}{Om}}\\ \end{array} \]
Alternative 7
Error38.9
Cost7112
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{if}\;U \leq -6.4 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 8.2 \cdot 10^{-76}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 8
Error38.9
Cost7112
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{if}\;U \leq -6 \cdot 10^{+83}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 1.2 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 9
Error38.9
Cost7112
\[\begin{array}{l} \mathbf{if}\;U \leq -6 \cdot 10^{+83}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(n \cdot U\right) \cdot t\right)}\\ \mathbf{elif}\;U \leq 5 \cdot 10^{-76}:\\ \;\;\;\;\sqrt{n \cdot \left(t \cdot \left(U + U\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
Alternative 10
Error40.0
Cost7112
\[\begin{array}{l} \mathbf{if}\;t \leq 8 \cdot 10^{-200}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \mathbf{elif}\;t \leq 3 \cdot 10^{+296}:\\ \;\;\;\;\sqrt{\left(n \cdot t\right) \cdot \left(U + U\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right)}\\ \end{array} \]
Alternative 11
Error40.4
Cost6848
\[\sqrt{2 \cdot \left(n \cdot \left(t \cdot U\right)\right)} \]

Error

Reproduce?

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