Toniolo and Linder, Equation (13)

Percentage Accurate: 49.8% → 67.1%
Time: 21.0s
Alternatives: 19
Speedup: 2.8×

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: 49.8% 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: 67.1% accurate, 0.4× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\\ t_3 := t\_1 \cdot \left(t\_2 + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)\\ \mathbf{if}\;t\_3 \leq 0:\\ \;\;\;\;\sqrt{n} \cdot \sqrt{\left(2 \cdot U\right) \cdot \mathsf{fma}\left(\left(U - U*\right) \cdot \left(\frac{l\_m}{Om} \cdot \frac{l\_m}{Om}\right), -n, \mathsf{fma}\left(l\_m \cdot -2, \frac{l\_m}{Om}, t\right)\right)}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \left(U - U*\right) \cdot \left(n \cdot \left(\frac{l\_m}{Om} \cdot \frac{\frac{1}{Om}}{\frac{-1}{l\_m}}\right)\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{n \cdot \left(U \cdot \frac{n \cdot \frac{U* - U}{Om} - 2}{Om}\right)} \cdot \left(l\_m \cdot \sqrt{2}\right)\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2 (- t (* 2.0 (/ (* l_m l_m) Om))))
        (t_3 (* t_1 (+ t_2 (* (* n (pow (/ l_m Om) 2.0)) (- U* U))))))
   (if (<= t_3 0.0)
     (*
      (sqrt n)
      (sqrt
       (*
        (* 2.0 U)
        (fma
         (* (- U U*) (* (/ l_m Om) (/ l_m Om)))
         (- n)
         (fma (* l_m -2.0) (/ l_m Om) t)))))
     (if (<= t_3 5e+302)
       (sqrt
        (*
         t_1
         (+
          t_2
          (* (- U U*) (* n (* (/ l_m Om) (/ (/ 1.0 Om) (/ -1.0 l_m))))))))
       (*
        (sqrt (* n (* U (/ (- (* n (/ (- U* U) Om)) 2.0) Om))))
        (* l_m (sqrt 2.0)))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = t - (2.0 * ((l_m * l_m) / Om));
	double t_3 = t_1 * (t_2 + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)));
	double tmp;
	if (t_3 <= 0.0) {
		tmp = sqrt(n) * sqrt(((2.0 * U) * fma(((U - U_42_) * ((l_m / Om) * (l_m / Om))), -n, fma((l_m * -2.0), (l_m / Om), t))));
	} else if (t_3 <= 5e+302) {
		tmp = sqrt((t_1 * (t_2 + ((U - U_42_) * (n * ((l_m / Om) * ((1.0 / Om) / (-1.0 / l_m))))))));
	} else {
		tmp = sqrt((n * (U * (((n * ((U_42_ - U) / Om)) - 2.0) / Om)))) * (l_m * sqrt(2.0));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om)))
	t_3 = Float64(t_1 * Float64(t_2 + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U))))
	tmp = 0.0
	if (t_3 <= 0.0)
		tmp = Float64(sqrt(n) * sqrt(Float64(Float64(2.0 * U) * fma(Float64(Float64(U - U_42_) * Float64(Float64(l_m / Om) * Float64(l_m / Om))), Float64(-n), fma(Float64(l_m * -2.0), Float64(l_m / Om), t)))));
	elseif (t_3 <= 5e+302)
		tmp = sqrt(Float64(t_1 * Float64(t_2 + Float64(Float64(U - U_42_) * Float64(n * Float64(Float64(l_m / Om) * Float64(Float64(1.0 / Om) / Float64(-1.0 / l_m))))))));
	else
		tmp = Float64(sqrt(Float64(n * Float64(U * Float64(Float64(Float64(n * Float64(Float64(U_42_ - U) / Om)) - 2.0) / Om)))) * Float64(l_m * sqrt(2.0)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 * N[(t$95$2 + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, 0.0], N[(N[Sqrt[n], $MachinePrecision] * N[Sqrt[N[(N[(2.0 * U), $MachinePrecision] * N[(N[(N[(U - U$42$), $MachinePrecision] * N[(N[(l$95$m / Om), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * (-n) + N[(N[(l$95$m * -2.0), $MachinePrecision] * N[(l$95$m / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+302], N[Sqrt[N[(t$95$1 * N[(t$95$2 + N[(N[(U - U$42$), $MachinePrecision] * N[(n * N[(N[(l$95$m / Om), $MachinePrecision] * N[(N[(1.0 / Om), $MachinePrecision] / N[(-1.0 / l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[Sqrt[N[(n * N[(U * N[(N[(N[(n * N[(N[(U$42$ - U), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] - 2.0), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(l$95$m * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\sqrt{t\_1 \cdot \left(t\_2 + \left(U - U*\right) \cdot \left(n \cdot \left(\frac{l\_m}{Om} \cdot \frac{\frac{1}{Om}}{\frac{-1}{l\_m}}\right)\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.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 12.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. Applied egg-rr40.8%

      \[\leadsto \color{blue}{\sqrt{n} \cdot \sqrt{\left(2 \cdot U\right) \cdot \mathsf{fma}\left(\frac{\ell \cdot \ell}{Om \cdot Om} \cdot \left(U - U*\right), -n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)}} \]
    4. Step-by-step derivation
      1. times-fracN/A

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

        \[\leadsto \sqrt{n} \cdot \sqrt{\left(2 \cdot U\right) \cdot \mathsf{fma}\left(\left(\color{blue}{\frac{\ell}{Om}} \cdot \frac{\ell}{Om}\right) \cdot \left(U - U*\right), \mathsf{neg}\left(n\right), \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      3. lift-/.f64N/A

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

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

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

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

    1. Initial program 97.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. lift-/.f64N/A

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      2. unpow2N/A

        \[\leadsto \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 \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\ell}{Om}\right)}\right) \cdot \left(U - U*\right)\right)} \]
      3. lift-/.f64N/A

        \[\leadsto \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} \cdot \color{blue}{\frac{\ell}{Om}}\right)\right) \cdot \left(U - U*\right)\right)} \]
      4. clear-numN/A

        \[\leadsto \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} \cdot \color{blue}{\frac{1}{\frac{Om}{\ell}}}\right)\right) \cdot \left(U - U*\right)\right)} \]
      5. un-div-invN/A

        \[\leadsto \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 \color{blue}{\frac{\frac{\ell}{Om}}{\frac{Om}{\ell}}}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-/.f64N/A

        \[\leadsto \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 \frac{\color{blue}{\frac{\ell}{Om}}}{\frac{Om}{\ell}}\right) \cdot \left(U - U*\right)\right)} \]
      7. div-invN/A

        \[\leadsto \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 \frac{\color{blue}{\ell \cdot \frac{1}{Om}}}{\frac{Om}{\ell}}\right) \cdot \left(U - U*\right)\right)} \]
      8. div-invN/A

        \[\leadsto \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 \frac{\ell \cdot \frac{1}{Om}}{\color{blue}{Om \cdot \frac{1}{\ell}}}\right) \cdot \left(U - U*\right)\right)} \]
      9. times-fracN/A

        \[\leadsto \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 \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\frac{1}{Om}}{\frac{1}{\ell}}\right)}\right) \cdot \left(U - U*\right)\right)} \]
      10. lift-/.f64N/A

        \[\leadsto \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(\color{blue}{\frac{\ell}{Om}} \cdot \frac{\frac{1}{Om}}{\frac{1}{\ell}}\right)\right) \cdot \left(U - U*\right)\right)} \]
      11. lower-*.f64N/A

        \[\leadsto \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 \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\frac{1}{Om}}{\frac{1}{\ell}}\right)}\right) \cdot \left(U - U*\right)\right)} \]
      12. lower-/.f64N/A

        \[\leadsto \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} \cdot \color{blue}{\frac{\frac{1}{Om}}{\frac{1}{\ell}}}\right)\right) \cdot \left(U - U*\right)\right)} \]
      13. lower-/.f64N/A

        \[\leadsto \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} \cdot \frac{\color{blue}{\frac{1}{Om}}}{\frac{1}{\ell}}\right)\right) \cdot \left(U - U*\right)\right)} \]
      14. lower-/.f6497.9

        \[\leadsto \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} \cdot \frac{\frac{1}{Om}}{\color{blue}{\frac{1}{\ell}}}\right)\right) \cdot \left(U - U*\right)\right)} \]
    4. Applied egg-rr97.9%

      \[\leadsto \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 \color{blue}{\left(\frac{\ell}{Om} \cdot \frac{\frac{1}{Om}}{\frac{1}{\ell}}\right)}\right) \cdot \left(U - U*\right)\right)} \]

    if 5e302 < (*.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 24.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. lift-*.f64N/A

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      5. lift-/.f64N/A

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

      \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \color{blue}{\sqrt{U \cdot \left(n \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
      2. lower-sqrt.f64N/A

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

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      5. lower-*.f64N/A

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

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{{Om}^{2}} - 2 \cdot \frac{1}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      7. lower-/.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{\frac{n \cdot \left(U* - U\right)}{{Om}^{2}}} - 2 \cdot \frac{1}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      8. lower-*.f64N/A

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

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

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{\color{blue}{Om \cdot Om}} - 2 \cdot \frac{1}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      11. lower-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{\color{blue}{Om \cdot Om}} - 2 \cdot \frac{1}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      12. associate-*r/N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \color{blue}{\frac{2 \cdot 1}{Om}}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      13. metadata-evalN/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{\color{blue}{2}}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      14. lower-/.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \color{blue}{\frac{2}{Om}}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      15. lower-*.f64N/A

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

      \[\leadsto \color{blue}{\sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right)} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(U \cdot n\right)} \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      2. lift--.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \color{blue}{\left(U* - U\right)}}{Om \cdot Om} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      3. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{\color{blue}{n \cdot \left(U* - U\right)}}{Om \cdot Om} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      4. lift-*.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{\color{blue}{Om \cdot Om}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      5. lift-/.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\color{blue}{\frac{n \cdot \left(U* - U\right)}{Om \cdot Om}} - \frac{2}{Om}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      6. lift-/.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \color{blue}{\frac{2}{Om}}\right)} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      7. lift--.f64N/A

        \[\leadsto \sqrt{\left(U \cdot n\right) \cdot \color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      8. *-commutativeN/A

        \[\leadsto \sqrt{\color{blue}{\left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right) \cdot \left(U \cdot n\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      9. lift-*.f64N/A

        \[\leadsto \sqrt{\left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right) \cdot \color{blue}{\left(U \cdot n\right)}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      10. associate-*r*N/A

        \[\leadsto \sqrt{\color{blue}{\left(\left(\frac{n \cdot \left(U* - U\right)}{Om \cdot Om} - \frac{2}{Om}\right) \cdot U\right) \cdot n}} \cdot \left(\ell \cdot \sqrt{2}\right) \]
      11. lower-*.f64N/A

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

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

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

Alternative 2: 52.8% accurate, 0.3× speedup?

\[\begin{array}{l} l_m = \left|\ell\right| \\ \begin{array}{l} t_1 := U \cdot \left(2 \cdot n\right)\\ t_2 := \sqrt{t\_1 \cdot \left(\left(t - 2 \cdot \frac{l\_m \cdot l\_m}{Om}\right) + \left(n \cdot {\left(\frac{l\_m}{Om}\right)}^{2}\right) \cdot \left(U* - U\right)\right)}\\ \mathbf{if}\;t\_2 \leq 5 \cdot 10^{-161}:\\ \;\;\;\;\sqrt{n \cdot t} \cdot \sqrt{2 \cdot U}\\ \mathbf{elif}\;t\_2 \leq 10^{+151}:\\ \;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;\sqrt{U \cdot \left(\mathsf{fma}\left(l\_m, \frac{l\_m}{Om \cdot -0.5}, t\right) \cdot \left(2 \cdot n\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(l\_m \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\\ \end{array} \end{array} \]
l_m = (fabs.f64 l)
(FPCore (n U t l_m Om U*)
 :precision binary64
 (let* ((t_1 (* U (* 2.0 n)))
        (t_2
         (sqrt
          (*
           t_1
           (+
            (- t (* 2.0 (/ (* l_m l_m) Om)))
            (* (* n (pow (/ l_m Om) 2.0)) (- U* U)))))))
   (if (<= t_2 5e-161)
     (* (sqrt (* n t)) (sqrt (* 2.0 U)))
     (if (<= t_2 1e+151)
       (sqrt (* t_1 (fma (* l_m l_m) (/ -2.0 Om) t)))
       (if (<= t_2 INFINITY)
         (sqrt (* U (* (fma l_m (/ l_m (* Om -0.5)) t) (* 2.0 n))))
         (* (* l_m (/ (* n (sqrt 2.0)) Om)) (sqrt (* U U*))))))))
l_m = fabs(l);
double code(double n, double U, double t, double l_m, double Om, double U_42_) {
	double t_1 = U * (2.0 * n);
	double t_2 = sqrt((t_1 * ((t - (2.0 * ((l_m * l_m) / Om))) + ((n * pow((l_m / Om), 2.0)) * (U_42_ - U)))));
	double tmp;
	if (t_2 <= 5e-161) {
		tmp = sqrt((n * t)) * sqrt((2.0 * U));
	} else if (t_2 <= 1e+151) {
		tmp = sqrt((t_1 * fma((l_m * l_m), (-2.0 / Om), t)));
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = sqrt((U * (fma(l_m, (l_m / (Om * -0.5)), t) * (2.0 * n))));
	} else {
		tmp = (l_m * ((n * sqrt(2.0)) / Om)) * sqrt((U * U_42_));
	}
	return tmp;
}
l_m = abs(l)
function code(n, U, t, l_m, Om, U_42_)
	t_1 = Float64(U * Float64(2.0 * n))
	t_2 = sqrt(Float64(t_1 * Float64(Float64(t - Float64(2.0 * Float64(Float64(l_m * l_m) / Om))) + Float64(Float64(n * (Float64(l_m / Om) ^ 2.0)) * Float64(U_42_ - U)))))
	tmp = 0.0
	if (t_2 <= 5e-161)
		tmp = Float64(sqrt(Float64(n * t)) * sqrt(Float64(2.0 * U)));
	elseif (t_2 <= 1e+151)
		tmp = sqrt(Float64(t_1 * fma(Float64(l_m * l_m), Float64(-2.0 / Om), t)));
	elseif (t_2 <= Inf)
		tmp = sqrt(Float64(U * Float64(fma(l_m, Float64(l_m / Float64(Om * -0.5)), t) * Float64(2.0 * n))));
	else
		tmp = Float64(Float64(l_m * Float64(Float64(n * sqrt(2.0)) / Om)) * sqrt(Float64(U * U_42_)));
	end
	return tmp
end
l_m = N[Abs[l], $MachinePrecision]
code[n_, U_, t_, l$95$m_, Om_, U$42$_] := Block[{t$95$1 = N[(U * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[Sqrt[N[(t$95$1 * N[(N[(t - N[(2.0 * N[(N[(l$95$m * l$95$m), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(n * N[Power[N[(l$95$m / Om), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision] * N[(U$42$ - U), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[t$95$2, 5e-161], N[(N[Sqrt[N[(n * t), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(2.0 * U), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+151], N[Sqrt[N[(t$95$1 * N[(N[(l$95$m * l$95$m), $MachinePrecision] * N[(-2.0 / Om), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[Sqrt[N[(U * N[(N[(l$95$m * N[(l$95$m / N[(Om * -0.5), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision] * N[(2.0 * n), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[(N[(l$95$m * N[(N[(n * N[Sqrt[2.0], $MachinePrecision]), $MachinePrecision] / Om), $MachinePrecision]), $MachinePrecision] * N[Sqrt[N[(U * U$42$), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
l_m = \left|\ell\right|

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

\mathbf{elif}\;t\_2 \leq 10^{+151}:\\
\;\;\;\;\sqrt{t\_1 \cdot \mathsf{fma}\left(l\_m \cdot l\_m, \frac{-2}{Om}, t\right)}\\

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

\mathbf{else}:\\
\;\;\;\;\left(l\_m \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \sqrt{U \cdot U*}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 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*))))) < 4.9999999999999999e-161

    1. Initial program 12.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. Add Preprocessing
    3. Taylor expanded in t around inf

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

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
      3. lower-*.f64N/A

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

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

      \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right) \cdot \left(n \cdot t\right)}} \]
    6. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \sqrt{\color{blue}{\left(2 \cdot U\right)} \cdot \left(n \cdot t\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \sqrt{\left(2 \cdot U\right) \cdot \color{blue}{\left(n \cdot t\right)}} \]
      3. sqrt-prodN/A

        \[\leadsto \color{blue}{\sqrt{2 \cdot U} \cdot \sqrt{n \cdot t}} \]
      4. pow1/2N/A

        \[\leadsto \color{blue}{{\left(2 \cdot U\right)}^{\frac{1}{2}}} \cdot \sqrt{n \cdot t} \]
      5. pow1/2N/A

        \[\leadsto {\left(2 \cdot U\right)}^{\frac{1}{2}} \cdot \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}}} \]
      6. *-commutativeN/A

        \[\leadsto \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      7. lower-*.f64N/A

        \[\leadsto \color{blue}{{\left(n \cdot t\right)}^{\frac{1}{2}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}}} \]
      8. pow1/2N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot t}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}} \]
      9. lower-sqrt.f64N/A

        \[\leadsto \color{blue}{\sqrt{n \cdot t}} \cdot {\left(2 \cdot U\right)}^{\frac{1}{2}} \]
      10. pow1/2N/A

        \[\leadsto \sqrt{n \cdot t} \cdot \color{blue}{\sqrt{2 \cdot U}} \]
      11. lower-sqrt.f6430.0

        \[\leadsto \sqrt{n \cdot t} \cdot \color{blue}{\sqrt{2 \cdot U}} \]
      12. lift-*.f64N/A

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{2 \cdot U}} \]
      13. *-commutativeN/A

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{U \cdot 2}} \]
      14. lower-*.f6430.0

        \[\leadsto \sqrt{n \cdot t} \cdot \sqrt{\color{blue}{U \cdot 2}} \]
    7. Applied egg-rr30.0%

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

    if 4.9999999999999999e-161 < (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.00000000000000002e151

    1. Initial program 97.3%

      \[\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 Om around inf

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6486.4

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

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

    if 1.00000000000000002e151 < (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 33.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. Add Preprocessing
    3. Taylor expanded in Om around inf

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(t + -2 \cdot \frac{{\ell}^{2}}{Om}\right)}} \]
    4. Step-by-step derivation
      1. +-commutativeN/A

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{{\ell}^{2} \cdot \frac{-2}{Om}} + t\right)} \]
      5. lower-fma.f64N/A

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\ell \cdot \ell}, \frac{-2}{Om}, t\right)} \]
      8. lower-/.f6425.4

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

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

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

    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. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \left(\color{blue}{\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)} \]
      5. lift-/.f64N/A

        \[\leadsto \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 {\color{blue}{\left(\frac{\ell}{Om}\right)}}^{2}\right) \cdot \left(U - U*\right)\right)} \]
      6. lift-pow.f64N/A

        \[\leadsto \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 \color{blue}{{\left(\frac{\ell}{Om}\right)}^{2}}\right) \cdot \left(U - U*\right)\right)} \]
      7. lift-*.f64N/A

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

        \[\leadsto \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 \color{blue}{\left(U - U*\right)}\right)} \]
      9. lift-*.f64N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \color{blue}{\left(\left(t - 2 \cdot \frac{\ell \cdot \ell}{Om}\right) + \left(\mathsf{neg}\left(\left(n \cdot {\left(\frac{\ell}{Om}\right)}^{2}\right) \cdot \left(U - U*\right)\right)\right)\right)}} \]
      11. +-commutativeN/A

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\left(U* + -1 \cdot U\right)} \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    6. Step-by-step derivation
      1. mul-1-negN/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\left(U* + \color{blue}{\left(\mathsf{neg}\left(U\right)\right)}\right) \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      2. sub-negN/A

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

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\color{blue}{\left(U* - U\right)} \cdot \frac{\ell}{Om}, \frac{\ell}{Om} \cdot n, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    8. Step-by-step derivation
      1. associate-*l/N/A

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

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\left(U* - U\right) \cdot \frac{\ell}{Om}, \color{blue}{\left(\ell \cdot n\right) \cdot \frac{1}{Om}}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      3. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\left(U* - U\right) \cdot \frac{\ell}{Om}, \color{blue}{\left(\ell \cdot n\right) \cdot \frac{1}{Om}}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      4. lower-*.f64N/A

        \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\left(U* - U\right) \cdot \frac{\ell}{Om}, \color{blue}{\left(\ell \cdot n\right)} \cdot \frac{1}{Om}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
      5. lower-/.f649.7

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

      \[\leadsto \sqrt{\left(\left(2 \cdot n\right) \cdot U\right) \cdot \mathsf{fma}\left(\left(U* - U\right) \cdot \frac{\ell}{Om}, \color{blue}{\left(\ell \cdot n\right) \cdot \frac{1}{Om}}, \mathsf{fma}\left(-2 \cdot \ell, \frac{\ell}{Om}, t\right)\right)} \]
    10. Taylor expanded in U* around inf

      \[\leadsto \color{blue}{\frac{\ell \cdot \left(n \cdot \sqrt{2}\right)}{Om} \cdot \sqrt{U \cdot U*}} \]
    11. Step-by-step derivation
      1. lower-*.f64N/A

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

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      3. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right)} \cdot \sqrt{U \cdot U*} \]
      4. lower-/.f64N/A

        \[\leadsto \left(\ell \cdot \color{blue}{\frac{n \cdot \sqrt{2}}{Om}}\right) \cdot \sqrt{U \cdot U*} \]
      5. lower-*.f64N/A

        \[\leadsto \left(\ell \cdot \frac{\color{blue}{n \cdot \sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      6. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \color{blue}{\sqrt{2}}}{Om}\right) \cdot \sqrt{U \cdot U*} \]
      7. lower-sqrt.f64N/A

        \[\leadsto \left(\ell \cdot \frac{n \cdot \sqrt{2}}{Om}\right) \cdot \color{blue}{\sqrt{U \cdot U*}} \]
      8. lower-*.f6421.9

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

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

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

Reproduce

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