Average Error: 35.4 → 25.5
Time: 30.9s
Precision: binary64
Cost: 43528
\[\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(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_2 \leq 0:\\ \;\;\;\;\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 10^{+149}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\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*))))))
(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 (* (/ (* l l) Om) -2.0)) (* (* n t_1) (- U* U)))))))
   (if (<= t_2 0.0)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma 2.0 (/ l (/ Om l)) (* n (* t_1 (- U U*))))))))
     (if (<= t_2 1e+149)
       t_2
       (sqrt
        (*
         2.0
         (-
          (* n (* U t))
          (/
           (+ (/ (- U U*) (/ Om (* n l))) (* 2.0 l))
           (/ Om (* U (* n l)))))))))))
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((((2.0 * n) * U) * ((t + (((l * l) / Om) * -2.0)) + ((n * t_1) * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (l / (Om / l)), (n * (t_1 * (U - U_42_)))))));
	} else if (t_2 <= 1e+149) {
		tmp = t_2;
	} else {
		tmp = sqrt((2.0 * ((n * (U * t)) - ((((U - U_42_) / (Om / (n * l))) + (2.0 * l)) / (Om / (U * (n * l)))))));
	}
	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(Float64(2.0 * n) * U) * Float64(Float64(t + Float64(Float64(Float64(l * l) / Om) * -2.0)) + Float64(Float64(n * t_1) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_2 <= 0.0)
		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 <= 1e+149)
		tmp = t_2;
	else
		tmp = sqrt(Float64(2.0 * Float64(Float64(n * Float64(U * t)) - Float64(Float64(Float64(Float64(U - U_42_) / Float64(Om / Float64(n * l))) + Float64(2.0 * l)) / Float64(Om / Float64(U * Float64(n * l)))))));
	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[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision] * N[(N[(t + N[(N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision] * -2.0), $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[(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, 1e+149], t$95$2, N[Sqrt[N[(2.0 * N[(N[(n * N[(U * t), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(N[(U - U$42$), $MachinePrecision] / N[(Om / N[(n * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(2.0 * l), $MachinePrecision]), $MachinePrecision] / N[(Om / N[(U * N[(n * l), $MachinePrecision]), $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(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + \left(n \cdot t_1\right) \cdot \left(U* - U\right)\right)}\\
\mathbf{if}\;t_2 \leq 0:\\
\;\;\;\;\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 10^{+149}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\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*))))) < 0.0

    1. Initial program 56.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. Applied egg-rr39.5

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot \sqrt{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)}} \]
    3. Simplified39.5

      \[\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
      (*.f64 (sqrt.f64 (*.f64 2 n)) (sqrt.f64 (*.f64 U (-.f64 t (fma.f64 2 (/.f64 l (/.f64 Om l)) (*.f64 n (*.f64 (-.f64 U U*) (pow.f64 (/.f64 l Om) 2)))))))): 0 points increase in error, 0 points decrease in error
      (*.f64 (sqrt.f64 (*.f64 2 n)) (sqrt.f64 (*.f64 U (-.f64 t (fma.f64 2 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 l l) Om)) (*.f64 n (*.f64 (-.f64 U U*) (pow.f64 (/.f64 l Om) 2)))))))): 7 points increase in error, 2 points decrease in error
      (*.f64 (sqrt.f64 (*.f64 2 n)) (sqrt.f64 (*.f64 U (-.f64 t (fma.f64 2 (Rewrite<= associate-*r/_binary64 (*.f64 l (/.f64 l Om))) (*.f64 n (*.f64 (-.f64 U U*) (pow.f64 (/.f64 l Om) 2)))))))): 1 points increase in error, 7 points decrease in error
      (*.f64 (sqrt.f64 (*.f64 2 n)) (sqrt.f64 (*.f64 U (-.f64 t (fma.f64 2 (*.f64 l (/.f64 l Om)) (*.f64 n (Rewrite<= *-commutative_binary64 (*.f64 (pow.f64 (/.f64 l Om) 2) (-.f64 U U*))))))))): 0 points increase in error, 0 points decrease in error

    if 0.0 < (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.00000000000000005e149

    1. Initial program 1.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)} \]

    if 1.00000000000000005e149 < (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 62.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. Simplified56.7

      \[\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, n \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)\right)}} \]
      Proof
      (sqrt.f64 (*.f64 (*.f64 2 (*.f64 n U)) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l -2 (*.f64 n (/.f64 (*.f64 l (-.f64 U* U)) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 2 n) U)) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l -2 (*.f64 n (/.f64 (*.f64 l (-.f64 U* U)) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (Rewrite<= metadata-eval (neg.f64 2)) (*.f64 n (/.f64 (*.f64 l (-.f64 U* U)) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (/.f64 (*.f64 l (Rewrite=> sub-neg_binary64 (+.f64 U* (neg.f64 U)))) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (/.f64 (*.f64 l (+.f64 (Rewrite<= remove-double-neg_binary64 (neg.f64 (neg.f64 U*))) (neg.f64 U))) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (/.f64 (*.f64 l (Rewrite<= distribute-neg-in_binary64 (neg.f64 (+.f64 (neg.f64 U*) U)))) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (/.f64 (*.f64 l (neg.f64 (Rewrite<= +-commutative_binary64 (+.f64 U (neg.f64 U*))))) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (/.f64 (*.f64 l (neg.f64 (Rewrite<= sub-neg_binary64 (-.f64 U U*)))) Om))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (Rewrite<= associate-*l/_binary64 (*.f64 (/.f64 l Om) (neg.f64 (-.f64 U U*)))))))))): 2 points increase in error, 11 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (*.f64 n (Rewrite=> distribute-rgt-neg-out_binary64 (neg.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)))))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (Rewrite<= distribute-rgt-neg-in_binary64 (neg.f64 (*.f64 n (*.f64 (/.f64 l Om) (-.f64 U U*)))))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (fma.f64 l (neg.f64 2) (neg.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (Rewrite<= fma-neg_binary64 (-.f64 (*.f64 l (neg.f64 2)) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (*.f64 (/.f64 l Om) (-.f64 (Rewrite<= *-commutative_binary64 (*.f64 (neg.f64 2) l)) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (Rewrite<= distribute-lft-out--_binary64 (-.f64 (*.f64 (/.f64 l Om) (*.f64 (neg.f64 2) l)) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 l (*.f64 (neg.f64 2) l)) Om)) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 14 points increase in error, 2 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (/.f64 (Rewrite<= *-commutative_binary64 (*.f64 (*.f64 (neg.f64 2) l) l)) Om) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 (neg.f64 2) (*.f64 l l))) Om) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (Rewrite<= associate-*r/_binary64 (*.f64 (neg.f64 2) (/.f64 (*.f64 l l) Om))) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (Rewrite<= distribute-lft-neg-in_binary64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om)))) (*.f64 (/.f64 l Om) (*.f64 (*.f64 (/.f64 l Om) (-.f64 U U*)) n)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om))) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 l Om) (*.f64 (/.f64 l Om) (-.f64 U U*))) n)))))): 6 points increase in error, 3 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 (/.f64 l Om) (/.f64 l Om)) (-.f64 U U*))) n))))): 3 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 (Rewrite<= unpow2_binary64 (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)) n))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om))) (Rewrite<= *-commutative_binary64 (*.f64 n (*.f64 (pow.f64 (/.f64 l Om) 2) (-.f64 U U*)))))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (+.f64 t (-.f64 (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om))) (Rewrite<= associate-*l*_binary64 (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))))): 1 points increase in error, 3 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (Rewrite<= associate--l+_binary64 (-.f64 (+.f64 t (neg.f64 (*.f64 2 (/.f64 (*.f64 l l) Om)))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*)))))): 0 points increase in error, 0 points decrease in error
      (sqrt.f64 (*.f64 (*.f64 (*.f64 2 n) U) (-.f64 (Rewrite<= sub-neg_binary64 (-.f64 t (*.f64 2 (/.f64 (*.f64 l l) Om)))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) 2)) (-.f64 U U*))))): 0 points increase in error, 0 points decrease in error
    3. Taylor expanded in t around inf 50.4

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

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)}{\frac{Om}{n \cdot \left(\ell \cdot U\right)}}\right)}} \]
      Proof
      (*.f64 2 (+.f64 (*.f64 n (*.f64 U t)) (/.f64 (+.f64 (*.f64 l -2) (*.f64 (/.f64 n (/.f64 Om l)) (-.f64 U* U))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (Rewrite<= *-commutative_binary64 (*.f64 t U))) (/.f64 (+.f64 (*.f64 l -2) (*.f64 (/.f64 n (/.f64 Om l)) (-.f64 U* U))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (/.f64 (+.f64 (Rewrite<= *-commutative_binary64 (*.f64 -2 l)) (*.f64 (/.f64 n (/.f64 Om l)) (-.f64 U* U))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (/.f64 (+.f64 (*.f64 -2 l) (*.f64 (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 n l) Om)) (-.f64 U* U))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 5 points increase in error, 2 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (/.f64 (+.f64 (*.f64 -2 l) (Rewrite=> associate-*l/_binary64 (/.f64 (*.f64 (*.f64 n l) (-.f64 U* U)) Om))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 6 points increase in error, 1 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (/.f64 (+.f64 (*.f64 -2 l) (/.f64 (Rewrite<= associate-*r*_binary64 (*.f64 n (*.f64 l (-.f64 U* U)))) Om)) (/.f64 Om (*.f64 n (*.f64 l U)))))): 4 points increase in error, 3 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (/.f64 (Rewrite<= +-commutative_binary64 (+.f64 (/.f64 (*.f64 n (*.f64 l (-.f64 U* U))) Om) (*.f64 -2 l))) (/.f64 Om (*.f64 n (*.f64 l U)))))): 0 points increase in error, 0 points decrease in error
      (*.f64 2 (+.f64 (*.f64 n (*.f64 t U)) (Rewrite<= associate-/l*_binary64 (/.f64 (*.f64 (+.f64 (/.f64 (*.f64 n (*.f64 l (-.f64 U* U))) Om) (*.f64 -2 l)) (*.f64 n (*.f64 l U))) Om)))): 16 points increase in error, 5 points decrease in error
      (Rewrite<= distribute-lft-out_binary64 (+.f64 (*.f64 2 (*.f64 n (*.f64 t U))) (*.f64 2 (/.f64 (*.f64 (+.f64 (/.f64 (*.f64 n (*.f64 l (-.f64 U* U))) Om) (*.f64 -2 l)) (*.f64 n (*.f64 l U))) Om)))): 0 points increase in error, 0 points decrease in error
    5. Applied egg-rr56.6

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)}{\color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{Om}{n \cdot \ell}}{U}\right)} - 1}}\right)} \]
    6. Simplified46.7

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + \frac{n}{\frac{Om}{\ell}} \cdot \left(U* - U\right)}{\color{blue}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}}\right)} \]
      Proof
      (/.f64 Om (*.f64 U (*.f64 n l))): 0 points increase in error, 0 points decrease in error
      (Rewrite<= associate-/l/_binary64 (/.f64 (/.f64 Om (*.f64 n l)) U)): 41 points increase in error, 38 points decrease in error
      (Rewrite<= expm1-log1p_binary64 (expm1.f64 (log1p.f64 (/.f64 (/.f64 Om (*.f64 n l)) U)))): 58 points increase in error, 15 points decrease in error
      (Rewrite<= expm1-def_binary64 (-.f64 (exp.f64 (log1p.f64 (/.f64 (/.f64 Om (*.f64 n l)) U))) 1)): 27 points increase in error, 33 points decrease in error
    7. Applied egg-rr45.1

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

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

Alternatives

Alternative 1
Error25.5
Cost43528
\[\begin{array}{l} t_1 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right) + \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t_1 \leq 2 \cdot 10^{-160}:\\ \;\;\;\;\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}\;t_1 \leq 10^{+149}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \end{array} \]
Alternative 2
Error28.8
Cost14536
\[\begin{array}{l} t_1 := n \cdot \left(U \cdot t\right)\\ \mathbf{if}\;\ell \leq -1.45 \cdot 10^{-71}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \mathbf{elif}\;\ell \leq 7 \cdot 10^{-243}:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{\ell}{Om} \cdot \mathsf{fma}\left(\ell, -2, n \cdot \frac{\ell \cdot \left(U* - U\right)}{Om}\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.12 \cdot 10^{+195}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_1 + \frac{\ell \cdot -2 - \left(U - U*\right) \cdot \frac{n}{\frac{Om}{\ell}}}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2} \cdot \left(\ell \cdot \sqrt{\frac{n \cdot \left(U \cdot \left(-2 + \frac{n \cdot \left(U* - U\right)}{Om}\right)\right)}{Om}}\right)\\ \end{array} \]
Alternative 3
Error28.2
Cost13764
\[\begin{array}{l} \mathbf{if}\;U \leq -2.35 \cdot 10^{+96}:\\ \;\;\;\;\sqrt{\left(n \cdot U\right) \cdot \left(2 \cdot \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\ \mathbf{elif}\;U \leq 1.22 \cdot 10^{+169}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \]
Alternative 4
Error29.0
Cost13512
\[\begin{array}{l} \mathbf{if}\;U \leq -2.1 \cdot 10^{+97}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;U \leq 1.34 \cdot 10^{+172}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \end{array} \]
Alternative 5
Error30.5
Cost8520
\[\begin{array}{l} t_1 := \ell \cdot -2 - \left(U - U*\right) \cdot \frac{n}{\frac{Om}{\ell}}\\ t_2 := n \cdot \left(U \cdot t\right)\\ \mathbf{if}\;\ell \leq -1.76 \cdot 10^{+46}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 + \frac{t_1}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \mathbf{elif}\;\ell \leq 10^{-262}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(t_2 + \frac{t_1}{\frac{Om}{n \cdot \left(U \cdot \ell\right)}}\right)}\\ \end{array} \]
Alternative 6
Error29.8
Cost8392
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 + U* \cdot \left(\ell \cdot \frac{n}{Om}\right)}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \mathbf{if}\;\ell \leq -3.5 \cdot 10^{+47}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 1.1 \cdot 10^{+119}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 7
Error30.6
Cost8388
\[\begin{array}{l} \mathbf{if}\;U \leq -9.5 \cdot 10^{+100}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) + \frac{\ell \cdot -2 - \left(U - U*\right) \cdot \frac{n}{\frac{Om}{\ell}}}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \end{array} \]
Alternative 8
Error29.9
Cost8388
\[\begin{array}{l} \mathbf{if}\;U \leq -3.2 \cdot 10^{+105}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot t\right) - \frac{\frac{U - U*}{\frac{Om}{n \cdot \ell}} + 2 \cdot \ell}{\frac{Om}{U \cdot \left(n \cdot \ell\right)}}\right)}\\ \end{array} \]
Alternative 9
Error35.5
Cost8268
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)\right)}\\ \mathbf{if}\;\ell \leq -2.25 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 3.8 \cdot 10^{-14}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 4.9 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{1}{\ell} \cdot \frac{Om}{\left(U \cdot \ell\right) \cdot \left(2 + n \cdot \frac{U* - U}{Om}\right)}}}\\ \end{array} \]
Alternative 10
Error31.7
Cost8136
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.4 \cdot 10^{+105}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(\ell \cdot -2\right) \cdot \left(U \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\ \mathbf{elif}\;\ell \leq 2.6 \cdot 10^{+124}:\\ \;\;\;\;\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{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{n}{\frac{1}{\ell} \cdot \frac{Om}{\left(U \cdot \ell\right) \cdot \left(2 + n \cdot \frac{U* - U}{Om}\right)}}}\\ \end{array} \]
Alternative 11
Error34.3
Cost7888
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \frac{\ell \cdot \ell}{Om} \cdot -2\right)\right)\right)}\\ t_2 := \sqrt{2 \cdot \left(\left(\ell \cdot -2\right) \cdot \left(U \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\ \mathbf{if}\;\ell \leq -6.6 \cdot 10^{+137}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;\ell \leq -1.7 \cdot 10^{-57}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 5 \cdot 10^{-9}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 7.6 \cdot 10^{+135}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \]
Alternative 12
Error35.1
Cost7756
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \ell \cdot \left(\frac{\ell}{Om} \cdot -2\right)\right)\right)\right)}\\ \mathbf{if}\;\ell \leq -1.95 \cdot 10^{-61}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 6.2 \cdot 10^{-14}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;\ell \leq 9 \cdot 10^{+143}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(\ell \cdot -2\right) \cdot \left(U \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\ \end{array} \]
Alternative 13
Error36.5
Cost7496
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(\left(\ell \cdot -2\right) \cdot \left(U \cdot \frac{n}{\frac{Om}{\ell}}\right)\right)}\\ \mathbf{if}\;\ell \leq -4.8 \cdot 10^{+65}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;\ell \leq 9 \cdot 10^{+106}:\\ \;\;\;\;\sqrt{U \cdot \left(n \cdot \left(2 \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 14
Error40.0
Cost7112
\[\begin{array}{l} t_1 := \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{if}\;U \leq -5 \cdot 10^{-73}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;U \leq 6.1 \cdot 10^{+261}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \]
Alternative 15
Error39.8
Cost7112
\[\begin{array}{l} \mathbf{if}\;U \leq -6.6 \cdot 10^{-73}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}\\ \mathbf{elif}\;U \leq 8.2 \cdot 10^{+190}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot t\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{t \cdot \left(2 \cdot \left(n \cdot U\right)\right)}\\ \end{array} \]
Alternative 16
Error40.7
Cost6848
\[\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \]

Error

Reproduce

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