Average Error: 34.2 → 29.8
Time: 20.3s
Precision: binary64
\[\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}\;U \leq -3.1921428213769144 \cdot 10^{-104}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + \left(\left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right)\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\left(U* - U\right) \cdot \left(\left(n \cdot {\left(\sqrt[3]{\frac{\ell}{Om}} \cdot \sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\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}\;U \leq -3.1921428213769144 \cdot 10^{-104}:\\
\;\;\;\;\sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + \left(\left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right)\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\left(U* - U\right) \cdot \left(\left(n \cdot {\left(\sqrt[3]{\frac{\ell}{Om}} \cdot \sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\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
 (if (<= U -3.1921428213769144e-104)
   (sqrt
    (*
     2.0
     (*
      (* U n)
      (+
       t
       (-
        (*
         (* (pow (/ l Om) (/ 2.0 2.0)) (* n (pow (/ l Om) (/ 2.0 2.0))))
         (- U* U))
        (* 2.0 (* l (/ l Om))))))))
   (sqrt
    (*
     2.0
     (*
      n
      (*
       U
       (+
        t
        (-
         (*
          (- U* U)
          (*
           (* n (pow (* (cbrt (/ l Om)) (cbrt (/ l Om))) 2.0))
           (pow (cbrt (/ l Om)) 2.0)))
         (* 2.0 (* l (/ l Om)))))))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return ((double) sqrt(((double) (((double) (((double) (2.0 * n)) * U)) * ((double) (((double) (t - ((double) (2.0 * (((double) (l * l)) / Om))))) - ((double) (((double) (n * ((double) pow((l / Om), 2.0)))) * ((double) (U - U_42_))))))))));
}
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double VAR;
	if ((U <= -3.1921428213769144e-104)) {
		VAR = ((double) sqrt(((double) (2.0 * ((double) (((double) (U * n)) * ((double) (t + ((double) (((double) (((double) (((double) pow((l / Om), (2.0 / 2.0))) * ((double) (n * ((double) pow((l / Om), (2.0 / 2.0))))))) * ((double) (U_42_ - U)))) - ((double) (2.0 * ((double) (l * (l / Om)))))))))))))));
	} else {
		VAR = ((double) sqrt(((double) (2.0 * ((double) (n * ((double) (U * ((double) (t + ((double) (((double) (((double) (U_42_ - U)) * ((double) (((double) (n * ((double) pow(((double) (((double) cbrt((l / Om))) * ((double) cbrt((l / Om))))), 2.0)))) * ((double) pow(((double) cbrt((l / Om))), 2.0)))))) - ((double) (2.0 * ((double) (l * (l / Om)))))))))))))))));
	}
	return VAR;
}

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 U < -3.1921428213769144e-104

    1. Initial program 30.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. Simplified32.0

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\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) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}\]
    7. Applied associate-*r*30.5

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\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) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}\]
    8. Using strategy rm
    9. Applied associate-*r*26.3

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

    if -3.1921428213769144e-104 < U

    1. Initial program 35.8

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

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

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\color{blue}{\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)} - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt32.2

      \[\leadsto \sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\left(n \cdot {\color{blue}{\left(\left(\sqrt[3]{\frac{\ell}{Om}} \cdot \sqrt[3]{\frac{\ell}{Om}}\right) \cdot \sqrt[3]{\frac{\ell}{Om}}\right)}}^{2}\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}\]
    7. Applied unpow-prod-down32.2

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U \leq -3.1921428213769144 \cdot 10^{-104}:\\ \;\;\;\;\sqrt{2 \cdot \left(\left(U \cdot n\right) \cdot \left(t + \left(\left({\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)} \cdot \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{\left(\frac{2}{2}\right)}\right)\right) \cdot \left(U* - U\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot \left(n \cdot \left(U \cdot \left(t + \left(\left(U* - U\right) \cdot \left(\left(n \cdot {\left(\sqrt[3]{\frac{\ell}{Om}} \cdot \sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) \cdot {\left(\sqrt[3]{\frac{\ell}{Om}}\right)}^{2}\right) - 2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right)\right)\right)\right)\right)}\\ \end{array}\]

Reproduce

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