Average Error: 34.9 → 30.5
Time: 36.8s
Precision: 64
\[\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} \mathbf{if}\;t \le 3.99260181789619076 \cdot 10^{-290} \lor \neg \left(t \le 1.04454319914815938 \cdot 10^{-227} \lor \neg \left(t \le 1.90597108339397325 \cdot 10^{62}\right)\right):\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot \left(U - U*\right)}\\ \end{array}\]
\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}
\mathbf{if}\;t \le 3.99260181789619076 \cdot 10^{-290} \lor \neg \left(t \le 1.04454319914815938 \cdot 10^{-227} \lor \neg \left(t \le 1.90597108339397325 \cdot 10^{62}\right)\right):\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\

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

\end{array}
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 temp;
	if (((t <= 3.992601817896191e-290) || !((t <= 1.0445431991481594e-227) || !(t <= 1.9059710833939732e+62)))) {
		temp = sqrt(((2.0 * n) * (U * ((t - (2.0 * (l / (Om / l)))) - ((n * pow((l / Om), 2.0)) * (U - U_42_))))));
	} else {
		temp = (sqrt(((2.0 * n) * U)) * sqrt(((t - (2.0 * (l / (Om / l)))) - (((n * pow((l / Om), (2.0 / 2.0))) * pow((l / Om), (2.0 / 2.0))) * (U - U_42_)))));
	}
	return temp;
}

Error

Bits error versus n

Bits error versus U

Bits error versus t

Bits error versus l

Bits error versus Om

Bits error versus U*

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Split input into 2 regimes
  2. if t < 3.992601817896191e-290 or 1.0445431991481594e-227 < t < 1.9059710833939732e+62

    1. Initial program 34.5

      \[\sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    2. Using strategy rm
    3. Applied associate-/l*32.1

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    4. Using strategy rm
    5. Applied associate-*l*31.8

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

    if 3.992601817896191e-290 < t < 1.0445431991481594e-227 or 1.9059710833939732e+62 < t

    1. Initial program 35.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. Using strategy rm
    3. Applied associate-/l*33.2

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \color{blue}{\frac{\ell}{\frac{Om}{\ell}}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)}\]
    4. Using strategy rm
    5. Applied sqr-pow33.2

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot \color{blue}{\left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right)}\right) \cdot \left(U - U*\right)\right)}\]
    6. Applied associate-*r*32.5

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \color{blue}{\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right)} \cdot \left(U - U*\right)\right)}\]
    7. Using strategy rm
    8. Applied sqrt-prod26.7

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \le 3.99260181789619076 \cdot 10^{-290} \lor \neg \left(t \le 1.04454319914815938 \cdot 10^{-227} \lor \neg \left(t \le 1.90597108339397325 \cdot 10^{62}\right)\right):\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot \left(U \cdot \left(\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{\left(t - 2 \cdot \frac{\ell}{\frac{Om}{\ell}}\right) - \left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right) \cdot \left(U - U*\right)}\\ \end{array}\]

Reproduce

herbie shell --seed 2020049 +o rules:numerics
(FPCore (n U t l Om U*)
  :name "Toniolo and Linder, Equation (13)"
  :precision binary64
  (sqrt (* (* (* 2 n) U) (- (- t (* 2 (/ (* l l) Om))) (* (* n (pow (/ l Om) 2)) (- U U*))))))