Toniolo and Linder, Equation (13)

Percentage Accurate: 50.1% → 62.8%
Time: 25.0s
Alternatives: 19
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ \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)} \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*))))))
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_)))));
}
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
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_)))));
}
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_)))))
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 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
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]
\begin{array}{l}

\\
\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)}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 19 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 50.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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)} \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*))))))
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_)))));
}
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
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_)))));
}
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_)))))
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 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
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]
\begin{array}{l}

\\
\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)}
\end{array}

Alternative 1: 62.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\ t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \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}^{2}}{Om}, t\_1 \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* n (pow (/ l Om) 2.0)))
        (t_2
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+ (- t (* 2.0 (/ (* l l) Om))) (* t_1 (- U* U)))))))
   (if (<= t_2 0.0)
     (*
      (sqrt (* 2.0 n))
      (sqrt (* U (- t (fma 2.0 (/ (pow l 2.0) Om) (* t_1 (- U U*)))))))
     (if (<= t_2 INFINITY)
       (sqrt
        (*
         (* 2.0 (* n U))
         (fma
          n
          (* (/ l Om) (* (/ l Om) (- U* U)))
          (fma (* l -2.0) (/ l Om) t))))
       (sqrt
        (*
         -2.0
         (/ (* U (* (pow l 2.0) (* n (+ 2.0 (/ (* n (- U U*)) Om))))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = n * pow((l / Om), 2.0);
	double t_2 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + (t_1 * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * (t - fma(2.0, (pow(l, 2.0) / Om), (t_1 * (U - U_42_))))));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * fma(n, ((l / Om) * ((l / Om) * (U_42_ - U))), fma((l * -2.0), (l / Om), t))));
	} else {
		tmp = sqrt((-2.0 * ((U * (pow(l, 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(n * (Float64(l / Om) ^ 2.0))
	t_2 = sqrt(Float64(Float64(Float64(2.0 * n) * U) * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + Float64(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 ^ 2.0) / Om), Float64(t_1 * Float64(U - U_42_)))))));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * fma(n, Float64(Float64(l / Om) * Float64(Float64(l / Om) * Float64(U_42_ - U))), fma(Float64(l * -2.0), Float64(l / Om), t))));
	else
		tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))))) / Om)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = 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[(t$95$1 * 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[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] + N[(t$95$1 * N[(U - U$42$), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * -2.0), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\\
t_2 := \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1 \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}^{2}}{Om}, t\_1 \cdot \left(U - U*\right)\right)\right)}\\

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

    1. Initial program 8.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. Add Preprocessing
    3. Step-by-step derivation
      1. pow1/28.9%

        \[\leadsto \color{blue}{{\left(\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)\right)}^{0.5}} \]
      2. associate-*l*31.3%

        \[\leadsto {\color{blue}{\left(\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)\right)}}^{0.5} \]
      3. unpow-prod-down45.1%

        \[\leadsto \color{blue}{{\left(2 \cdot n\right)}^{0.5} \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)}^{0.5}} \]
      4. pow1/245.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n}} \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)}^{0.5} \]
    4. Applied egg-rr45.1%

      \[\leadsto \color{blue}{\sqrt{2 \cdot n} \cdot {\left(U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, \left(\left(U - U*\right) \cdot n\right) \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right)\right)\right)}^{0.5}} \]
    5. Step-by-step derivation
      1. unpow1/245.1%

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

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

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

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

    1. Initial program 73.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. Simplified77.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutative77.4%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      3. associate-*r*78.9%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \color{blue}{\left(\left(U* - U\right) \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    5. Applied egg-rr78.9%

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 0.0%

      \[\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. Simplified4.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 23.3%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg23.3%

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*23.3%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 31.7%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in t around 0 41.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot \left(t - \mathsf{fma}\left(2, \frac{{\ell}^{2}}{Om}, \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)}\\ \mathbf{elif}\;\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)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 61.7% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \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{if}\;t\_1 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1
         (sqrt
          (*
           (* (* 2.0 n) U)
           (+
            (- t (* 2.0 (/ (* l l) Om)))
            (* (* n (pow (/ l Om) 2.0)) (- U* U)))))))
   (if (<= t_1 0.0)
     (* (sqrt (* 2.0 n)) (sqrt (* U t)))
     (if (<= t_1 INFINITY)
       (sqrt
        (*
         (* 2.0 (* n U))
         (fma
          n
          (* (/ l Om) (* (/ l Om) (- U* U)))
          (fma (* l -2.0) (/ l Om) t))))
       (sqrt
        (*
         -2.0
         (/ (* U (* (pow l 2.0) (* n (+ 2.0 (/ (* n (- U U*)) Om))))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = sqrt((((2.0 * n) * U) * ((t - (2.0 * ((l * l) / Om))) + ((n * pow((l / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_1 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = sqrt(((2.0 * (n * U)) * fma(n, ((l / Om) * ((l / Om) * (U_42_ - U))), fma((l * -2.0), (l / Om), t))));
	} else {
		tmp = sqrt((-2.0 * ((U * (pow(l, 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)));
	}
	return tmp;
}
function code(n, U, t, l, Om, U_42_)
	t_1 = 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_42_ - U)))))
	tmp = 0.0
	if (t_1 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	elseif (t_1 <= Inf)
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * fma(n, Float64(Float64(l / Om) * Float64(Float64(l / Om) * Float64(U_42_ - U))), fma(Float64(l * -2.0), Float64(l / Om), t))));
	else
		tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))))) / Om)));
	end
	return tmp
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = 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$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, Infinity], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(n * N[(N[(l / Om), $MachinePrecision] * N[(N[(l / Om), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(l * -2.0), $MachinePrecision] * N[(l / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \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{if}\;t\_1 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

    1. Initial program 8.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. Simplified8.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 26.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. *-commutative26.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    6. Applied egg-rr26.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    7. Step-by-step derivation
      1. associate-*l*26.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    8. Simplified26.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    9. Step-by-step derivation
      1. pow1/226.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(t \cdot U\right)\right)\right)}^{0.5}} \]
      2. associate-*r*27.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(t \cdot U\right)\right)}}^{0.5} \]
      3. unpow-prod-down35.1%

        \[\leadsto \color{blue}{{\left(2 \cdot n\right)}^{0.5} \cdot {\left(t \cdot U\right)}^{0.5}} \]
      4. pow1/235.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      5. *-commutative35.1%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      6. pow1/235.1%

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{t \cdot U}} \]
      7. *-commutative35.1%

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\color{blue}{U \cdot t}} \]
    10. Applied egg-rr35.1%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

    1. Initial program 73.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. Simplified77.4%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutative77.4%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \left(U* - U\right) \cdot \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      3. associate-*r*78.9%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \color{blue}{\left(\left(U* - U\right) \cdot \frac{\ell}{Om}\right) \cdot \frac{\ell}{Om}}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    5. Applied egg-rr78.9%

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 0.0%

      \[\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. Simplified4.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 23.3%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg23.3%

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*23.3%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 31.7%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in t around 0 41.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\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)} \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;\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)} \leq \infty:\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, \frac{\ell}{Om} \cdot \left(\frac{\ell}{Om} \cdot \left(U* - U\right)\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)}{Om}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 62.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\ t_2 := \left(2 \cdot n\right) \cdot U\\ t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)}\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\sqrt{t\_2 \cdot \left(t\_1 - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) - t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 + \frac{n \cdot \left(U - U*\right)}{Om}\right)\right)\right)}{Om}}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* (* n (pow (/ l Om) 2.0)) (- U* U)))
        (t_2 (* (* 2.0 n) U))
        (t_3 (sqrt (* t_2 (+ (- t (* 2.0 (/ (* l l) Om))) t_1)))))
   (if (<= t_3 0.0)
     (* (sqrt (* 2.0 n)) (sqrt (* U t)))
     (if (<= t_3 INFINITY)
       (sqrt (* t_2 (- t_1 (- (* 2.0 (* l (/ l Om))) t))))
       (sqrt
        (*
         -2.0
         (/ (* U (* (pow l 2.0) (* n (+ 2.0 (/ (* n (- U U*)) Om))))) Om)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (n * pow((l / Om), 2.0)) * (U_42_ - U);
	double t_2 = (2.0 * n) * U;
	double t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = sqrt((t_2 * (t_1 - ((2.0 * (l * (l / Om))) - t))));
	} else {
		tmp = sqrt((-2.0 * ((U * (pow(l, 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)));
	}
	return tmp;
}
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = (n * Math.pow((l / Om), 2.0)) * (U_42_ - U);
	double t_2 = (2.0 * n) * U;
	double t_3 = Math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = Math.sqrt((t_2 * (t_1 - ((2.0 * (l * (l / Om))) - t))));
	} else {
		tmp = Math.sqrt((-2.0 * ((U * (Math.pow(l, 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	t_1 = (n * math.pow((l / Om), 2.0)) * (U_42_ - U)
	t_2 = (2.0 * n) * U
	t_3 = math.sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)))
	tmp = 0
	if t_3 <= 0.0:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t))
	elif t_3 <= math.inf:
		tmp = math.sqrt((t_2 * (t_1 - ((2.0 * (l * (l / Om))) - t))))
	else:
		tmp = math.sqrt((-2.0 * ((U * (math.pow(l, 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)))
	return tmp
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(Float64(n * (Float64(l / Om) ^ 2.0)) * Float64(U_42_ - U))
	t_2 = Float64(Float64(2.0 * n) * U)
	t_3 = sqrt(Float64(t_2 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l * l) / Om))) + t_1)))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	elseif (t_3 <= Inf)
		tmp = sqrt(Float64(t_2 * Float64(t_1 - Float64(Float64(2.0 * Float64(l * Float64(l / Om))) - t))));
	else
		tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(2.0 + Float64(Float64(n * Float64(U - U_42_)) / Om))))) / Om)));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = (n * ((l / Om) ^ 2.0)) * (U_42_ - U);
	t_2 = (2.0 * n) * U;
	t_3 = sqrt((t_2 * ((t - (2.0 * ((l * l) / Om))) + t_1)));
	tmp = 0.0;
	if (t_3 <= 0.0)
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	elseif (t_3 <= Inf)
		tmp = sqrt((t_2 * (t_1 - ((2.0 * (l * (l / Om))) - t))));
	else
		tmp = sqrt((-2.0 * ((U * ((l ^ 2.0) * (n * (2.0 + ((n * (U - U_42_)) / Om))))) / Om)));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(N[(n * N[Power[N[(l / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]}, Block[{t$95$3 = N[Sqrt[N[(t$95$2 * N[(N[(t - N[(2.0 * N[(N[(l * l), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[Sqrt[N[(t$95$2 * N[(t$95$1 - N[(N[(2.0 * N[(l * N[(l / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(-2.0 * N[(N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(2.0 + N[(N[(n * N[(U - U$42$), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\\
t_2 := \left(2 \cdot n\right) \cdot U\\
t_3 := \sqrt{t\_2 \cdot \left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + t\_1\right)}\\
\mathbf{if}\;t\_3 \leq 0:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\sqrt{t\_2 \cdot \left(t\_1 - \left(2 \cdot \left(\ell \cdot \frac{\ell}{Om}\right) - t\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < 0.0

    1. Initial program 8.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. Simplified8.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 26.7%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. *-commutative26.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    6. Applied egg-rr26.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    7. Step-by-step derivation
      1. associate-*l*26.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    8. Simplified26.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    9. Step-by-step derivation
      1. pow1/226.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(t \cdot U\right)\right)\right)}^{0.5}} \]
      2. associate-*r*27.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(t \cdot U\right)\right)}}^{0.5} \]
      3. unpow-prod-down35.1%

        \[\leadsto \color{blue}{{\left(2 \cdot n\right)}^{0.5} \cdot {\left(t \cdot U\right)}^{0.5}} \]
      4. pow1/235.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      5. *-commutative35.1%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      6. pow1/235.1%

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{t \cdot U}} \]
      7. *-commutative35.1%

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\color{blue}{U \cdot t}} \]
    10. Applied egg-rr35.1%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]

    if 0.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*))))) < +inf.0

    1. Initial program 73.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. Add Preprocessing
    3. Step-by-step derivation
      1. associate-/l*78.5%

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\left(t - 2 \cdot \left(\ell \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right) - \left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      3. un-div-inv78.5%

        \[\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. Applied egg-rr78.5%

      \[\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)} \]
    5. Step-by-step derivation
      1. associate-/r/78.5%

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

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

    if +inf.0 < (sqrt.f64 (*.f64 (*.f64 (*.f64 #s(literal 2 binary64) n) U) (-.f64 (-.f64 t (*.f64 #s(literal 2 binary64) (/.f64 (*.f64 l l) Om))) (*.f64 (*.f64 n (pow.f64 (/.f64 l Om) #s(literal 2 binary64))) (-.f64 U U*)))))

    1. Initial program 0.0%

      \[\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. Simplified4.7%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 23.3%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg23.3%

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg23.3%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*23.3%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 31.7%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in t around 0 41.8%

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

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

Alternative 4: 46.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := n \cdot {\ell}^{2}\\ \mathbf{if}\;t \leq -2.1 \cdot 10^{-263}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-178}:\\ \;\;\;\;\sqrt{\frac{-2 \cdot \left(U \cdot \left(t\_1 \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}{Om}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{t\_1}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (let* ((t_1 (* n (pow l 2.0))))
   (if (<= t -2.1e-263)
     (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
     (if (<= t 4e-178)
       (sqrt (/ (* -2.0 (* U (* t_1 (- 2.0 (* U* (/ n Om)))))) Om))
       (if (<= t 3.5e+150)
         (sqrt (* U (+ (* -4.0 (/ t_1 Om)) (* 2.0 (* n t)))))
         (* (sqrt (* (* 2.0 n) U)) (sqrt t)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = n * pow(l, 2.0);
	double tmp;
	if (t <= -2.1e-263) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
	} else if (t <= 4e-178) {
		tmp = sqrt(((-2.0 * (U * (t_1 * (2.0 - (U_42_ * (n / Om)))))) / Om));
	} else if (t <= 3.5e+150) {
		tmp = sqrt((U * ((-4.0 * (t_1 / Om)) + (2.0 * (n * t)))));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: t_1
    real(8) :: tmp
    t_1 = n * (l ** 2.0d0)
    if (t <= (-2.1d-263)) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
    else if (t <= 4d-178) then
        tmp = sqrt((((-2.0d0) * (u * (t_1 * (2.0d0 - (u_42 * (n / om)))))) / om))
    else if (t <= 3.5d+150) then
        tmp = sqrt((u * (((-4.0d0) * (t_1 / om)) + (2.0d0 * (n * t)))))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double t_1 = n * Math.pow(l, 2.0);
	double tmp;
	if (t <= -2.1e-263) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
	} else if (t <= 4e-178) {
		tmp = Math.sqrt(((-2.0 * (U * (t_1 * (2.0 - (U_42_ * (n / Om)))))) / Om));
	} else if (t <= 3.5e+150) {
		tmp = Math.sqrt((U * ((-4.0 * (t_1 / Om)) + (2.0 * (n * t)))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	t_1 = n * math.pow(l, 2.0)
	tmp = 0
	if t <= -2.1e-263:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om)))))))
	elif t <= 4e-178:
		tmp = math.sqrt(((-2.0 * (U * (t_1 * (2.0 - (U_42_ * (n / Om)))))) / Om))
	elif t <= 3.5e+150:
		tmp = math.sqrt((U * ((-4.0 * (t_1 / Om)) + (2.0 * (n * t)))))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	t_1 = Float64(n * (l ^ 2.0))
	tmp = 0.0
	if (t <= -2.1e-263)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))));
	elseif (t <= 4e-178)
		tmp = sqrt(Float64(Float64(-2.0 * Float64(U * Float64(t_1 * Float64(2.0 - Float64(U_42_ * Float64(n / Om)))))) / Om));
	elseif (t <= 3.5e+150)
		tmp = sqrt(Float64(U * Float64(Float64(-4.0 * Float64(t_1 / Om)) + Float64(2.0 * Float64(n * t)))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	t_1 = n * (l ^ 2.0);
	tmp = 0.0;
	if (t <= -2.1e-263)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om)))))));
	elseif (t <= 4e-178)
		tmp = sqrt(((-2.0 * (U * (t_1 * (2.0 - (U_42_ * (n / Om)))))) / Om));
	elseif (t <= 3.5e+150)
		tmp = sqrt((U * ((-4.0 * (t_1 / Om)) + (2.0 * (n * t)))));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := Block[{t$95$1 = N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e-263], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 4e-178], N[Sqrt[N[(N[(-2.0 * N[(U * N[(t$95$1 * N[(2.0 - N[(U$42$ * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 3.5e+150], N[Sqrt[N[(U * N[(N[(-4.0 * N[(t$95$1 / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := n \cdot {\ell}^{2}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{-263}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t \leq 4 \cdot 10^{-178}:\\
\;\;\;\;\sqrt{\frac{-2 \cdot \left(U \cdot \left(t\_1 \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}{Om}}\\

\mathbf{elif}\;t \leq 3.5 \cdot 10^{+150}:\\
\;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{t\_1}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.10000000000000003e-263

    1. Initial program 51.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. Add Preprocessing
    3. Taylor expanded in n around 0 49.5%

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

    if -2.10000000000000003e-263 < t < 3.9999999999999998e-178

    1. Initial program 43.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)} \]
    2. Simplified46.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 39.8%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg39.8%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} + -1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      4. mul-1-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*45.4%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 52.5%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in U around 0 52.5%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{U* \cdot n}{Om}\right)}{Om}}\right)} \]
    9. Step-by-step derivation
      1. associate-/l*52.5%

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

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{{\ell}^{2} \cdot \frac{2 - U* \cdot \frac{n}{Om}}{Om}}\right)} \]
    11. Taylor expanded in t around 0 47.3%

      \[\leadsto \sqrt{\color{blue}{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 - \frac{U* \cdot n}{Om}\right)\right)\right)}{Om}}} \]
    12. Step-by-step derivation
      1. associate-*r/47.3%

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

        \[\leadsto \sqrt{\frac{-2 \cdot \left(U \cdot \color{blue}{\left(\left({\ell}^{2} \cdot n\right) \cdot \left(2 - \frac{U* \cdot n}{Om}\right)\right)}\right)}{Om}} \]
      3. associate-*r/50.0%

        \[\leadsto \sqrt{\frac{-2 \cdot \left(U \cdot \left(\left({\ell}^{2} \cdot n\right) \cdot \left(2 - \color{blue}{U* \cdot \frac{n}{Om}}\right)\right)\right)}{Om}} \]
    13. Simplified50.0%

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

    if 3.9999999999999998e-178 < t < 3.49999999999999984e150

    1. Initial program 59.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. Simplified61.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around inf 50.9%

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

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

    if 3.49999999999999984e150 < t

    1. Initial program 60.1%

      \[\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. Simplified67.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 62.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*62.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative62.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr62.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/265.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*65.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval65.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down78.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval78.5%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/276.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*76.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative76.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval76.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/276.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr76.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.1 \cdot 10^{-263}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{-178}:\\ \;\;\;\;\sqrt{\frac{-2 \cdot \left(U \cdot \left(\left(n \cdot {\ell}^{2}\right) \cdot \left(2 - U* \cdot \frac{n}{Om}\right)\right)\right)}{Om}}\\ \mathbf{elif}\;t \leq 3.5 \cdot 10^{+150}:\\ \;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{n \cdot {\ell}^{2}}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 46.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{-264}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-178}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 - \frac{n \cdot U*}{Om}\right)\right)\right)}{Om}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{n \cdot {\ell}^{2}}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -6.4e-264)
   (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
   (if (<= t 8e-178)
     (sqrt (* -2.0 (/ (* U (* (pow l 2.0) (* n (- 2.0 (/ (* n U*) Om))))) Om)))
     (if (<= t 7e+151)
       (sqrt (* U (+ (* -4.0 (/ (* n (pow l 2.0)) Om)) (* 2.0 (* n t)))))
       (* (sqrt (* (* 2.0 n) U)) (sqrt t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -6.4e-264) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
	} else if (t <= 8e-178) {
		tmp = sqrt((-2.0 * ((U * (pow(l, 2.0) * (n * (2.0 - ((n * U_42_) / Om))))) / Om)));
	} else if (t <= 7e+151) {
		tmp = sqrt((U * ((-4.0 * ((n * pow(l, 2.0)) / Om)) + (2.0 * (n * t)))));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= (-6.4d-264)) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
    else if (t <= 8d-178) then
        tmp = sqrt(((-2.0d0) * ((u * ((l ** 2.0d0) * (n * (2.0d0 - ((n * u_42) / om))))) / om)))
    else if (t <= 7d+151) then
        tmp = sqrt((u * (((-4.0d0) * ((n * (l ** 2.0d0)) / om)) + (2.0d0 * (n * t)))))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -6.4e-264) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
	} else if (t <= 8e-178) {
		tmp = Math.sqrt((-2.0 * ((U * (Math.pow(l, 2.0) * (n * (2.0 - ((n * U_42_) / Om))))) / Om)));
	} else if (t <= 7e+151) {
		tmp = Math.sqrt((U * ((-4.0 * ((n * Math.pow(l, 2.0)) / Om)) + (2.0 * (n * t)))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -6.4e-264:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om)))))))
	elif t <= 8e-178:
		tmp = math.sqrt((-2.0 * ((U * (math.pow(l, 2.0) * (n * (2.0 - ((n * U_42_) / Om))))) / Om)))
	elif t <= 7e+151:
		tmp = math.sqrt((U * ((-4.0 * ((n * math.pow(l, 2.0)) / Om)) + (2.0 * (n * t)))))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -6.4e-264)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))));
	elseif (t <= 8e-178)
		tmp = sqrt(Float64(-2.0 * Float64(Float64(U * Float64((l ^ 2.0) * Float64(n * Float64(2.0 - Float64(Float64(n * U_42_) / Om))))) / Om)));
	elseif (t <= 7e+151)
		tmp = sqrt(Float64(U * Float64(Float64(-4.0 * Float64(Float64(n * (l ^ 2.0)) / Om)) + Float64(2.0 * Float64(n * t)))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -6.4e-264)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om)))))));
	elseif (t <= 8e-178)
		tmp = sqrt((-2.0 * ((U * ((l ^ 2.0) * (n * (2.0 - ((n * U_42_) / Om))))) / Om)));
	elseif (t <= 7e+151)
		tmp = sqrt((U * ((-4.0 * ((n * (l ^ 2.0)) / Om)) + (2.0 * (n * t)))));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -6.4e-264], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 8e-178], N[Sqrt[N[(-2.0 * N[(N[(U * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n * N[(2.0 - N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t, 7e+151], N[Sqrt[N[(U * N[(N[(-4.0 * N[(N[(n * N[Power[l, 2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] + N[(2.0 * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.4 \cdot 10^{-264}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\

\mathbf{elif}\;t \leq 8 \cdot 10^{-178}:\\
\;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 - \frac{n \cdot U*}{Om}\right)\right)\right)}{Om}}\\

\mathbf{elif}\;t \leq 7 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{n \cdot {\ell}^{2}}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.3999999999999999e-264

    1. Initial program 51.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. Add Preprocessing
    3. Taylor expanded in n around 0 49.5%

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

    if -6.3999999999999999e-264 < t < 7.9999999999999996e-178

    1. Initial program 43.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)} \]
    2. Simplified46.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 39.8%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg39.8%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} + -1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      4. mul-1-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg39.8%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*45.4%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 52.5%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in U around 0 52.5%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{U* \cdot n}{Om}\right)}{Om}}\right)} \]
    9. Step-by-step derivation
      1. associate-/l*52.5%

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

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{{\ell}^{2} \cdot \frac{2 - U* \cdot \frac{n}{Om}}{Om}}\right)} \]
    11. Taylor expanded in t around 0 47.3%

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

    if 7.9999999999999996e-178 < t < 7.0000000000000006e151

    1. Initial program 59.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. Simplified61.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around inf 50.9%

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

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

    if 7.0000000000000006e151 < t

    1. Initial program 60.1%

      \[\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. Simplified67.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 62.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*62.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative62.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr62.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/265.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*65.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval65.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down78.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval78.5%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/276.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*76.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative76.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval76.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/276.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr76.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification54.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{-264}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-178}:\\ \;\;\;\;\sqrt{-2 \cdot \frac{U \cdot \left({\ell}^{2} \cdot \left(n \cdot \left(2 - \frac{n \cdot U*}{Om}\right)\right)\right)}{Om}}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{U \cdot \left(-4 \cdot \frac{n \cdot {\ell}^{2}}{Om} + 2 \cdot \left(n \cdot t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 51.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;U* \leq -850 \lor \neg \left(U* \leq 7400000\right):\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (or (<= U* -850.0) (not (<= U* 7400000.0)))
   (sqrt (* (* 2.0 (* n U)) (+ t (/ (* U* (* (pow l 2.0) (/ n Om))) Om))))
   (sqrt (* U (* (* 2.0 n) (+ t (* (/ (pow l 2.0) Om) -2.0)))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if ((U_42_ <= -850.0) || !(U_42_ <= 7400000.0)) {
		tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ * (pow(l, 2.0) * (n / Om))) / Om))));
	} else {
		tmp = sqrt((U * ((2.0 * n) * (t + ((pow(l, 2.0) / 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
    real(8) :: tmp
    if ((u_42 <= (-850.0d0)) .or. (.not. (u_42 <= 7400000.0d0))) then
        tmp = sqrt(((2.0d0 * (n * u)) * (t + ((u_42 * ((l ** 2.0d0) * (n / om))) / om))))
    else
        tmp = sqrt((u * ((2.0d0 * n) * (t + (((l ** 2.0d0) / 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_) {
	double tmp;
	if ((U_42_ <= -850.0) || !(U_42_ <= 7400000.0)) {
		tmp = Math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ * (Math.pow(l, 2.0) * (n / Om))) / Om))));
	} else {
		tmp = Math.sqrt((U * ((2.0 * n) * (t + ((Math.pow(l, 2.0) / Om) * -2.0)))));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if (U_42_ <= -850.0) or not (U_42_ <= 7400000.0):
		tmp = math.sqrt(((2.0 * (n * U)) * (t + ((U_42_ * (math.pow(l, 2.0) * (n / Om))) / Om))))
	else:
		tmp = math.sqrt((U * ((2.0 * n) * (t + ((math.pow(l, 2.0) / Om) * -2.0)))))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if ((U_42_ <= -850.0) || !(U_42_ <= 7400000.0))
		tmp = sqrt(Float64(Float64(2.0 * Float64(n * U)) * Float64(t + Float64(Float64(U_42_ * Float64((l ^ 2.0) * Float64(n / Om))) / Om))));
	else
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0)))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if ((U_42_ <= -850.0) || ~((U_42_ <= 7400000.0)))
		tmp = sqrt(((2.0 * (n * U)) * (t + ((U_42_ * ((l ^ 2.0) * (n / Om))) / Om))));
	else
		tmp = sqrt((U * ((2.0 * n) * (t + (((l ^ 2.0) / Om) * -2.0)))));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[Or[LessEqual[U$42$, -850.0], N[Not[LessEqual[U$42$, 7400000.0]], $MachinePrecision]], N[Sqrt[N[(N[(2.0 * N[(n * U), $MachinePrecision]), $MachinePrecision] * N[(t + N[(N[(U$42$ * N[(N[Power[l, 2.0], $MachinePrecision] * N[(n / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;U* \leq -850 \lor \neg \left(U* \leq 7400000\right):\\
\;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)}{Om}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if U* < -850 or 7.4e6 < U*

    1. Initial program 52.4%

      \[\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. Simplified54.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 46.4%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg46.4%

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

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

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

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*48.9%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 51.2%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{-1 \cdot \frac{U* \cdot \left({\ell}^{2} \cdot n\right)}{Om}}}{Om}\right)} \]
    9. Step-by-step derivation
      1. mul-1-neg52.4%

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

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{-\color{blue}{U* \cdot \frac{{\ell}^{2} \cdot n}{Om}}}{Om}\right)} \]
      3. associate-/l*55.0%

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

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

    if -850 < U* < 7.4e6

    1. Initial program 55.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. Simplified61.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutative61.2%

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

        \[\leadsto \sqrt{\mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot \color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. associate-*r*64.3%

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

        \[\leadsto \sqrt{\left(\mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\color{blue}{\ell \cdot -2}, \frac{\ell}{Om}, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U} \]
    5. Applied egg-rr64.3%

      \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U}} \]
    6. Taylor expanded in n around 0 60.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;U* \leq -850 \lor \neg \left(U* \leq 7400000\right):\\ \;\;\;\;\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \frac{U* \cdot \left({\ell}^{2} \cdot \frac{n}{Om}\right)}{Om}\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 53.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.95 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t 1.95e+151)
   (sqrt
    (* 2.0 (* U (* n (+ t (/ (* (pow l 2.0) (- (/ (* n U*) Om) 2.0)) Om))))))
   (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 1.95e+151) {
		tmp = sqrt((2.0 * (U * (n * (t + ((pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= 1.95d+151) then
        tmp = sqrt((2.0d0 * (u * (n * (t + (((l ** 2.0d0) * (((n * u_42) / om) - 2.0d0)) / om))))))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 1.95e+151) {
		tmp = Math.sqrt((2.0 * (U * (n * (t + ((Math.pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= 1.95e+151:
		tmp = math.sqrt((2.0 * (U * (n * (t + ((math.pow(l, 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= 1.95e+151)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t + Float64(Float64((l ^ 2.0) * Float64(Float64(Float64(n * U_42_) / Om) - 2.0)) / Om))))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= 1.95e+151)
		tmp = sqrt((2.0 * (U * (n * (t + (((l ^ 2.0) * (((n * U_42_) / Om) - 2.0)) / Om))))));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.95e+151], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] * N[(N[(N[(n * U$42$), $MachinePrecision] / Om), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.95 \cdot 10^{+151}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.94999999999999988e151

    1. Initial program 52.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. Simplified55.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in Om around -inf 49.6%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t + -1 \cdot \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
    5. Step-by-step derivation
      1. mul-1-neg49.6%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t + \color{blue}{\left(-\frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}\right)} \]
      2. unsub-neg49.6%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{-1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om} + 2 \cdot {\ell}^{2}}{Om}\right)}} \]
      3. +-commutative49.6%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} + -1 \cdot \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      4. mul-1-neg49.6%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{2 \cdot {\ell}^{2} + \color{blue}{\left(-\frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}\right)}}{Om}\right)} \]
      5. unsub-neg49.6%

        \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \frac{\color{blue}{2 \cdot {\ell}^{2} - \frac{{\ell}^{2} \cdot \left(n \cdot \left(U* - U\right)\right)}{Om}}}{Om}\right)} \]
      6. associate-/l*51.4%

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

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \color{blue}{\left(t - \frac{2 \cdot {\ell}^{2} - {\ell}^{2} \cdot \frac{n \cdot \left(U* - U\right)}{Om}}{Om}\right)}} \]
    7. Taylor expanded in l around 0 53.1%

      \[\leadsto \sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \left(t - \color{blue}{\frac{{\ell}^{2} \cdot \left(2 - \frac{n \cdot \left(U* - U\right)}{Om}\right)}{Om}}\right)} \]
    8. Taylor expanded in U around 0 56.4%

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

    if 1.94999999999999988e151 < t

    1. Initial program 60.1%

      \[\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. Simplified67.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 62.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*62.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative62.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr62.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/265.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*65.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval65.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down78.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval78.5%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/276.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*76.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative76.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval76.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/276.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr76.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification59.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.95 \cdot 10^{+151}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t + \frac{{\ell}^{2} \cdot \left(\frac{n \cdot U*}{Om} - 2\right)}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 39.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-162}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -4e-182)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= t 1.75e-162)
     (* (/ (* l (* n (sqrt 2.0))) Om) (sqrt (* U U*)))
     (* (sqrt (* (* 2.0 n) U)) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4e-182) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1.75e-162) {
		tmp = ((l * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= (-4d-182)) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (t <= 1.75d-162) then
        tmp = ((l * (n * sqrt(2.0d0))) / om) * sqrt((u * u_42))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4e-182) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1.75e-162) {
		tmp = ((l * (n * Math.sqrt(2.0))) / Om) * Math.sqrt((U * U_42_));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -4e-182:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif t <= 1.75e-162:
		tmp = ((l * (n * math.sqrt(2.0))) / Om) * math.sqrt((U * U_42_))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -4e-182)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (t <= 1.75e-162)
		tmp = Float64(Float64(Float64(l * Float64(n * sqrt(2.0))) / Om) * sqrt(Float64(U * U_42_)));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -4e-182)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (t <= 1.75e-162)
		tmp = ((l * (n * sqrt(2.0))) / Om) * sqrt((U * U_42_));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4e-182], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 1.75e-162], N[(N[(N[(l * N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4 \cdot 10^{-182}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-162}:\\
\;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.0000000000000002e-182

    1. Initial program 52.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)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/250.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr50.0%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if -4.0000000000000002e-182 < t < 1.74999999999999995e-162

    1. Initial program 44.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. Simplified47.6%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in U* around inf 15.2%

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

    if 1.74999999999999995e-162 < t

    1. Initial program 60.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. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*48.8%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative48.8%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr48.8%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/249.8%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*49.8%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval49.8%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down56.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval56.7%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/255.6%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*55.7%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative55.7%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval55.7%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/255.7%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr55.7%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-162}:\\ \;\;\;\;\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 39.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 10^{-144}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -4.8e-182)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= t 1e-144)
     (* (sqrt (* U U*)) (* l (* n (/ (sqrt 2.0) Om))))
     (* (sqrt (* (* 2.0 n) U)) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.8e-182) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1e-144) {
		tmp = sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= (-4.8d-182)) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (t <= 1d-144) then
        tmp = sqrt((u * u_42)) * (l * (n * (sqrt(2.0d0) / om)))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.8e-182) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1e-144) {
		tmp = Math.sqrt((U * U_42_)) * (l * (n * (Math.sqrt(2.0) / Om)));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -4.8e-182:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif t <= 1e-144:
		tmp = math.sqrt((U * U_42_)) * (l * (n * (math.sqrt(2.0) / Om)))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -4.8e-182)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (t <= 1e-144)
		tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(n * Float64(sqrt(2.0) / Om))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -4.8e-182)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (t <= 1e-144)
		tmp = sqrt((U * U_42_)) * (l * (n * (sqrt(2.0) / Om)));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4.8e-182], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 1e-144], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.8 \cdot 10^{-182}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

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

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.7999999999999997e-182

    1. Initial program 52.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)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/250.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr50.0%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if -4.7999999999999997e-182 < t < 9.9999999999999995e-145

    1. Initial program 43.1%

      \[\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. Simplified46.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in U* around inf 16.0%

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    5. Step-by-step derivation
      1. associate-/l*16.0%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
    6. Simplified16.0%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}} \]
    7. Step-by-step derivation
      1. *-commutative16.0%

        \[\leadsto \color{blue}{\left(\frac{n \cdot \sqrt{2}}{Om} \cdot \ell\right)} \cdot \sqrt{U \cdot U*} \]
      2. associate-/l*16.0%

        \[\leadsto \left(\color{blue}{\left(n \cdot \frac{\sqrt{2}}{Om}\right)} \cdot \ell\right) \cdot \sqrt{U \cdot U*} \]
    8. Applied egg-rr16.0%

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

    if 9.9999999999999995e-145 < t

    1. Initial program 62.0%

      \[\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. Simplified66.1%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.9%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*49.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative49.7%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr49.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/250.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*50.7%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval50.7%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down57.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval57.9%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/256.8%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*56.8%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative56.8%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval56.8%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/256.8%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr56.8%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.8 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 10^{-144}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 39.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-161}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -2.7e-182)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= t 5.1e-161)
     (* (sqrt (* U U*)) (* l (/ (* n (sqrt 2.0)) Om)))
     (* (sqrt (* (* 2.0 n) U)) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -2.7e-182) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 5.1e-161) {
		tmp = sqrt((U * U_42_)) * (l * ((n * sqrt(2.0)) / Om));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= (-2.7d-182)) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (t <= 5.1d-161) then
        tmp = sqrt((u * u_42)) * (l * ((n * sqrt(2.0d0)) / om))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -2.7e-182) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 5.1e-161) {
		tmp = Math.sqrt((U * U_42_)) * (l * ((n * Math.sqrt(2.0)) / Om));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -2.7e-182:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif t <= 5.1e-161:
		tmp = math.sqrt((U * U_42_)) * (l * ((n * math.sqrt(2.0)) / Om))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -2.7e-182)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (t <= 5.1e-161)
		tmp = Float64(sqrt(Float64(U * U_42_)) * Float64(l * Float64(Float64(n * sqrt(2.0)) / Om)));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -2.7e-182)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (t <= 5.1e-161)
		tmp = sqrt((U * U_42_)) * (l * ((n * sqrt(2.0)) / Om));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -2.7e-182], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 5.1e-161], N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(l * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-182}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;t \leq 5.1 \cdot 10^{-161}:\\
\;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.69999999999999999e-182

    1. Initial program 52.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)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/250.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr50.0%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if -2.69999999999999999e-182 < t < 5.1000000000000003e-161

    1. Initial program 44.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. Simplified47.6%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in U* around inf 15.2%

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    5. Step-by-step derivation
      1. associate-/l*15.2%

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

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

    if 5.1000000000000003e-161 < t

    1. Initial program 60.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. Simplified64.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*48.8%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative48.8%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr48.8%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/249.8%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*49.8%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval49.8%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down56.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval56.7%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/255.6%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*55.7%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative55.7%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval55.7%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/255.7%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr55.7%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.7 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 5.1 \cdot 10^{-161}:\\ \;\;\;\;\sqrt{U \cdot U*} \cdot \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 40.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-187}:\\ \;\;\;\;\ell \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t -4.2e-182)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (if (<= t 1.85e-187)
     (* l (* (sqrt (* U U*)) (* n (/ (sqrt 2.0) Om))))
     (* (sqrt (* (* 2.0 n) U)) (sqrt t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.2e-182) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1.85e-187) {
		tmp = l * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om)));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= (-4.2d-182)) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else if (t <= 1.85d-187) then
        tmp = l * (sqrt((u * u_42)) * (n * (sqrt(2.0d0) / om)))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= -4.2e-182) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else if (t <= 1.85e-187) {
		tmp = l * (Math.sqrt((U * U_42_)) * (n * (Math.sqrt(2.0) / Om)));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= -4.2e-182:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	elif t <= 1.85e-187:
		tmp = l * (math.sqrt((U * U_42_)) * (n * (math.sqrt(2.0) / Om)))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= -4.2e-182)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	elseif (t <= 1.85e-187)
		tmp = Float64(l * Float64(sqrt(Float64(U * U_42_)) * Float64(n * Float64(sqrt(2.0) / Om))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= -4.2e-182)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	elseif (t <= 1.85e-187)
		tmp = l * (sqrt((U * U_42_)) * (n * (sqrt(2.0) / Om)));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, -4.2e-182], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], If[LessEqual[t, 1.85e-187], N[(l * N[(N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision] * N[(n * N[(N[Sqrt[2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-182}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{elif}\;t \leq 1.85 \cdot 10^{-187}:\\
\;\;\;\;\ell \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.2000000000000001e-182

    1. Initial program 52.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)} \]
    2. Simplified55.5%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 49.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/250.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr50.0%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if -4.2000000000000001e-182 < t < 1.85000000000000005e-187

    1. Initial program 42.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. Simplified46.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in U* around inf 16.7%

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    5. Step-by-step derivation
      1. associate-/l*16.7%

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
    6. Simplified16.7%

      \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}} \]
    7. Step-by-step derivation
      1. associate-*l*16.7%

        \[\leadsto \color{blue}{\ell \cdot \left(\frac{n \cdot \sqrt{2}}{Om} \cdot \sqrt{U \cdot U*}\right)} \]
      2. associate-/l*16.7%

        \[\leadsto \ell \cdot \left(\color{blue}{\left(n \cdot \frac{\sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*}\right) \]
      3. *-commutative16.7%

        \[\leadsto \ell \cdot \left(\left(n \cdot \frac{\sqrt{2}}{Om}\right) \cdot \sqrt{\color{blue}{U* \cdot U}}\right) \]
    8. Applied egg-rr16.7%

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

    if 1.85000000000000005e-187 < t

    1. Initial program 60.4%

      \[\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. Simplified64.1%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 46.3%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*47.0%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative47.0%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr47.0%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/248.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*48.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval48.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down54.4%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval54.4%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/253.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*53.5%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative53.5%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval53.5%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/253.5%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr53.5%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification44.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.2 \cdot 10^{-182}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{elif}\;t \leq 1.85 \cdot 10^{-187}:\\ \;\;\;\;\ell \cdot \left(\sqrt{U \cdot U*} \cdot \left(n \cdot \frac{\sqrt{2}}{Om}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 46.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 1.55 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t 1.55e+152)
   (sqrt (* U (* (* 2.0 n) (+ t (* (/ (pow l 2.0) Om) -2.0)))))
   (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 1.55e+152) {
		tmp = sqrt((U * ((2.0 * n) * (t + ((pow(l, 2.0) / Om) * -2.0)))));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= 1.55d+152) then
        tmp = sqrt((u * ((2.0d0 * n) * (t + (((l ** 2.0d0) / om) * (-2.0d0))))))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 1.55e+152) {
		tmp = Math.sqrt((U * ((2.0 * n) * (t + ((Math.pow(l, 2.0) / Om) * -2.0)))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= 1.55e+152:
		tmp = math.sqrt((U * ((2.0 * n) * (t + ((math.pow(l, 2.0) / Om) * -2.0)))))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= 1.55e+152)
		tmp = sqrt(Float64(U * Float64(Float64(2.0 * n) * Float64(t + Float64(Float64((l ^ 2.0) / Om) * -2.0)))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= 1.55e+152)
		tmp = sqrt((U * ((2.0 * n) * (t + (((l ^ 2.0) / Om) * -2.0)))));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 1.55e+152], N[Sqrt[N[(U * N[(N[(2.0 * n), $MachinePrecision] * N[(t + N[(N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision] * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 1.55 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 1.55e152

    1. Initial program 52.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. Simplified55.2%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Step-by-step derivation
      1. *-commutative55.2%

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

        \[\leadsto \sqrt{\mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right) \cdot \color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)}} \]
      3. associate-*r*56.4%

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

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

      \[\leadsto \sqrt{\color{blue}{\left(\mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(\ell \cdot -2, \frac{\ell}{Om}, t\right)\right) \cdot \left(2 \cdot n\right)\right) \cdot U}} \]
    6. Taylor expanded in n around 0 46.0%

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

    if 1.55e152 < t

    1. Initial program 60.1%

      \[\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. Simplified67.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 62.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*62.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative62.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr62.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/265.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*65.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval65.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down78.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval78.5%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/276.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*76.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative76.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval76.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/276.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr76.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 1.55 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{U \cdot \left(\left(2 \cdot n\right) \cdot \left(t + \frac{{\ell}^{2}}{Om} \cdot -2\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 46.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 5.6 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t 5.6e+152)
   (sqrt (* 2.0 (* U (* n (- t (* 2.0 (/ (pow l 2.0) Om)))))))
   (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 5.6e+152) {
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * (pow(l, 2.0) / Om)))))));
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= 5.6d+152) then
        tmp = sqrt((2.0d0 * (u * (n * (t - (2.0d0 * ((l ** 2.0d0) / om)))))))
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 5.6e+152) {
		tmp = Math.sqrt((2.0 * (U * (n * (t - (2.0 * (Math.pow(l, 2.0) / Om)))))));
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= 5.6e+152:
		tmp = math.sqrt((2.0 * (U * (n * (t - (2.0 * (math.pow(l, 2.0) / Om)))))))
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= 5.6e+152)
		tmp = sqrt(Float64(2.0 * Float64(U * Float64(n * Float64(t - Float64(2.0 * Float64((l ^ 2.0) / Om)))))));
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= 5.6e+152)
		tmp = sqrt((2.0 * (U * (n * (t - (2.0 * ((l ^ 2.0) / Om)))))));
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 5.6e+152], N[Sqrt[N[(2.0 * N[(U * N[(n * N[(t - N[(2.0 * N[(N[Power[l, 2.0], $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 5.6 \cdot 10^{+152}:\\
\;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 5.6000000000000004e152

    1. Initial program 52.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. Add Preprocessing
    3. Taylor expanded in n around 0 46.0%

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

    if 5.6000000000000004e152 < t

    1. Initial program 60.1%

      \[\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. Simplified67.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 62.2%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*62.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative62.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr62.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/265.0%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*65.0%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval65.0%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down78.5%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval78.5%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/276.1%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*76.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative76.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval76.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/276.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr76.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification50.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 5.6 \cdot 10^{+152}:\\ \;\;\;\;\sqrt{2 \cdot \left(U \cdot \left(n \cdot \left(t - 2 \cdot \frac{{\ell}^{2}}{Om}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 40.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-221}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= t 2.3e-221)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (* (sqrt (* (* 2.0 n) U)) (sqrt t))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 2.3e-221) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	}
	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
    real(8) :: tmp
    if (t <= 2.3d-221) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else
        tmp = sqrt(((2.0d0 * n) * u)) * sqrt(t)
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (t <= 2.3e-221) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = Math.sqrt(((2.0 * n) * U)) * Math.sqrt(t);
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if t <= 2.3e-221:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	else:
		tmp = math.sqrt(((2.0 * n) * U)) * math.sqrt(t)
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (t <= 2.3e-221)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	else
		tmp = Float64(sqrt(Float64(Float64(2.0 * n) * U)) * sqrt(t));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (t <= 2.3e-221)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	else
		tmp = sqrt(((2.0 * n) * U)) * sqrt(t);
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[t, 2.3e-221], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(N[(2.0 * n), $MachinePrecision] * U), $MachinePrecision]], $MachinePrecision] * N[Sqrt[t], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq 2.3 \cdot 10^{-221}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 2.3e-221

    1. Initial program 49.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. Simplified53.0%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 36.1%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/236.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr36.7%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 2.3e-221 < t

    1. Initial program 59.1%

      \[\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. Simplified62.8%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 44.6%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*45.4%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative45.4%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr45.4%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/246.3%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*46.3%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. metadata-eval46.3%

        \[\leadsto {\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      4. unpow-prod-down52.9%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot U\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      5. metadata-eval52.9%

        \[\leadsto {\left(2 \cdot \left(n \cdot U\right)\right)}^{\color{blue}{0.5}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      6. pow1/252.0%

        \[\leadsto \color{blue}{\sqrt{2 \cdot \left(n \cdot U\right)}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      7. associate-*r*52.1%

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot n\right) \cdot U}} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. *-commutative52.1%

        \[\leadsto \sqrt{\color{blue}{\left(n \cdot 2\right)} \cdot U} \cdot {t}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      9. metadata-eval52.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot {t}^{\color{blue}{0.5}} \]
      10. pow1/252.1%

        \[\leadsto \sqrt{\left(n \cdot 2\right) \cdot U} \cdot \color{blue}{\sqrt{t}} \]
    8. Applied egg-rr52.1%

      \[\leadsto \color{blue}{\sqrt{\left(n \cdot 2\right) \cdot U} \cdot \sqrt{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.2%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq 2.3 \cdot 10^{-221}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{\left(2 \cdot n\right) \cdot U} \cdot \sqrt{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 39.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq 2.15 \cdot 10^{-223}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n 2.15e-223)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (* (sqrt (* 2.0 n)) (sqrt (* U t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 2.15e-223) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	}
	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
    real(8) :: tmp
    if (n <= 2.15d-223) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else
        tmp = sqrt((2.0d0 * n)) * sqrt((u * t))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 2.15e-223) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = Math.sqrt((2.0 * n)) * Math.sqrt((U * t));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= 2.15e-223:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	else:
		tmp = math.sqrt((2.0 * n)) * math.sqrt((U * t))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= 2.15e-223)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	else
		tmp = Float64(sqrt(Float64(2.0 * n)) * sqrt(Float64(U * t)));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= 2.15e-223)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	else
		tmp = sqrt((2.0 * n)) * sqrt((U * t));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 2.15e-223], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[N[(2.0 * n), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(U * t), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;n \leq 2.15 \cdot 10^{-223}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 2.15e-223

    1. Initial program 53.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. Simplified57.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 42.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/242.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr42.7%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 2.15e-223 < n

    1. Initial program 53.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)} \]
    2. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 36.8%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. *-commutative36.8%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    6. Applied egg-rr36.8%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot t\right) \cdot U\right)}} \]
    7. Step-by-step derivation
      1. associate-*l*36.7%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    8. Simplified36.7%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(n \cdot \left(t \cdot U\right)\right)}} \]
    9. Step-by-step derivation
      1. pow1/237.6%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(n \cdot \left(t \cdot U\right)\right)\right)}^{0.5}} \]
      2. associate-*r*37.6%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot n\right) \cdot \left(t \cdot U\right)\right)}}^{0.5} \]
      3. unpow-prod-down44.5%

        \[\leadsto \color{blue}{{\left(2 \cdot n\right)}^{0.5} \cdot {\left(t \cdot U\right)}^{0.5}} \]
      4. pow1/244.5%

        \[\leadsto \color{blue}{\sqrt{2 \cdot n}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      5. *-commutative44.5%

        \[\leadsto \sqrt{\color{blue}{n \cdot 2}} \cdot {\left(t \cdot U\right)}^{0.5} \]
      6. pow1/243.6%

        \[\leadsto \sqrt{n \cdot 2} \cdot \color{blue}{\sqrt{t \cdot U}} \]
      7. *-commutative43.6%

        \[\leadsto \sqrt{n \cdot 2} \cdot \sqrt{\color{blue}{U \cdot t}} \]
    10. Applied egg-rr43.6%

      \[\leadsto \color{blue}{\sqrt{n \cdot 2} \cdot \sqrt{U \cdot t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification43.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;n \leq 2.15 \cdot 10^{-223}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{2 \cdot n} \cdot \sqrt{U \cdot t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 39.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;n \leq 1.75 \cdot 10^{-223}:\\ \;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\ \end{array} \end{array} \]
(FPCore (n U t l Om U*)
 :precision binary64
 (if (<= n 1.75e-223)
   (pow (* 2.0 (* U (* n t))) 0.5)
   (* (sqrt n) (sqrt (* 2.0 (* U t))))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 1.75e-223) {
		tmp = pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = sqrt(n) * sqrt((2.0 * (U * t)));
	}
	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
    real(8) :: tmp
    if (n <= 1.75d-223) then
        tmp = (2.0d0 * (u * (n * t))) ** 0.5d0
    else
        tmp = sqrt(n) * sqrt((2.0d0 * (u * t)))
    end if
    code = tmp
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	double tmp;
	if (n <= 1.75e-223) {
		tmp = Math.pow((2.0 * (U * (n * t))), 0.5);
	} else {
		tmp = Math.sqrt(n) * Math.sqrt((2.0 * (U * t)));
	}
	return tmp;
}
def code(n, U, t, l, Om, U_42_):
	tmp = 0
	if n <= 1.75e-223:
		tmp = math.pow((2.0 * (U * (n * t))), 0.5)
	else:
		tmp = math.sqrt(n) * math.sqrt((2.0 * (U * t)))
	return tmp
function code(n, U, t, l, Om, U_42_)
	tmp = 0.0
	if (n <= 1.75e-223)
		tmp = Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5;
	else
		tmp = Float64(sqrt(n) * sqrt(Float64(2.0 * Float64(U * t))));
	end
	return tmp
end
function tmp_2 = code(n, U, t, l, Om, U_42_)
	tmp = 0.0;
	if (n <= 1.75e-223)
		tmp = (2.0 * (U * (n * t))) ^ 0.5;
	else
		tmp = sqrt(n) * sqrt((2.0 * (U * t)));
	end
	tmp_2 = tmp;
end
code[n_, U_, t_, l_, Om_, U$42$_] := If[LessEqual[n, 1.75e-223], N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(2.0 * N[(U * t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;n \leq 1.75 \cdot 10^{-223}:\\
\;\;\;\;{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}\\

\mathbf{else}:\\
\;\;\;\;\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if n < 1.75000000000000005e-223

    1. Initial program 53.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. Simplified57.3%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 42.0%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. pow1/242.7%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
    6. Applied egg-rr42.7%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]

    if 1.75000000000000005e-223 < n

    1. Initial program 53.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)} \]
    2. Simplified57.0%

      \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    3. Add Preprocessing
    4. Taylor expanded in l around 0 36.8%

      \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
    5. Step-by-step derivation
      1. associate-*r*36.5%

        \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(U \cdot n\right) \cdot t\right)}} \]
      2. *-commutative36.5%

        \[\leadsto \sqrt{2 \cdot \left(\color{blue}{\left(n \cdot U\right)} \cdot t\right)} \]
    6. Applied egg-rr36.5%

      \[\leadsto \sqrt{2 \cdot \color{blue}{\left(\left(n \cdot U\right) \cdot t\right)}} \]
    7. Step-by-step derivation
      1. pow1/237.4%

        \[\leadsto \color{blue}{{\left(2 \cdot \left(\left(n \cdot U\right) \cdot t\right)\right)}^{0.5}} \]
      2. associate-*r*37.4%

        \[\leadsto {\color{blue}{\left(\left(2 \cdot \left(n \cdot U\right)\right) \cdot t\right)}}^{0.5} \]
      3. associate-*r*37.4%

        \[\leadsto {\left(\color{blue}{\left(\left(2 \cdot n\right) \cdot U\right)} \cdot t\right)}^{0.5} \]
      4. *-commutative37.4%

        \[\leadsto {\left(\left(\color{blue}{\left(n \cdot 2\right)} \cdot U\right) \cdot t\right)}^{0.5} \]
      5. associate-*r*37.6%

        \[\leadsto {\color{blue}{\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}}^{0.5} \]
      6. metadata-eval37.6%

        \[\leadsto {\left(\left(n \cdot 2\right) \cdot \left(U \cdot t\right)\right)}^{\color{blue}{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      7. associate-*l*37.6%

        \[\leadsto {\color{blue}{\left(n \cdot \left(2 \cdot \left(U \cdot t\right)\right)\right)}}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      8. unpow-prod-down44.5%

        \[\leadsto \color{blue}{{n}^{\left(1.5 \cdot 0.3333333333333333\right)} \cdot {\left(2 \cdot \left(U \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)}} \]
      9. metadata-eval44.5%

        \[\leadsto {n}^{\color{blue}{0.5}} \cdot {\left(2 \cdot \left(U \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      10. pow1/244.5%

        \[\leadsto \color{blue}{\sqrt{n}} \cdot {\left(2 \cdot \left(U \cdot t\right)\right)}^{\left(1.5 \cdot 0.3333333333333333\right)} \]
      11. metadata-eval44.5%

        \[\leadsto \sqrt{n} \cdot {\left(2 \cdot \left(U \cdot t\right)\right)}^{\color{blue}{0.5}} \]
    8. Applied egg-rr44.5%

      \[\leadsto \color{blue}{\sqrt{n} \cdot {\left(2 \cdot \left(U \cdot t\right)\right)}^{0.5}} \]
    9. Step-by-step derivation
      1. unpow1/243.6%

        \[\leadsto \sqrt{n} \cdot \color{blue}{\sqrt{2 \cdot \left(U \cdot t\right)}} \]
    10. Simplified43.6%

      \[\leadsto \color{blue}{\sqrt{n} \cdot \sqrt{2 \cdot \left(U \cdot t\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 38.4% accurate, 2.1× speedup?

\[\begin{array}{l} \\ {\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (pow (* 2.0 (* U (* n t))) 0.5))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return pow((2.0 * (U * (n * t))), 0.5);
}
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 = (2.0d0 * (u * (n * t))) ** 0.5d0
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.pow((2.0 * (U * (n * t))), 0.5);
}
def code(n, U, t, l, Om, U_42_):
	return math.pow((2.0 * (U * (n * t))), 0.5)
function code(n, U, t, l, Om, U_42_)
	return Float64(2.0 * Float64(U * Float64(n * t))) ^ 0.5
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = (2.0 * (U * (n * t))) ^ 0.5;
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Power[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]
\begin{array}{l}

\\
{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}
\end{array}
Derivation
  1. Initial program 53.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. Simplified57.1%

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 39.7%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  5. Step-by-step derivation
    1. pow1/240.5%

      \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  6. Applied egg-rr40.5%

    \[\leadsto \color{blue}{{\left(2 \cdot \left(U \cdot \left(n \cdot t\right)\right)\right)}^{0.5}} \]
  7. Add Preprocessing

Alternative 18: 36.5% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* (* n t) (* 2.0 U))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt(((n * t) * (2.0 * U)));
}
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(((n * t) * (2.0d0 * u)))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt(((n * t) * (2.0 * U)));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt(((n * t) * (2.0 * U)))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(Float64(n * t) * Float64(2.0 * U)))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt(((n * t) * (2.0 * U)));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(N[(n * t), $MachinePrecision] * N[(2.0 * U), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)}
\end{array}
Derivation
  1. Initial program 53.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. Simplified57.1%

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 39.7%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  5. Step-by-step derivation
    1. associate-*r*39.7%

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
  6. Applied egg-rr39.7%

    \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
  7. Final simplification39.7%

    \[\leadsto \sqrt{\left(n \cdot t\right) \cdot \left(2 \cdot U\right)} \]
  8. Add Preprocessing

Alternative 19: 36.5% accurate, 2.1× speedup?

\[\begin{array}{l} \\ \sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)} \end{array} \]
(FPCore (n U t l Om U*) :precision binary64 (sqrt (* 2.0 (* U (* n t)))))
double code(double n, double U, double t, double l, double Om, double U_42_) {
	return sqrt((2.0 * (U * (n * t))));
}
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 * (u * (n * t))))
end function
public static double code(double n, double U, double t, double l, double Om, double U_42_) {
	return Math.sqrt((2.0 * (U * (n * t))));
}
def code(n, U, t, l, Om, U_42_):
	return math.sqrt((2.0 * (U * (n * t))))
function code(n, U, t, l, Om, U_42_)
	return sqrt(Float64(2.0 * Float64(U * Float64(n * t))))
end
function tmp = code(n, U, t, l, Om, U_42_)
	tmp = sqrt((2.0 * (U * (n * t))));
end
code[n_, U_, t_, l_, Om_, U$42$_] := N[Sqrt[N[(2.0 * N[(U * N[(n * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}

\\
\sqrt{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}
\end{array}
Derivation
  1. Initial program 53.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. Simplified57.1%

    \[\leadsto \color{blue}{\sqrt{\left(2 \cdot \left(n \cdot U\right)\right) \cdot \mathsf{fma}\left(n, {\left(\frac{\ell}{Om}\right)}^{2} \cdot \left(U* - U\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
  3. Add Preprocessing
  4. Taylor expanded in l around 0 39.7%

    \[\leadsto \sqrt{\color{blue}{2 \cdot \left(U \cdot \left(n \cdot t\right)\right)}} \]
  5. Add Preprocessing

Reproduce

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